Summary: | net-libs/nodejs[lto]: test and runtime errors when built with gcc-11 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Patrick Lauer <patrick> |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex, bertrand, captaincrutches, dev, dharding, doug.hunley, gentoo, hanno, herrtimson, marcoep, marek.bartosiewicz, mozilla, petronio, sam, vityokster, voyageur, wgh |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/nodejs/node/issues/38501 | ||
See Also: | https://github.com/gentoo/gentoo/pull/25418 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550, 732706 |
Description
Patrick Lauer
2021-04-30 15:55:16 UTC
Please attach complete build.log, thanks. I can reproduce with net-libs/nodejs[lto]. Patrick, can you confirm you also tried with net-libs/nodejs[lto]? For me, net-libs/nodejs[lto] looks like totally broken. Assigning to to nodejs maintainer. > net-libs/nodejs-16.0.0-r1::gentoo was built with the following:
> USE="icu lto npm snapshot ssl system-ssl -debug -doc -inspector -pax_kernel -system-icu -systemtap -test" ABI_X86="(64)" CPU_FLAGS_X86="sse2"
> FEATURES="downgrade-backup strict news binpkg-logs network-sandbox sandbox userfetch binpkg-docompress sfperms unknown-features-warn xattr binpkg-multi-instance unmerge-orphans assume-digests pid-sandbox fixlafiles usersync config-protect-if-modified splitdebug preserve-libs qa-unresolved-soname-deps cgroup ebuild-locks ipc-sandbox binpkg-dostrip protect-owned userpriv ccache parallel-fetch merge-sync compressdebug multilib-strict distlocks usersandbox unmerge-logs"
>
*** Bug 787170 has been marked as a duplicate of this bug. *** (In reply to Thomas Deutschmann from comment #3) > > net-libs/nodejs-16.0.0-r1::gentoo was built with the following: Is this v16-specific or does this also happen with LTS branches? (In reply to Marek Szuba from comment #5) > (In reply to Thomas Deutschmann from comment #3) > > > net-libs/nodejs-16.0.0-r1::gentoo was built with the following: > > Is this v16-specific or does this also happen with LTS branches? Not Thomas, but I was unable to reproduce on net-libs/nodejs-14.16.1-r1 with +lto (further details in duplicate ticket). net-libs/nodejs-14.16.1-r1[lto] is failing for me the same. net-libs/nodejs-14.16.1-r1[-lto] works. net-libs/nodejs-12.22.1-r1[lto] shows same problem so I am declaring entire nodejs[lto] broken at this point. Sorry :) I have gcc-11.1.0 After recompiling nodejs with -lto now I get this: 14:02.03 gmake[6]: Nothing to be done for 'libs'. 14:02.03 gmake[6]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales' 14:02.03 gmake[6]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales' 14:02.03 gmake[6]: Nothing to be done for 'tools'. 14:02.03 gmake[6]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales' 14:02.03 gmake[5]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales' 14:02.03 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales' 14:02.04 gmake[4]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales' 14:02.04 ../../config/nsinstall -D ../../dist/linux-x86_64/xpi/ 14:02.04 /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/_virtualenvs/init_py3/bin/python -m mozbuild.action.langpack_manifest --locales en-US --min-app-ver 88.0 --max-app-ver 88.* --app-name 'Firefox' --l10n-basedir '/var/tmp/portage/www-client/firefox-88.0-r1/homedir/.mozbuild/l10n-central' --defines /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/toolkit/locales/en-US/defines.inc /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/browser/locales/en-US/defines.inc --langpack-eid 'langpack-en-US@firefox.mozilla.org' --input ../../dist/xpi-stage/locale-en-US 14:02.26 /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/_virtualenvs/init_py3/bin/python -m mozbuild.action.zip -C ../../dist/xpi-stage/locale-en-US -x **/*.manifest -x **/*.js -x **/*.ini /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/dist/linux-x86_64/xpi/firefox-88.0.en-US.langpack.xpi chrome localization browser manifest.json 14:02.44 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales' 14:02.44 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales' 14:02.44 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer' 14:02.45 gmake[2]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer' 14:02.45 gmake[2]: Nothing to be done for 'tools'. 14:02.45 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer' 14:02.45 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer' 14:02.45 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented' console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)")) ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Failed to connect WebRenderBridgeChild. (t=0.146603) [GFX1-]: Failed to connect WebRenderBridgeChild. ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost jarlog: /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/jarlog/en-US.log JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. www-client/firefox-88.0-r1:0/88::gentoo [88.0:0/88::gentoo] USE="clang dbus gmp-autoupdate hwaccel lto openh264 pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -geckodriver -hardened -jack -screencast (-selinux) -sndio% -wifi" Just to be clear, comment #10 doesn't show a build error (these are warning from running firefox during profile guided optimization run). @Marek: Could you please confirm that you now have a working firefox-88.0-r1 with nodejs[-lto]? Yes, but I had to USE="-lto -pgo" for firefox. I'm not sure about -lto, but I set it that way just in case. With USE="pgo" firefox compilation just hanged indefinetly on that message, I waited for about an hour with no activity seen in htop. I tried again, this time with "lto pgo" enabled. Compilation hanged for few minutes on JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. and then continued for some more time and failed again: 27:19.24 Finished release [optimized] target(s) in 5m 08s 27:19.41 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/toolkit/library/rust' 27:19.41 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build' 27:19.41 gmake[2]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/recurse.mk:34: compile] Error 2 27:19.41 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build' 27:19.42 gmake[1]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/rules.mk:355: default] Error 2 27:19.42 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build' 27:19.42 gmake: *** [client.mk:65: build] Error 2 27:19.44 13 compiler warnings present. * ERROR: www-client/firefox-88.0-r1::gentoo failed (compile phase): * Failed to run './mach build --verbose' * * Call stack: * ebuild.sh, line 125: Called src_compile * environment, line 4518: Called virtx './mach' 'build' '--verbose' * environment, line 5846: Called die * The specific snippet of code: * [[ ${retval} -ne 0 ]] && die "Failed to run '$@'"; Buuut I have this in dmesg: [ 2076.886087] traps: rustc[58196] trap invalid opcode ip:7fb1bb842cf2 sp:7fb1b220c008 error:0 in librustc_driver-9e1a55d25b886146.so[7fb1b8a63000+437d000] [ 2077.427056] BUG: Bad page map in process rustc pte:0744d025 pmd:33314e067 [ 2077.427065] page:000000009d579181 refcount:0 mapcount:-1 mapping:0000000000000000 index:0x0 pfn:0x744d [ 2077.427069] flags: 0x200000000000002(referenced) [ 2077.427073] raw: 0200000000000002 fffff05d801d1348 fffff05d801d1348 0000000000000000 [ 2077.427075] raw: 0000000000000000 0000000000000000 00000000fffffffe 0000000000000000 [ 2077.427076] page dumped because: bad pte [ 2077.427076] addr:00007fb1bb842000 vm_flags:00000075 anon_vma:0000000000000000 mapping:ffff8b3794a69ce8 index:2ddf [ 2077.427079] file:librustc_driver-9e1a55d25b886146.so fault:xfs_filemap_fault mmap:xfs_file_mmap readpage:xfs_vm_readpage [ 2077.427089] CPU: 22 PID: 58195 Comm: rustc Not tainted 5.12.0-gentoo-x86_64 #2 [ 2077.427091] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X570M Pro4, BIOS P3.50 04/15/2021 [ 2077.427092] Call Trace: [ 2077.427098] dump_stack+0x64/0x7c [ 2077.427102] print_bad_pte.cold+0x7d/0xfe [ 2077.427105] unmap_page_range+0x6e6/0xc00 [ 2077.427109] unmap_vmas+0x6a/0xd0 [ 2077.427110] exit_mmap+0x84/0x1a0 [ 2077.427113] mmput+0x52/0x110 [ 2077.427116] do_exit+0x2ef/0xa00 [ 2077.427118] do_group_exit+0x33/0x90 [ 2077.427120] get_signal+0x166/0x840 [ 2077.427123] ? default_send_IPI_single_phys+0x26/0x30 [ 2077.427127] ? check_preempt_curr+0x2f/0x70 [ 2077.427129] arch_do_signal_or_restart+0xfc/0x6d0 [ 2077.427131] ? kernel_clone+0xf3/0x3a0 [ 2077.427133] ? __x64_sys_futex+0x125/0x190 [ 2077.427136] exit_to_user_mode_prepare+0xc2/0x150 [ 2077.427138] syscall_exit_to_user_mode+0x1d/0x40 [ 2077.427142] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 2077.427145] RIP: 0033:0x7fb1b438e6c2 [ 2077.427147] Code: Unable to access opcode bytes at RIP 0x7fb1b438e698. [ 2077.427148] RSP: 002b:00007ffce72aa0f0 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 2077.427150] RAX: fffffffffffffe00 RBX: 0000000000000000 RCX: 00007fb1b438e6c2 [ 2077.427151] RDX: 00000000000087c6 RSI: 0000000000000109 RDI: 00007fb1b2220910 [ 2077.427152] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000ffffffff [ 2077.427154] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000087c6 [ 2077.427154] R13: 0000000000000000 R14: 00007fb1b2220910 R15: 00007fb1b2220640 This is Ryzen 3900X. I recompiled my system twice (~amd64) after gcc-11.1.0 was released, but I had to skip some failures (like qtwebengine, llvm-roc-4.1.1, llvm-12 I think) so there's something funny going on. Is this even relevant now? https://github.com/rust-lang/rust/issues/49751 It would appear that the situation here is more complicated than simply "net-libs/nodejs[lto] is broken" - on my test system (up to date amd64, USE=lto in make.conf, ACCEPT_KEYWORDS=~amd64 defined only for net-libs/nodejs and www-client/firefox), *none* of the four combination I tried today (nodejs: 14.16.1-r1, 16.0.0-r1, firefox: 78.10.0, 88.0-r1) has failed to build and install. Having just run some tests using gcc-11 builds of nodejs-14.16.1-r1, I can now confirm that having set USE=lto for that ebuild subsequently causes Firefox build failures as described by the others. Moreover, having manually run the Node test suite (I really should figure out some day how to make this play nicely with the sandbox...) an LTO-enabled build, it too fails (with a segfault). Both problems do not occur with USE=-lto. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295d9880d9cd001ebc35c1e2cb35884ccc0f7f59 commit 295d9880d9cd001ebc35c1e2cb35884ccc0f7f59 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2021-05-01 21:52:51 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2021-05-01 21:52:51 +0000 net-libs/nodejs: disallow USE=lto with gcc-11+ Runtime errors + a segfault in the test suite. Bug: https://bugs.gentoo.org/787158 Signed-off-by: Marek Szuba <marecki@gentoo.org> net-libs/nodejs/nodejs-12.22.1-r1.ebuild | 10 +++++++++- net-libs/nodejs/nodejs-14.16.1-r1.ebuild | 10 +++++++++- net-libs/nodejs/nodejs-16.0.0-r1.ebuild | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) I reemerged llvm:11 llvm:12 and rust and this time firefox-88.0-r1 compilation with lto, pgo went OK, no more "invalid opcode" in dmesg. Looks like this is actually "worked around" now. Just synced portage and I am not able to build nodejs with lto. Build fails during pretend phase and is asking to unset lto USEflag: * ERROR: net-libs/nodejs-14.17.6::gentoo failed (pretend phase): * LTO builds of nodejs using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild * * Call stack: * ebuild.sh, line 127: Called pkg_pretend * nodejs-14.17.6.ebuild, line 69: Called die (In reply to Jae Hak Kim from comment #20) > Just synced portage and I am not able to build nodejs with lto. > Build fails during pretend phase and is asking to unset lto USEflag: > > * ERROR: net-libs/nodejs-14.17.6::gentoo failed (pretend phase): > * LTO builds of nodejs using gcc-11+ currently fail tests and produce > runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild > * > * Call stack: > * ebuild.sh, line 127: Called pkg_pretend > * nodejs-14.17.6.ebuild, line 69: Called die We can't really do much for this in Gentoo given the upstream issue has had no attention. We could mask the flag though given GCC 11 is now stable. It looks like this was fixed in 12.22.9, 14.19.0 and will be fixed soon in 16.14.0 (In reply to nE0sIghT from comment #22) > It looks like this was fixed in 12.22.9, 14.19.0 and will be fixed soon in > 16.14.0 I installed nodejs-16.13.2 with GCC11 and LTO (simply commented out the check in the ebuild). Firefox-96.0.3 and 97.0, and Thunderbird-91.5.0 build and run fine, so far :-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23f4cffb98b5e0f3fdd35c93f4e3307de8fbb701 commit 23f4cffb98b5e0f3fdd35c93f4e3307de8fbb701 Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2022-06-03 18:33:37 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2022-06-03 18:43:55 +0000 net-libs/nodejs: add 14.19.3, 16.15.1, 18.3.0, sync live Closes: https://bugs.gentoo.org/848777 Bug: https://bugs.gentoo.org/845261 Closes: https://bugs.gentoo.org/843296 Closes: https://github.com/gentoo/gentoo/pulls/25418 Bug: https://bugs.gentoo.org/787158 Signed-off-by: William Hubbs <williamh@gentoo.org> net-libs/nodejs/Manifest | 3 + net-libs/nodejs/nodejs-14.19.3.ebuild | 227 +++++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-16.15.1.ebuild | 219 +++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-18.3.0.ebuild | 219 +++++++++++++++++++++++++++++++ net-libs/nodejs/nodejs-99999999.ebuild | 13 +- 5 files changed, 669 insertions(+), 12 deletions(-) |