Bug 257482 - buildworld: clang segfaults building 12.2-RELEASE sources on 12.1-p13
Summary: buildworld: clang segfaults building 12.2-RELEASE sources on 12.1-p13
Status: Closed Not Enough Information
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 12.2-RELEASE
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-29 01:54 UTC by Helio Luchtenberg Junior
Modified: 2021-08-02 04:17 UTC (History)
2 users (show)

See Also:


Attachments
/tmp/TGParser-038627.sh (5.21 KB, text/plain)
2021-07-29 02:26 UTC, Helio Luchtenberg Junior
no flags Details
second file gziped /tmp/TGParser-038627.cpp (592.70 KB, application/x-gzip)
2021-07-29 03:28 UTC, Helio Luchtenberg Junior
no flags Details
Second file gziped again for errors first time MD5 1b789bf7ca73922587d3e892642c803d (590.39 KB, application/x-gzip)
2021-07-29 23:53 UTC, Helio Luchtenberg Junior
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helio Luchtenberg Junior 2021-07-29 01:54:40 UTC
While compiling "make buildworld" (running FreeBSD 12.1-p13) inside "/usr/src" for version 12.2, trying to make the upgrade from 12.1-RELEASE-p13 to 12.2-RELEASE.

I can repeat this many times.  Won't attach two suggested files for now:
3872 -rw-r--r--  1 root  wheel  3903165 Jul 28 22:35 /tmp/TGParser-038627.cpp
   8 -rw-r--r--  1 root  wheel     5340 Jul 28 22:35 /tmp/TGParser-038627.sh

During "make buildworld" it stops and suggests me to fill a bug report, see:

--- TableGen/TGParser.o ---
c++: error: unable to execute command: Segmentation fault
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/TGParser-038627.cpp
c++: note: diagnostic msg: /tmp/TGParser-038627.sh
c++: note: diagnostic msg:

********************
*** [TableGen/TGParser.o] Error code 254
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-29 02:01:52 UTC
Thank you for your report. Could you attach the two files mentioned, and a full compressed build log please, or at least a larger portion of the tail of the build, thank you!
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-29 02:02:22 UTC
Full uname -a output would be great too, thank you
Comment 3 Helio Luchtenberg Junior 2021-07-29 02:26:42 UTC
Created attachment 226765 [details]
/tmp/TGParser-038627.sh

First file cited on msg:  /tmp/TGParser-038627.sh
Comment 4 Helio Luchtenberg Junior 2021-07-29 02:36:46 UTC
Second file cited on msg:  /tmp/TGParser-038627.cpp
it is too big for uploading.

More Information on this:

# uname -a
FreeBSD server00.hlj.com.br 12.1-RELEASE-p13 FreeBSD 12.1-RELEASE-p13 GENERIC  amd64

Complete cronology:

- first installed 12.1-RELEASE from USB
- ran "freebsd-update fetch/install" successfully
- git clone --branch releng/12.2 to "/usr/src.new"
- cd /usr/src.new; make buildworld
Then the compiling fails with the message below, compiling original "/usr/src" works perfectly:


Here are big part of the tail:

--- Target/Target.o ---
c++  -O2 -pipe -fno-common -I/usr/obj/usr/src-12.2-p13/amd64.amd64/tmp/obj-tools/lib/clang/libllvm -I/usr/src-12.2-p13/contrib/llvm-project/llvm/lib/Target/X86 -I/usr/src-12.2-p13/lib/clang/include -I/usr/src-12.2-p13/contrib/llvm-project/llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd12.2\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd12.2\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src-12.2-p13/amd64.amd64/tmp\" -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -gline-tables-only -MD -MF.depend.Target_Target.o -MTTarget/Target.o -Qunused-arguments -I/usr/obj/usr/src-12.2-p13/amd64.amd64/tmp/legacy/usr/include  -fno-exceptions -fno-rtti -gline-tables-only -std=c++14 -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src-12.2-p13/contrib/llvm-project/llvm/lib/Target/Target.cpp -o Target/Target.o
--- TableGen/TGParser.o ---
c++: error: unable to execute command: Segmentation fault
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/TGParser-038627.cpp
c++: note: diagnostic msg: /tmp/TGParser-038627.sh
c++: note: diagnostic msg:

********************
*** [TableGen/TGParser.o] Error code 254

make[4]: stopped in /usr/src-12.2-p13/lib/clang/libllvm
1 error

make[4]: stopped in /usr/src-12.2-p13/lib/clang/libllvm
*** [all_subdir_lib/clang/libllvm] Error code 2

make[3]: stopped in /usr/src-12.2-p13/lib/clang
1 error

make[3]: stopped in /usr/src-12.2-p13/lib/clang
*** [cross-tools] Error code 2

make[2]: stopped in /usr/src-12.2-p13
1 error

make[2]: stopped in /usr/src-12.2-p13
*** [_cross-tools] Error code 2

make[1]: stopped in /usr/src-12.2-p13
1 error

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

make: stopped in /usr/src-12.2-p13
1 error
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-29 02:41:09 UTC
(In reply to Helio Luchtenberg Junior from comment #4)

Can you compress both files together in a single archive?
Comment 6 Helio Luchtenberg Junior 2021-07-29 03:28:55 UTC
Created attachment 226766 [details]
second file gziped /tmp/TGParser-038627.cpp

The second file gziped /tmp/TGParser-038627.cpp
Comment 7 Dimitry Andric freebsd_committer 2021-07-29 22:05:09 UTC
(In reply to Helio Luchtenberg Junior from comment #6)
The .gz file is corrupt:

% gunzip TGParser-038627.cpp.gz
gunzip: data stream error
gunzip: TGParser-038627.cpp.gz: uncompress failed

Please recompress and reupload it.
Comment 8 Helio Luchtenberg Junior 2021-07-29 23:53:14 UTC
Created attachment 226790 [details]
Second file gziped again for errors first time MD5 1b789bf7ca73922587d3e892642c803d

Second file uploaded again for errors first time.
Comment 9 Helio Luchtenberg Junior 2021-07-30 17:33:47 UTC
I have checked all sources again, with the following command line:

# cd /usr/src.new
# git clone --branch releng/12.2 https://git.FreeBSD.org/src.git /usr/src.new
# make buildworld

there were differences (should?) in the sources, and this time it compiled correctly.  Will try finishing the upgrade and will post results here.
Comment 10 Helio Luchtenberg Junior 2021-08-01 05:17:05 UTC
After running normal upgrade procedures, got to successfully upgrade to:

FreeBSD server00.hlj.com.br 12.2-RELEASE-p9 FreeBSD 12.2-RELEASE-p9 #0 2430d82b40ea(releng/12.2)-dirty: Sat Jul 31 23:37:24 -03 2021     hlj@server00.hlj.com.br:/usr/obj/usr/src.again/amd64.amd64/sys/GENERIC  amd64

and everything that worked before is working now with the packages upgraded as well.

It is not up to me to decide over this but I strongly question about what is said about GIT, that it is scalable.

Question #1: How can it be scalable if when running "git clone ..." if network fails for some reason the connection drops and have to start everything from zero again.  How this can be considered "scalable".  Only for local networks with no network glitches I suppose.

Question #2:  Even worse than (1),  considering all the FreeBSD System sources they have approximately 1.4Gbytes of size.  But the "/.git/"  directory, containing things about GIT system, have almost 300% the size of the SOURCE ITSELF (3.3Gbytes) see:

root@server00:/usr # du -s src.again
4769400 src.again
root@server00:/usr # du -s src.again/.git
3347380 src.again/.git

How can this too be considered "scalable" if so much disk space is needed, curiously 3 times the size of the sources being managed.

I use FreeBSD since 2.2.1-RELEASE and still don't understand why CVS was abandoned in favor of GIT.

Anyway, the issue is solved now that I downloaded all the sources again since first issue appeared and now it worked.