Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706018 - >net-libs/nodejs-10 - src_compile(): segmentation fault in mksnapshot" --turbo_instruction_scheduling "--target_os=linux" "--target_arch=ppc64" --startup_src ... at ?
Summary: >net-libs/nodejs-10 - src_compile(): segmentation fault in mksnapshot" --turb...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 18:07 UTC by ernsteiswuerfel
Modified: 2020-11-10 09:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (13.6.0, ppc64) (nodejs-13.6.0:20200121-160222.log.xz,17.59 KB, application/x-xz)
2020-01-21 18:07 UTC, ernsteiswuerfel
Details
emerge --info (file_706018.txt,5.91 KB, text/plain)
2020-01-21 18:08 UTC, ernsteiswuerfel
Details
build.log.xz (12.14.1, ppc64) (nodejs-12.14.1:20200121-184123.log.xz,18.11 KB, application/x-xz)
2020-01-21 20:15 UTC, ernsteiswuerfel
Details
build.log.xz (14.4.0, ppc64) (nodejs-14.4.0:20200613-140334.log.xz,37.35 KB, application/x-xz)
2020-06-13 16:15 UTC, ernsteiswuerfel
Details
build.log.xz (14.14.0, ppc64) (nodejs-14.14.0:20201109-183100.log.xz,38.21 KB, application/x-xz)
2020-11-09 18:54 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2020-01-21 18:07:52 UTC
Created attachment 603868 [details]
build.log.xz (13.6.0, ppc64)

[...]
  powerpc64-unknown-linux-gnu-g++ -o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Relea
se/mksnapshot -pthread -rdynamic -m64 -m64 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--start-grou
p /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/sr
c/snapshot/embedded/embedded-file-writer.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_init.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_nosnapshot.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libsampler.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a -lz -luv -lcares -lnghttp2 -lcrypto -lssl -licui18n -licuuc -licudata -ldl -lrt -Wl,--end-group
  touch 9d82bdc844c30a612bcf0354be667f2c0bc952c7.intermediate
  LD_LIBRARY_PATH=/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/lib.host:/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/v8_gypfiles; mkdir -p /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/v8_snapshot/geni; "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/mksnapshot" --turbo_instruction_scheduling "--target_os=linux" "--target_arch=ppc64" --startup_src "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" --embedded_variant Default --embedded_src "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/v8_snapshot/geni/embedded.S" --no-native-code-counters
/bin/sh: line 1: 15407 Segmentation fault      (core dumped) "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/mksnapshot" --turbo_instruction_scheduling "--target_os=linux" "--target_arch=ppc64" --startup_src "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" --embedded_variant Default --embedded_src "/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Release/obj.target/v8_snapshot/geni/embedded.S" --no-native-code-counters
make: *** [tools/v8_gypfiles/v8_snapshot.target.mk:17: 9d82bdc844c30a612bcf0354be667f2c0bc952c7.intermediate] Error 139
rm 3326b81288919bc23b0846ad585f6c0062c07053.intermediate 760599353248090595b06a68039e01231dd274e2.intermediate 9d82bdc844c30a612bcf0354be667f2c0bc952c7.intermediate
make: Leaving directory '/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out'
 * ERROR: net-libs/nodejs-13.6.0::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2020-01-21 18:08:42 UTC
Created attachment 603870 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2020-01-21 20:15:04 UTC
Created attachment 603914 [details]
build.log.xz (12.14.1, ppc64)

Fails with similar or same reason as 13.6.0.

Latest version I am able to build on ppc64 is nodejs-10.18.1.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-22 10:05:03 UTC
(In reply to ernsteiswuerfel from comment #2)
> Created attachment 603914 [details]
> build.log.xz (12.14.1, ppc64)
> 
> Fails with similar or same reason as 13.6.0.

Same.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-22 10:05:42 UTC
Perhaps you should rerun that command through gdb and find out where exactly that happens and perhaps why.
Comment 5 ernsteiswuerfel archtester 2020-01-22 19:08:51 UTC
# coredumpctl gdb
           PID: 18127 (mksnapshot)
           UID: 250 (portage)
           GID: 250 (portage)
        Signal: 5 (TRAP)
     Timestamp: Wed 2020-01-22 19:35:03 CET (27min ago)
  Command Line: /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot --turbo_instruction_scheduling --target_os=linux --target_arch=ppc64 --startup_src /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/obj.target/v8_snapshot/geni/snapshot.cc --embedded_variant Default --embedded_src /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/obj.target/v8_snapshot/geni/embedded.S --no-native-code-counters
    Executable: /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (ef)
       Boot ID: 6729a7aa98d94b5685887092f0c4a922
    Machine ID: 3f89104fd8e846edb53c46af433b901e
      Hostname: T1000
       Storage: /var/lib/systemd/coredump/core.mksnapshot.250.6729a7aa98d94b5685887092f0c4a922.18127.1579718103000000000000.lz4
       Message: Process 18127 (mksnapshot) of user 250 dumped core.
                
                Stack trace of thread 16820:
                #0  0x000000012d11675c n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #1  0x000000012dde126c n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #2  0x000000012dde126c n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #3  0x000000012dde12a0 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #4  0x000000012dde12e4 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #5  0x000000012d883708 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #6  0x000000012d883848 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #7  0x000000012d423340 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #8  0x000000012d38fc40 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #9  0x000000012d2df178 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #10 0x000000012d136e18 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #11 0x000000012d86a0fc n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #12 0x000000012d116bd8 n/a (/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot)
                #13 0x00003fffb8ac5cb0 generic_start_main (libc.so.6)
                #14 0x00003fffec26211e n/a (n/a)
                #15 0x00003fffec26211e n/a (n/a)
                #16 0x454e565f554e5345 n/a (n/a)

GNU gdb (Gentoo 8.3.1 vanilla) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "powerpc64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot...
[New LWP 16820]
[New LWP 16822]
[New LWP 16826]
[New LWP 16828]
[New LWP 16827]
[New LWP 16823]
[New LWP 16825]
[New LWP 16824]
[New LWP 16821]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot '.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x000000012d11675c in v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:406
406	  if (g_hard_abort) {
[Current thread is 1 (Thread 0x3fffb9847010 (LWP 16820))]
(gdb) run
Starting program: /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x3ffff5783150 (LWP 18278)]
[New Thread 0x3ffff4f82150 (LWP 18279)]
[New Thread 0x3ffff4781150 (LWP 18280)]
[New Thread 0x3ffff3f80150 (LWP 18281)]
[New Thread 0x3ffff377f150 (LWP 18282)]
[New Thread 0x3ffff2f7e150 (LWP 18283)]
[New Thread 0x3ffff277d150 (LWP 18284)]
[New Thread 0x3ffff1f7c150 (LWP 18285)]


#
# Fatal error in ../deps/v8/src/utils/allocation.cc, line 168
# Debug check failed: hint == AlignedAddress(hint, alignment) (0xdeaf5f4000 vs. 0xdeaf5f0000).
#
#
#
#FailureMessage Object: 0x3fffffff4ba8
==== C stack trace ===============================

    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::base::debug::StackTrace::StackTrace()-0x56c564) [0x10229f74c]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(+0x159c308) [0x10159c308]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(V8_Fatal(char const*, int, char const*, ...)-0x120b8e8) [0x101590258]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(+0x15902a0) [0x1015902a0]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(V8_Dcheck(char const*, int, char const*)-0x120b88c) [0x1015902e4]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::AllocatePages(v8::PageAllocator*, void*, unsigned long, unsigned long, v8::PageAllocator::Permission)-0x173fe88) [0x101032708]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::VirtualMemory::VirtualMemory(v8::PageAllocator*, unsigned long, void*, unsigned long)-0x173fd60) [0x101032848]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::MemoryAllocator::InitializeCodePageAllocator(v8::PageAllocator*, unsigned long)-0x1b780c8) [0x100bd2340]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::Heap::SetUp()-0x1c05a38) [0x100b3ec40]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::Isolate::Init(v8::internal::ReadOnlyDeserializer*, v8::internal::StartupDeserializer*)-0x1caf060) [0x100a8e178]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::SnapshotCreator::SnapshotCreator(v8::Isolate*, long const*, v8::StartupData*)-0x1e3f3c0) [0x1008e5e18]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(v8::internal::CreateSnapshotDataBlobInternal(v8::SnapshotCreator::FunctionCodeHandling, char const*, v8::Isolate*)-0x1757f4c) [0x1010190fc]
    /var/tmp/portage/net-libs/nodejs-13.6.0/work/node-v13.6.0/out/Debug/mksnapshot(main-0x1e5e538) [0x1008c5bd8]
    /lib64/libc.so.6(+0x48cb0) [0x3ffff72aecb0]
    /lib64/libc.so.6(__libc_start_main-0x1c4880) [0x3ffff72aeed0]
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-25 09:36:45 UTC
Could you report this at [0], please? It looks like PPC/64 support was once added but was since forgotten when new features got introduced.


[0] https://github.com/nodejs/node/issues
Comment 7 Marcus Comstedt 2020-06-13 09:26:37 UTC
The problem seems to be code which expects 4K pages rather than 64K pages.
Comment 8 ernsteiswuerfel archtester 2020-06-13 16:15:22 UTC
Created attachment 644564 [details]
build.log.xz (14.4.0, ppc64)
Comment 9 ernsteiswuerfel archtester 2020-06-13 16:21:51 UTC
(In reply to Marcus Comstedt from comment #7)
> The problem seems to be code which expects 4K pages rather than 64K pages.
Nice, you got much out of a proper bug report than I did! ;) Seems to be the same issue.

Not so nice wontfix upstream reeaction... Though they would accept a patch being 'not too invasive'.
Comment 10 Marek Szuba archtester gentoo-dev 2020-11-09 15:30:42 UTC
Is still a problem with 14.15.0? If so, we might have to mask USE=snapshot on ppc64 for the time being.
Comment 11 ernsteiswuerfel archtester 2020-11-09 18:54:45 UTC
Created attachment 670637 [details]
build.log.xz (14.14.0, ppc64)

Latest version in portage is 14.14.0 and it shows the same error on ppc64.
Comment 12 ernsteiswuerfel archtester 2020-11-09 19:18:53 UTC
Oops, I missed 14.15.0 having been updated very recently...

Yes, 14.15.0 builds fine now. Thanks!