Bug 241758 - devel/llvm90 fails to build on amd64: unable to execute command: Bus error (core dumped)
Summary: devel/llvm90 fails to build on amd64: unable to execute command: Bus error (c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-06 14:36 UTC by Edinilson
Modified: 2019-11-07 16:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edinilson 2019-11-06 14:36:06 UTC
/usr/bin/c++  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clang-tidy/readability -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/readability -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/include -Itools/clang/include -Iinclude -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/include -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include    -fno-exceptions -MD -MT tools/clang/tools/extra/clang-tidy/readability/CMakeFiles/obj.clangTidyReadabilityModule.dir/StaticDefinitionInAnonymousNamespaceCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/readability/CMakeFiles/obj.clangTidyReadabilityModule.dir/StaticDefinitionInAnonymousNamespaceCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/readability/CMakeFiles/obj.clangTidyReadabilityModule.dir/StaticDefinitionInAnonymousNamespaceCheck.cpp.o -c /usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
c++: error: unable to execute command: Bus error (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/StaticDefinitionInAnonymousNamespaceCheck-1851a4.cpp
c++: note: diagnostic msg: /tmp/StaticDefinitionInAnonymousNamespaceCheck-1851a4.sh
c++: note: diagnostic msg:

********************
[2436/5188] /usr/bin/c++  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clang-tidy/openmp -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/openmp -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/include -Itools/clang/include -Iinclude -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/include -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include    -fno-exceptions -MD -MT tools/clang/tools/extra/clang-tidy/openmp/CMakeFiles/obj.clangTidyOpenMPModule.dir/UseDefaultNoneCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/openmp/CMakeFiles/obj.clangTidyOpenMPModule.dir/UseDefaultNoneCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/openmp/CMakeFiles/obj.clangTidyOpenMPModule.dir/UseDefaultNoneCheck.cpp.o -c /usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/openmp/UseDefaultNoneCheck.cpp
[2437/5188] /usr/bin/c++  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clang-tidy/performance -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/performance -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/include -Itools/clang/include -Iinclude -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/include -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include    -fno-exceptions -MD -MT tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/FasterStringFindCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/FasterStringFindCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/FasterStringFindCheck.cpp.o -c /usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/performance/FasterStringFindCheck.cpp
[2438/5188] /usr/bin/c++  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clang-tidy/performance -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/performance -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/include -Itools/clang/include -Iinclude -I/usr/ports/devel/llvm90/work/llvm-9.0.0.src/include -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include    -fno-exceptions -MD -MT tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/ForRangeCopyCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/ForRangeCopyCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/performance/CMakeFiles/obj.clangTidyPerformanceModule.dir/ForRangeCopyCheck.cpp.o -c /usr/ports/devel/llvm90/work/llvm-9.0.0.src/tools/clang/tools/extra/clang-tidy/performance/ForRangeCopyCheck.cpp
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/llvm90
*** Error code 1
Comment 1 Brooks Davis freebsd_committer 2019-11-06 18:08:29 UTC
This looks to be a crash in the base system compiler.  I've not seen other reports so that suggests either a particularly uncommon set of make.conf flags, port OPTIONS, or a hardware problem.  Without the reproducer source (/tmp/StaticDefinitionInAnonymousNamespaceCheck-1851a4.*) there isn't much we can do to help.
Comment 2 Edinilson 2019-11-06 18:20:56 UTC
(In reply to Brooks Davis from comment #1)

I have these files in /tmp. How can I upload it for you because they have more than 1000 kb each?
Comment 3 Brooks Davis freebsd_committer 2019-11-06 18:23:55 UTC
They should compress fairly well so I'd start with xz compression.

That being said, could you check `dmesg` and make sure you don't see any entries about clang?

Also, can you post the output of `uname -a` (feel free to redact the host name)?
Comment 4 Edinilson 2019-11-06 18:38:43 UTC
Nov  6 09:27:02 freefire kernel: pid 56566 (c++), jid 0, uid 0: exited on signal 11 (core dumped)
Nov  6 09:41:58 freefire kernel: pid 64271 (conftest), jid 0, uid 0: exited on signal 11 (core dumped)
Nov  6 11:07:52 freefire kernel: pid 24805 (c++), jid 0, uid 0: exited on signal 10 (core dumped)


FreeBSD xxxxxx 12.1-RELEASE FreeBSD 12.1-RELEASE r354358 FIREWALL  amd64
Comment 5 Edinilson 2019-11-06 18:39:22 UTC
(In reply to Brooks Davis from comment #3)

dmesg -a | grep clang
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Comment 6 Edinilson 2019-11-06 18:59:21 UTC
(In reply to Edinilson from comment #2)

StaticDefinitionInAnonymousNamespaceCheck-1851a4.cpp.gz +- 1.9mb
StaticDefinitionInAnonymousNamespaceCheck-1851a4.cpp.gz +- 2kb
Comment 7 Brooks Davis freebsd_committer 2019-11-06 22:31:31 UTC
I copied the StaticDefinitionInAnonymousNamespaceCheck-1851a4.* files you emailed me to a freshly updated 12.1 amd64 system and the .sh file ran the compiler to completion without crashing.  If you run "cd /tmp; sh StaticDefinitionInAnonymousNamespaceCheck-1851a4.sh" does it crash reliably?
Comment 8 Edinilson 2019-11-07 11:27:06 UTC
(In reply to Brooks Davis from comment #7)

This server was upgraded from 12.0 RELEASE to 12.1 RELEASE using source.

cd/tmp/
:/tmp # sh StaticDefinitionInAnonymousNamespaceCheck-1851a4.sh
:/tmp #

finished without errors
Comment 9 Edinilson 2019-11-07 14:23:55 UTC
(In reply to Edinilson from comment #8)

Can I remove llvm9 ?
Comment 10 Brooks Davis freebsd_committer 2019-11-07 16:20:05 UTC
It seems virtual certain that you have a hardware problem based on the reproducer not reproducing reliably.
Comment 11 Edinilson 2019-11-07 16:42:41 UTC
(In reply to Brooks Davis from comment #10)

Do you want a ssh access?