r354673: compiler error: error: unable to execute command: Segmentation fault (core dumped) cpp: error:

From: O. Hartmann <ohartmann_at_walstatt.org>
Date: Wed, 13 Nov 2019 07:50:41 +0100
Trying to buildworld and/or buildkernel fails after upgrading 13-CURRENT today
to FreeBSD 13.0-CURRENT #25 r354673: Wed Nov 13 06:47:48 CET 2019 amd64.

After a "make -j8 cleanworld cleandir" (trying to circumvent the problem) I
still face the ccp error shown below rendering the system impossible to compile
a world or kernel!

Below you'll finde /etc/src.conf (we compile with -O3 and CPUTYPE=native),
additionally you'll find the initial dmesg part showing the CPU type.

The box is relatively new and a real troublemaker under FreeBSD at the moment,
as jails stopping/starting seem to trigger reprudicable crashes, but that is an
other story.

How to fix this desaster?

Thanks in advance and kind regards,

oh

[...]
--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; INSTALL="sh /usr/src/tools/install.sh"
TOOLS_PREFIX=/usr/obj/usr/src/amd64.amd64/tmp
PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin
 WORLDTMP=/usr/obj/usr/src/amd64.amd64/tmp  MAKEFLAGS="-m
/usr/src/tools/build/mk  -m /usr/src/share/mk" make  -f Makefile.inc1  DESTDIR=
 OBJTOP='/usr/obj/usr/src/amd64.amd64/tmp/obj-tools'  OBJROOT='${OBJTOP}/'
MAKEOBJDIRPREFIX=  BOOTSTRAPPING=1300056  BWPHASE=legacy  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_RETPOLINE=no MK_TESTS=no  MK_INCLUDES=yes MK_LLVM_TARGET_ALL=no
legacy [Creating objdir /usr/obj/usr/src/amd64.amd64/tmp/obj-tools...] ===>
tools/build (obj,includes,all,install) [Creating objdir
/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/tools/build...] sh
/usr/src/tools/install.sh  -C -o root -g wheel -m 444  /usr/src/sys/sys/nv.h
/usr/src/sys/sys/cnv.h /usr/src/sys/sys/dnv.h
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include/sys/ sh
/usr/src/tools/install.sh  -C -o root -g wheel -m 444
/usr/src/lib/libcasper/services/cap_fileargs/cap_fileargs.h
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include/casper/ cc  -O2 -pipe -O3
-DNDEBUG -MD  -MF.depend.dummy.o -MTdummy.o -std=gnu99 -Wno-format-zero-length
-Qunused-arguments   -I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -c
/usr/src/tools/build/dummy.c -o dummy.o building static egacy library ar -crD
libegacy.a `NM='nm' NMFLAGS=''  lorder dummy.o  | tsort -q` ranlib -D
libegacy.a sh /usr/src/tools/install.sh  -C -o root -g wheel -m 444
libegacy.a /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib/ mkdir -p
/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin
/usr/obj/usr/src/amd64.amd64/tmp/legacy/lib/casper
/usr/obj/usr/src/amd64.amd64/tmp/legacy/lib/geom
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include/casper
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include/private/zstd
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib ln -sfn bin
/usr/obj/usr/src/amd64.amd64/tmp/legacy/sbin ln -sfn ../bin
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin ln -sfn ../bin
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin mkdir -p
"/usr/obj/usr/src/amd64.amd64/tmp/legacy//usr/include/sys" mkdir -p
"/usr/obj/usr/src/amd64.amd64/tmp/legacy//usr/include/casper" ===> lib/libnv
(obj,includes,all,install) [Creating objdir
/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libnv...] cc  -O2 -pipe -O3
-I/usr/src/lib/libnv -DNDEBUG -MD  -MF.depend.cnvlist.o -MTcnvlist.o -std=gnu99
-Wno-format-zero-length  -Qunused-arguments
-I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -c
/usr/src/sys/contrib/libnv/cnvlist.c -o cnvlist.o Stack dump: 0.      Program
arguments: /usr/bin/cpp -cc1 -triple x86_64-unknown-freebsd13.0 -emit-obj
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name
cnvlist.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libnv/cnvlist.gcno -resource-dir
/usr/lib/clang/9.0.0 -dependency-file .depend.cnvlist.o -sys-header-deps -MT
cnvlist.o -I /usr/src/lib/libnv -D NDEBUG -I
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -O3 -Wno-format-zero-length
-std=gnu99 -fdebug-compilation-dir
/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libnv -ferror-limit 19
-fmessage-length 313 -fobjc-runtime=gnustep -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o cnvlist.o -x c
/usr/src/sys/contrib/libnv/cnvlist.c 1.      <eof> parser at end of file 2.
 Code generation #0 0x00000000036a3fce (/usr/bin/cpp+0x36a3fce) #1
0x00000000036a1e8a (/usr/bin/cpp+0x36a1e8a) #2 0x00000000036a4976
(/usr/bin/cpp+0x36a4976) #3 0x00000008048707d0 (/lib/libthr.so.3+0x147d0) cpp:
error: unable to execute command: Segmentation fault (core dumped) cpp: error:
clang frontend command failed due to signal (use -v to see invocation) FreeBSD
clang version 9.0.0 (tags/RELEASE_900/final 372316) (based on LLVM 9.0.0)
Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin
cpp: 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. cpp: note: diagnostic msg:
********************

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

********************
*** Error code 254

Stop.
make[3]: stopped in /usr/src/lib/libnv
*** Error code 1

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

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
[...]





[... /etc/src.conf ...]
#
CPUTYPE?=                               native
#
CFLAGS+=                                -O3
COPTFLAGS+=                             -O3
#
WITH_CLANG_EXTRAS=                      YES
WITH_LLDB=                              YES
#WITH_BSD_GREP=                         YES
#
WITH_OFED=                              YES
WITH_NAND=                              YES
#WITH_CTF=                              YES
#
WITH_BEARSSL=                           YES
#
WITH_SVN=                               YES
#
WITH_SORT_THREADS=                      YES
#
MALLOC_PRODUCTION=                      YES
#
WITHOUT_ASSERT_DEBUG=                   YES
WITHOUT_DEBUG_FILES=                    YES
WITHOUT_TESTS=                          YES
#
WITHOUT_REPRODUCIBLE_BUILD=             YES
#
#  mitigation for CVE-2017-5715 in the kernel build
#WITH_RETPOLINE=                                YES
#
KERNCONF=                               GENERIC-NODEBUG
#KERNCONF=                              GENERIC
KERNCONFDIR=                            /etc/config/amd64/kernel_conf
#
PORTS_MODULES=
#PORTS_MODULES+=emulators/virtualbox-ose-kmod
#PORTS_MODULES+=emulators/virtualbox-ose-additions


[...]


---<<BOOT>>---
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #25 r354673: Wed Nov 13 06:47:48 CET 2019
    root_at_sb211:/usr/obj/usr/src/amd64.amd64/sys/SB211
amd64 FreeBSD clang version 9.0.0 (tags/RELEASE_900/final 372316) (based on
LLVM 9.0.0) VT(efifb): resolution 1280x1024
CPU microcode: updated from 0x5000029 to 0x500002c
CPU: Intel(R) Xeon(R) Gold 5217 CPU _at_ 3.00GHz (2993.05-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x50657  Family=0x6  Model=0x55  Stepping=7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffefbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended
Features=0xd39ffffb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,NFPUSG,MPX,PQE,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,AVX512CD,AVX512BW,AVX512VL>
Structured Extended Features2=0x808<PKU,AVX512VNNI> Structured Extended
Features3=0xbc000400<MD_CLEAR,IBPB,STIBP,L1DFL,ARCH_CAP,SSBD> XSAVE
Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
IA32_ARCH_CAPS=0xab<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO,TSX_CTRL> VT-x:
PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr TSC: P-state invariant, performance
statistics real memory  = 68719476736 (65536 MB)
avail memory = 66361274368 (63287 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <FUJ    D3383-B1>
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
Security policy loaded: MAC/ntpd (mac_ntpd)
ioapic0 <Version 2.0> irqs 0-23
ioapic1 <Version 2.0> irqs 24-31
ioapic2 <Version 2.0> irqs 32-39
ioapic3 <Version 2.0> irqs 40-47
ioapic4 <Version 2.0> irqs 48-55
Launching APs: 1 6 11 9 10 13 2 7 15 8 5 14 3 4 12
Timecounter "TSC-low" frequency 1496526241 Hz quality 1000
random: entropy device external interface
kbd0 at kbdmux0
000.000077 [4336] netmap_init               netmap: loaded module
nexus0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS>
cryptosoft0: <software crypto>
acpi0: <FUJ D3383-B1>
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> numa-domain 0 on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x74-0x77 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 350
Event timer "HPET1" frequency 24000000 Hz quality 340
Event timer "HPET2" frequency 24000000 Hz quality 340
Event timer "HPET3" frequency 24000000 Hz quality 340
Event timer "HPET4" frequency 24000000 Hz quality 340
Event timer "HPET5" frequency 24000000 Hz quality 340
Event timer "HPET6" frequency 24000000 Hz quality 340
Event timer "HPET7" frequency 24000000 Hz quality 340
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x508-0x50b on acpi0
acpi_syscontainer0: <System Container> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff numa-domain 0 on acpi0
pci0: <ACPI PCI bus> numa-domain 0 on pcib0
ioat0: <SKX IOAT> mem 0x78ffff2c000-0x78ffff2ffff at device 4.0 numa-domain 0
on pci0 ioat0: Capabilities:
f0006f1<DMA_with_DIF,PQ,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat1: <SKX IOAT> mem 0x78ffff28000-0x78ffff2bfff at device 4.1 numa-domain 0
on pci0 ioat1: Capabilities:
f0006f1<DMA_with_DIF,PQ,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat2: <SKX IOAT> mem 0x78ffff24000-0x78ffff27fff at device 4.2 numa-domain 0
on pci0 ioat2: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat3: <SKX IOAT> mem 0x78ffff20000-0x78ffff23fff at device 4.3 numa-domain 0
on pci0 ioat3: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat4: <SKX IOAT> mem 0x78ffff1c000-0x78ffff1ffff at device 4.4 numa-domain 0
on pci0 ioat4: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat5: <SKX IOAT> mem 0x78ffff18000-0x78ffff1bfff at device 4.5 numa-domain 0
on pci0 ioat5: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat6: <SKX IOAT> mem 0x78ffff14000-0x78ffff17fff at device 4.6 numa-domain 0
on pci0 ioat6: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break>
ioat7: <SKX IOAT> mem 0x78ffff10000-0x78ffff13fff at device 4.7 numa-domain 0
on pci0 ioat7: Capabilities:
f0004f1<DMA_with_DIF,Extended_APIC_ID,Block_Fill,Move_CRC,DCA,Page_Break> pci0:
<dasp, performance counters> at device 8.1 (no driver attached) pci0: <unknown>
at device 17.0 (no driver attached) pci0: <unknown> at device 17.1 (no driver
attached) ahci0: <Intel Lewisburg AHCI SATA controller> port
0x3070-0x3077,0x3060-0x3063,0x3020-0x303f mem
0xaac06000-0xaac07fff,0xaac09000-0xaac090ff,0xaab80000-0xaabfffff at device
17.5 numa-domain 0 on pci0 ahci0: AHCI v1.31 with 2 6Gbps ports, Port
Multiplier not supported ahcich0: <AHCI channel> at channel 0 on ahci0 ahcich1:
<AHCI channel> at channel 1 on ahci0 ahciem0: <AHCI enclosure management
bridge> on ahci0 xhci0: <Intel Lewisburg USB 3.0 controller> mem
bridge> 0x78ffff00000-0x78ffff0ffff at device 20.0 numa-domain 0 on pci0 xhci0:
bridge> 32 bytes context size, 64-bit DMA usbus0 numa-domain 0 on xhci0 usbus0:
bridge> 5.0Gbps Super Speed USB v3.0 pci0: <simple comms> at device 22.0 (no
bridge> driver attached) pci0: <simple comms> at device 22.1 (no driver
bridge> attached) pci0: <simple comms> at device 22.4 (no driver attached)
bridge> ahci1: <Intel Lewisburg AHCI SATA controller> port
bridge> 0x3050-0x3057,0x3040-0x3043,0x3000-0x301f mem
bridge> 0xaac04000-0xaac05fff,0xaac08000-0xaac080ff,0xaab00000-0xaab7ffff at
bridge> device 23.0 numa-domain 0 on pci0
ahci1: AHCI v1.31 with 8 6Gbps ports, Port Multiplier not supported
Received on Wed Nov 13 2019 - 05:51:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:22 UTC