Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 889438 - sys-devel/gcc: ICE when building dev-libs/nodejs
Summary: sys-devel/gcc: ICE when building dev-libs/nodejs
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-03 04:34 UTC by Matt Hartley
Modified: 2023-01-03 05:29 UTC (History)
0 users

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


Attachments
emerge info (emerge_info.txt,7.74 KB, text/plain)
2023-01-03 04:34 UTC, Matt Hartley
Details
build log (build.log,477.79 KB, text/x-log)
2023-01-03 04:35 UTC, Matt Hartley
Details
build environment (environment,141.80 KB, text/plain)
2023-01-03 04:35 UTC, Matt Hartley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Hartley 2023-01-03 04:34:51 UTC
Created attachment 846806 [details]
emerge info

Emerging net-libs/nodejs-18.12.1 gives me the following error stacktrace
In file included from ../deps/v8/src/profiler/heap-profiler.h:14,
                 from ../deps/v8/src/heap/heap-inl.h:50,
                 from ../deps/v8/src/objects/code-inl.h:14,
                 from ../deps/v8/src/objects/property-cell-inl.h:11,
                 from ../deps/v8/src/objects/dictionary-inl.h:15,
                 from ../deps/v8/src/objects/contexts-inl.h:11,
                 from ../deps/v8/src/execution/isolate-inl.h:9,
                 from ../deps/v8/src/heap/factory-inl.h:12,
                 from ../deps/v8/src/objects/lookup-inl.h:14,
                 from ../deps/v8/src/objects/js-objects-inl.h:18,
                 from ../deps/v8/src/objects/api-callbacks-inl.h:13,
                 from ../deps/v8/src/objects/map-inl.h:9,
                 from ../deps/v8/src/objects/instance-type-inl.h:11,
                 from ../deps/v8/src/objects/js-proxy-inl.h:8,
                 from ../deps/v8/src/objects/objects-inl.h:29,
                 from ../deps/v8/src/compiler/osr.cc:9:
../deps/v8/src/debug/debug-interface.h:694:3: internal compiler error: Segmentation fault
  694 |   }
      |   ^
Please submit a full bug report, with preprocessed source.
See <https://bugs.gentoo.org/> for instructions.

At the time I was rebuilding my system with glibc which had the nostrip feature. Removing the feature and rebuilding glibc merely changed the error message

In file included from ../deps/v8/src/heap/factory.h:19,
                 from ../deps/v8/src/ast/ast-value-factory.h:36,
                 from ../deps/v8/src/ast/ast-value-factory.cc:28:
../deps/v8/src/heap/heap.h:260:70: internal compiler error: Segmentation fault
  260 |     int64_t total() { return total_.load(std::memory_order_relaxed); }
      |                                                                      ^
Please submit a full bug report, with preprocessed source.
See <https://bugs.gentoo.org/> for instructions.
Comment 1 Matt Hartley 2023-01-03 04:35:22 UTC
Created attachment 846808 [details]
build log
Comment 2 Matt Hartley 2023-01-03 04:35:45 UTC
Created attachment 846810 [details]
build environment
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-03 04:37:34 UTC
The error message in your attached build.log is different to the snippet you quoted wrt heap.h. This is not a good sign and implies possible memory issues. The fact there's no proper backtrace makes this more likely too.

In fact, with ICEs, it's the main cause. But of course, real ICEs exist too.

If this is reproducible, please follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide, but I strongly recommend doing a memtest first.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-03 04:38:46 UTC
Also...
>The bug is not reproducible, so it is likely a hardware or OS problem.
Comment 5 Matt Hartley 2023-01-03 05:12:49 UTC
I was verifying that it still crashed with various changes, which is why I got similar messages in multiple places
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-03 05:15:05 UTC
(In reply to Matt Hartley from comment #5)
> I was verifying that it still crashed with various changes, which is why I
> got similar messages in multiple places

The problem is they're not very similar. It's a segfault and an ICE but the compiler doesn't even say which function inside GCC it died in.

This sort of ICE (essentially no details, usually on a large C++ codebase, not on the same source file) is almost always hardware.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-03 05:18:12 UTC
You can try without -freport-bug (counter-intuitive, I know) as sometimes that leads to worse information but it's not necessarily going to help.
Comment 8 Matt Hartley 2023-01-03 05:24:38 UTC
oh, ok. Thank you so much. I'm not sure how to do a memtest, but will set that up. I rebooted and the crashes went away so you were right.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-03 05:29:57 UTC
No worries at all, I've been there plenty of times - both "fake" and real ones (most recently finding my RAM had gone bad, just got ECC).