Summary: | dev-lang/erlang-22.1.4 - erlc: init terminating in do_boot ({undef,[{asn1ct_func,start_link,[],[]},{prepare_templates,gen_asn1ct_eval,1,[{_},{_}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | WGH <wgh> |
Component: | Current packages | Assignee: | Sergei Trofimovich (RETIRED) <slyfox> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arkamar, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/erlang/otp/pull/2508 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
./work/otp-OTP-22.1.4/lib/asn1/src/erl_crash.dump otp-OTP-22.2.2-asn1-dep.patch |
Description
WGH
2020-01-15 18:06:08 UTC
Created attachment 603402 [details]
build.log
Created attachment 603404 [details]
./work/otp-OTP-22.1.4/lib/asn1/src/erl_crash.dump
(In reply to WGH from comment #0) > KiB Mem: 8056824 total, 987296 free You have slightly less than 8GB RAM. > MAKEOPTS="-j21 -l4" 8GB / 21 ~ 350 megabytes per make job. erlc is rather undemanding in terms of CPU/RAM resources, but it would still be useful to check if you can reproduce the problem with either more RAM installed or with fewer make jobs. > System uname: Linux-4.19.85-gentoo-x86_64-Intel-R-_Core-TM-_i3-4010U_CPU_@_1.70GHz-with-gentoo-2.6 According to [0] that CPU has two cores (or four threads). How did you end up with -j21? :-) [0] https://ark.intel.com/content/www/us/en/ark/products/75107/intel-core-i3-4010u-processor-3m-cache-1-70-ghz.html > According to [0] that CPU has two cores (or four threads). How did you end up with -j21? :-) I'm using distcc. erlc doesn't benefit from it, though. > 8GB / 21 ~ 350 megabytes per make job. erlc is rather undemanding in terms of CPU/RAM resources, but it would still be useful to check if you can reproduce the problem with either more RAM installed or with fewer make jobs. I still have 16G of swap, and I think it would thrash for a while if there was lack of RAM insted of crashing rapidly (not to mention that 16G should be enough not to crash). I rerun it while closely monitoring htop, and there were no memory consumption anomalies (and no OOM killer either). Anyway, just in case, I disabled distcc, set -j4, and run it again. And wow, it didn't crash this time. I tested some other combinations: * -j4 - OK * distcc -j4 - OK * distcc -j4 -l4 - OK * distcc -j21 -l4 - fail * j21 -l4 - fail So it's somehow caused by large job number, but not by distcc. It's still looks odd as 1) the error message is cryptic 2) there're no typical signs of memory shortage. Does 'dmesg' report any problems? Reproduced locally with time MAKEOPTS='-j21 -l4' emerge -v1 dev-lang/erlang --quiet-build=n as well. > Does 'dmesg' report any problems?
Nope. Does yours?
Mine doesn't either. I hoped for a simple OOM background process crash. But looks like it's a make dependency problem. NixOS also saw it: https://github.com/NixOS/nixpkgs/pull/51644 Created attachment 603552 [details, diff] otp-OTP-22.2.2-asn1-dep.patch > erl -pa ../ebin -noshell -noinput \ -run prepare_templates gen_asn1ct_eval asn1ct_eval_ext.funcs > {"init terminating in do_boot",{undef,[{asn1ct_func,start_link,[],[]},{prepare_templates,gen_asn1ct_eval,1,[{file,"prepare_templates.erl"},{line,58}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}} If I read that correctly it just says that bytecode .beam file of prepare_templates.erl attempted to load bytecode file of asn1ct_func.erl module and failed. Can you try to torture attached file to see if it still produces errors? You can drop patch to /etc/portage/patches/dev-lang/erlang/ to get it applied by the ebuild. The patch seems to have helped me but it might need more depends. Filed pull request upstream as https://github.com/erlang/otp/pull/2508. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47b988b3b8b66dbaec48a57d17a7769b4b8425bf commit 47b988b3b8b66dbaec48a57d17a7769b4b8425bf Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-01-17 08:04:11 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-01-17 08:04:38 +0000 dev-lang/erlang: fix lib/asn1 depend, bug #705500 The build failure is reproducible on a 4-core CPU when using massive parallelism: ``` $ make -j21 -l4 ... GEN asn1ct_eval_ext.erl {"init terminating in do_boot", {undef,[{asn1ct_func,start_link,[],[]}, {prepare_templates,gen_asn1ct_eval,1, [{file,"prepare_templates.erl"},{line,58}]}, {init,start_it,1,[]},{init,start_em,1,[]}]}} init terminating in do_boot () Crash dump is being written to: erl_crash.dump...done make[2]: *** [Makefile:139: asn1ct_eval_ext.erl] Error 1 ``` Here `asn1ct_eval_ext.erl` attempts to load `asn1ct_func.beam` via `prepare_templates.erl` before it's compiled into `.beam` file. The change pulls in a dependency on `asn1ct_func.beam`. Reported-by: WGH Closes: https://bugs.gentoo.org/705500 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/erlang/erlang-22.1.4.ebuild | 3 ++- dev-lang/erlang/erlang-22.1.8-r1.ebuild | 3 ++- dev-lang/erlang/erlang-22.2.1-r1.ebuild | 3 ++- dev-lang/erlang/erlang-22.2.2.ebuild | 1 + dev-lang/erlang/erlang-22.2.ebuild | 3 ++- dev-lang/erlang/files/erlang-22.1.4-asn1-dep.patch | 15 +++++++++++++++ 6 files changed, 24 insertions(+), 4 deletions(-) > Can you try to torture attached file to see if it still produces errors?
Not sure about torture, but I compiled several times with this patch and never got any errors.
Without this patch compilation consistently ends with that error.
|