Bug 224174 - cc: error: unable to execute command: segmentation fault
Summary: cc: error: unable to execute command: segmentation fault
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-08 12:14 UTC by ofriedman
Modified: 2021-10-05 19:21 UTC (History)
3 users (show)

See Also:


Attachments
.cc and .sh files (510.00 KB, application/gzip)
2017-12-08 12:14 UTC, ofriedman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ofriedman 2017-12-08 12:14:50 UTC
Created attachment 188625 [details]
.cc and .sh files

$ sudo svn update /usr/src
Updating '.':
At revision 326690.

$ svn info /usr/src
Path: .
Working Copy Root Path: /usr/src
URL: https://svn.freebsd.org/base/releng/11.1
Relative URL: ^/releng/11.1
Repository Root: https://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 326690
Node Kind: directory
Schedule: normal
Last Changed Author: delphij
Last Changed Rev: 326360
Last Changed Date: 2017-11-29 02:41:39 -0500 (Wed, 29 Nov 2017)

$ uname -r
11.1-RELEASE-p1

$ sysctl hw.ncpu
hw.ncpu: 8

$ sudo make cleanworld
Password:
rm -rf /usr/obj/usr/src/*
chflags -R 0 /usr/obj/usr/src
rm -rf /usr/obj/usr/src/*

$ sudo make -j4 buildworld
--- buildworld ---
make[1]: "/usr/src/Makefile.inc1" line 158: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
--- buildworld_prologue ---
--------------------------------------------------------------
>>> World build started on Fri Dec  8 06:40:51 EST 2017
--------------------------------------------------------------
--- _worldtmp ---
--------------------------------------------------------------
>>> Rebuilding the temporary build tree
--------------------------------------------------------------
rm -rf /usr/obj/usr/src/tmp
rm -rf /usr/obj/usr/src/lib32
mkdir -p /usr/obj/usr/src/tmp/lib
mkdir -p /usr/obj/usr/src/tmp/lib/casper
mkdir -p /usr/obj/usr/src/tmp/usr
mkdir -p /usr/obj/usr/src/tmp/legacy/bin
mkdir -p /usr/obj/usr/src/tmp/legacy/usr
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.groff.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/tmp/legacy/usr/include >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/tmp/usr/include >/dev/null
ln -sf /usr/src/sys /usr/obj/usr/src/tmp
mtree -deU -f /usr/src/etc/mtree/BSD.debug.dist  -p /usr/obj/usr/src/tmp/legacy/usr/lib >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.debug.dist  -p /usr/obj/usr/src/tmp/usr/lib >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.lib32.dist  -p /usr/obj/usr/src/tmp/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.lib32.dist  -p /usr/obj/usr/src/tmp/legacy/usr/lib/debug/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.lib32.dist  -p /usr/obj/usr/src/tmp/usr/lib/debug/usr >/dev/null
mkdir -p /usr/obj/usr/src/tmp/usr/tests
mtree -deU -f /usr/src/etc/mtree/BSD.tests.dist  -p /usr/obj/usr/src/tmp/usr/tests >/dev/null
mkdir -p /usr/obj/usr/src/tmp/usr/lib/debug//usr/tests
mtree -deU -f /usr/src/etc/mtree/BSD.tests.dist  -p /usr/obj/usr/src/tmp/usr/lib/debug//usr/tests >/dev/null
--- _legacy ---
--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  TOOLS_PREFIX=/usr/obj/usr/src/tmp  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  MAKEFLAGS="-m /usr/src/tools/build/mk  -j 4 -J 15,16 -m /usr/src/share/mk" make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1101001  SSP_CFLAGS=  MK_HTML=no NO_LINT=yes MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FULL=no  MK_LLDB=no MK_TESTS=no  MK_INCLUDES=yes legacy
--- legacy ---
===> tools/build (obj,includes,all,install)
--- obj ---
/usr/obj/usr/src/tmp/usr/src/tools/build created for /usr/src/tools/build
--- dummy.o ---
cc  -O2 -pipe  -MD  -MF.depend.dummy.o -MTdummy.o -std=gnu99  -Qunused-arguments  -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/tools/build/dummy.c -o dummy.o
--- libegacy.a ---
building static egacy library
ar -crD libegacy.a `NM='nm' NMFLAGS='' lorder dummy.o  | tsort -q` 
ranlib -D libegacy.a
--- _libinstall ---
sh /usr/src/tools/install.sh  -C -o root -g wheel -m 444   libegacy.a /usr/obj/usr/src/tmp/legacy/usr/lib/
--- _bootstrap-tools ---
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  TOOLS_PREFIX=/usr/obj/usr/src/tmp  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  MAKEFLAGS="-m /usr/src/tools/build/mk  -j 4 -J 15,16 -m /usr/src/share/mk" make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1101001  SSP_CFLAGS=  MK_HTML=no NO_LINT=yes MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FULL=no  MK_LLDB=no MK_TESTS=no  MK_INCLUDES=yes bootstrap-tools
--- _bootstrap-tools-lib/clang/libllvmminimal ---
--- _bootstrap-tools-kerberos5/tools/make-roken ---
--- _bootstrap-tools-usr.bin/fortune/strfile ---
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- _bootstrap-tools-lib/clang/libllvmminimal ---
===> lib/clang/libllvmminimal (obj,all,install)
--- _bootstrap-tools-kerberos5/tools/make-roken ---
===> kerberos5/tools/make-roken (obj,all,install)
--- _bootstrap-tools-usr.bin/fortune/strfile ---
===> usr.bin/fortune/strfile (obj,all,install)
--- _bootstrap-tools-gnu/usr.bin/groff ---
===> gnu/usr.bin/groff (obj,all,install)
--- _bootstrap-tools-lib/clang/libllvmminimal ---
--- obj ---
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal created for /usr/src/lib/clang/libllvmminimal
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal/Support created for /usr/src/lib/clang/libllvmminimal
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal/TableGen created for /usr/src/lib/clang/libllvmminimal
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- obj_subdir_gnu/usr.bin/groff/contrib ---
===> gnu/usr.bin/groff/contrib (obj)
--- _bootstrap-tools-usr.bin/fortune/strfile ---
--- obj ---
--- _bootstrap-tools-kerberos5/tools/make-roken ---
--- obj ---
/usr/obj/usr/src/tmp/usr/src/kerberos5/tools/make-roken created for /usr/src/kerberos5/tools/make-roken
--- _bootstrap-tools-usr.bin/fortune/strfile ---
/usr/obj/usr/src/tmp/usr/src/usr.bin/fortune/strfile created for /usr/src/usr.bin/fortune/strfile
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- obj_subdir_gnu/usr.bin/groff/contrib/mm ---
===> gnu/usr.bin/groff/contrib/mm (obj)
--- _bootstrap-tools-kerberos5/tools/make-roken ---
--- make-roken.c ---
--- _bootstrap-tools-usr.bin/fortune/strfile ---
--- .depend ---
--- _bootstrap-tools-kerberos5/tools/make-roken ---
awk -f /usr/src/crypto/heimdal/lib/roken/roken.awk /usr/src/crypto/heimdal/lib/roken/roken.h.in > make-roken.c
--- _bootstrap-tools-usr.bin/fortune/strfile ---
echo strfile.full: /usr/lib/libc.a /usr/obj/usr/src/tmp/legacy/usr/lib/libegacy.a >> .depend
--- strfile.o ---
cc -O2 -pipe  -g -MD  -MF.depend.strfile.o -MTstrfile.o -std=gnu99  -Qunused-arguments  -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/usr.bin/fortune/strfile/strfile.c -o strfile.o
--- _bootstrap-tools-lib/clang/libllvmminimal ---
--- Support/APInt.o ---
c++  -O2 -pipe -I/usr/src/lib/clang/include -I/usr/src/contrib/llvm/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.1\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.1\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/tmp\" -ffunction-sections -fdata-sections -MD -MF.depend.Support_APInt.o -MTSupport/APInt.o -Qunused-arguments -I/usr/obj/usr/src/tmp/legacy/usr/include -std=c++11 -fno-exceptions -fno-rtti  -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src/contrib/llvm/lib/Support/APInt.cpp -o Support/APInt.o
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- obj ---
/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/groff/contrib/mm created for /usr/src/gnu/usr.bin/groff/contrib/mm
--- obj_subdir_gnu/usr.bin/groff/font ---
===> gnu/usr.bin/groff/font (obj)
--- obj_subdir_gnu/usr.bin/groff/font/devX100 ---
===> gnu/usr.bin/groff/font/devX100 (obj)
--- _bootstrap-tools-kerberos5/tools/make-roken ---
--- .depend ---
echo make-roken.full: /usr/lib/libc.a /usr/obj/usr/src/tmp/legacy/usr/lib/libegacy.a >> .depend
--- make-roken.o ---
cc -O2 -pipe  -DHAVE_CONFIG_H -I/usr/src/kerberos5/include -DHAVE_CONFIG_H -I/usr/src/kerberos5/include -g -MD  -MF.depend.make-roken.o -MTmake-roken.o -std=gnu99  -Qunused-arguments  -I/usr/obj/usr/src/tmp/legacy/usr/include -c make-roken.c -o make-roken.o
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- obj ---
/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/groff/font/devX100 created for /usr/src/gnu/usr.bin/groff/font/devX100
--- obj_subdir_gnu/usr.bin/groff/font/devX100-12 ---
===> gnu/usr.bin/groff/font/devX100-12 (obj)
--- _bootstrap-tools-usr.bin/fortune/strfile ---
cc: error: unable to execute command: Segmentation fault (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
cc: 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.
--- _bootstrap-tools-gnu/usr.bin/groff ---
--- obj ---
/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/groff/font/devX100-12 created for /usr/src/gnu/usr.bin/groff/font/devX100-12
--- obj_subdir_gnu/usr.bin/groff/font/devX75 ---
===> gnu/usr.bin/groff/font/devX75 (obj)
--- _bootstrap-tools-kerberos5/tools/make-roken ---
cc: error: unable to execute command: Segmentation fault (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
cc: 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.
--- _bootstrap-tools-usr.bin/fortune/strfile ---
cc: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/strfile-4fe07a.c
cc: note: diagnostic msg: /tmp/strfile-4fe07a.sh
cc: note: diagnostic msg: 

********************
*** [strfile.o] Error code 254

make[3]: stopped in /usr/src/usr.bin/fortune/strfile
1 error

make[3]: stopped in /usr/src/usr.bin/fortune/strfile
*** [_bootstrap-tools-usr.bin/fortune/strfile] Error code 2

make[2]: stopped in /usr/src
--- _bootstrap-tools-gnu/usr.bin/groff ---
A failure has been detected in another branch of the parallel make

make[5]: stopped in /usr/src/gnu/usr.bin/groff/font/devX75
*** [obj_subdir_gnu/usr.bin/groff/font/devX75] Error code 2

make[4]: stopped in /usr/src/gnu/usr.bin/groff/font
1 error

make[4]: stopped in /usr/src/gnu/usr.bin/groff/font
*** [obj_subdir_gnu/usr.bin/groff/font] Error code 2

make[3]: stopped in /usr/src/gnu/usr.bin/groff
1 error

make[3]: stopped in /usr/src/gnu/usr.bin/groff
*** [_bootstrap-tools-gnu/usr.bin/groff] Error code 2

make[2]: stopped in /usr/src
--- _bootstrap-tools-kerberos5/tools/make-roken ---
cc: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/make-roken-dff21e.c
cc: note: diagnostic msg: /tmp/make-roken-dff21e.sh
cc: note: diagnostic msg: 

********************
*** [make-roken.o] Error code 254

make[3]: stopped in /usr/src/kerberos5/tools/make-roken
1 error

make[3]: stopped in /usr/src/kerberos5/tools/make-roken
*** [_bootstrap-tools-kerberos5/tools/make-roken] Error code 2

make[2]: stopped in /usr/src
--- _bootstrap-tools-lib/clang/libllvmminimal ---
c++: error: unable to execute command: Abort trap (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.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/APInt-76ca10.cpp
c++: note: diagnostic msg: /tmp/APInt-76ca10.sh
c++: note: diagnostic msg: 

********************
*** [Support/APInt.o] Error code 254

make[3]: stopped in /usr/src/lib/clang/libllvmminimal
1 error

make[3]: stopped in /usr/src/lib/clang/libllvmminimal
*** [_bootstrap-tools-lib/clang/libllvmminimal] Error code 2

make[2]: stopped in /usr/src
4 errors

make[2]: stopped in /usr/src
*** [_bootstrap-tools] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
*** [buildworld] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2017-12-08 12:59:11 UTC
Clang 4.0.0 crash.  Does the toolchain list own the compiler, or just as/ld etc?
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2017-12-08 16:15:19 UTC
All your test cases compile just fine for me, with both clang 4.0.0, 5.0.0 and 5.0.1.  Are these segfaults repeatable?  If not, please test your hardware carefully, especially the RAM.
Comment 3 ofriedman 2017-12-09 01:52:04 UTC
(In reply to Conrad Meyer from comment #1)

I can't honestly say I know how to answer that. How would I be able to tell? I am trying to learn the build system currently, if there is a man page section or handbook section I should consult, I would happily do so.
Comment 4 ofriedman 2017-12-09 01:54:37 UTC
(In reply to Dimitry Andric from comment #2)

I am not sure if this is a precise answer to your question, but I have a similar error just now when I tried to build LLVM4.0 to reinstall it over the existing. 

cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)

I will test my hardware now.
Comment 5 Conrad Meyer freebsd_committer freebsd_triage 2017-12-09 04:14:51 UTC
(In reply to ofriedman from comment #3)
Wasn't a question for you, but for the toolchain list, who I had assigned the PR to. :-)
Comment 6 ofriedman 2017-12-09 22:42:06 UTC
(In reply to Dimitry Andric from comment #2)
It appears that rebooting my machine fixed whatever problem it was. I was able to #make buildworld ...
Comment 7 ofriedman 2017-12-09 22:43:20 UTC
(In reply to ofriedman from comment #6)
... actually it was a number of reboots - the first 2 times GDM wouldn't start nor X windows - something is possibly up with my hardware...
Comment 8 Dimitry Andric freebsd_committer freebsd_triage 2017-12-10 01:20:28 UTC
(In reply to ofriedman from comment #7)
> (In reply to ofriedman from comment #6)
> ... actually it was a number of reboots - the first 2 times GDM wouldn't
> start nor X windows - something is possibly up with my hardware...

I would suggest running memtest86+ for at least 5 passes or so.  If any RAM errors show up, please get those DIMMs replaced. :)
Comment 9 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:40:42 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.