Bug 265635 - clang frontend command failed with exit code 139
Summary: clang frontend command failed with exit code 139
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-05 05:31 UTC by Tim Bell
Modified: 2022-10-30 00:35 UTC (History)
1 user (show)

See Also:


Attachments
code_generator-74cbda.sh build script (3.05 KB, application/x-shellscript)
2022-08-05 05:31 UTC, Tim Bell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Bell 2022-08-05 05:31:30 UTC
Created attachment 235686 [details]
code_generator-74cbda.sh build script

cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -D_THREAD_SAFE -fPIC -I. -Igrpc_root -Igrpc_root/include -Ithird_party/protobuf/src -I/r/py3_venv/StarlinkRemote/include -I/usr/local/include/python3.9 -c third_party/protobuf/src/google/protobuf/compiler/code_generator.cc -o build/temp.freebsd-13.1-RELEASE-amd64-3.9/third_party/protobuf/src/google/protobuf/compiler/code_generator.o -std=c++11
  PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.    Program arguments: /usr/bin/cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -D_THREAD_SAFE -fPIC -I. -Igrpc_root -Igrpc_root/include -Ithird_party/protobuf/src -I/r/py3_venv/StarlinkRemote/include -I/usr/local/include/python3.9 -c third_party/protobuf/src/google/protobuf/compiler/code_generator.cc -o build/temp.freebsd-13.1-RELEASE-amd64-3.9/third_party/protobuf/src/google/protobuf/compiler/code_generator.o -std=c++11
  1.    /usr/include/c++/v1/__utility/pair.h:183:9: current parser token ':'
  2.    /usr/include/c++/v1/__utility/pair.h:28:1 <Spelling=/usr/include/c++/v1/__config:806:37>: parsing namespace 'std'
  3.    /usr/include/c++/v1/__utility/pair.h:28:1 <Spelling=/usr/include/c++/v1/__config:806:60>: parsing namespace 'std::__1'
  4.    /usr/include/c++/v1/__utility/pair.h:42:1: parsing struct/union/class body 'std::pair'
   #0 0x00000000048a7860 (/usr/bin/cc+0x48a7860)
   #1 0x00000000048a5cd5 (/usr/bin/cc+0x48a5cd5)
   #2 0x0000000004842033 (/usr/bin/cc+0x4842033)
   #3 0x0000000805be8580 (/lib/libthr.so.3+0x1a580)
   #4 0x0000000805be7b3f (/lib/libthr.so.3+0x19b3f)
   #5 0x00007fffffffe8a3 ([vdso]+0x2d3)
   #6 0x0000000805e877aa memcpy (/lib/libc.so.7+0x1577aa)
   #7 0x00000000048a9651 (/usr/bin/cc+0x48a9651)
   #8 0x0000000004849d33 (/usr/bin/cc+0x4849d33)
   #9 0x000000000238fef9 (/usr/bin/cc+0x238fef9)
  #10 0x000000000484a8fc (/usr/bin/cc+0x484a8fc)
  #11 0x000000000238f065 (/usr/bin/cc+0x238f065)
  #12 0x00000000032e69f7 (/usr/bin/cc+0x32e69f7)
  #13 0x00000000032e895f (/usr/bin/cc+0x32e895f)
  #14 0x00000000032e777c (/usr/bin/cc+0x32e777c)
  #15 0x00000000033ce5a5 (/usr/bin/cc+0x33ce5a5)
  #16 0x00000000030db052 (/usr/bin/cc+0x30db052)
  #17 0x00000000030a855b (/usr/bin/cc+0x30a855b)
  #18 0x00000000030c31af (/usr/bin/cc+0x30c31af)
  #19 0x00000000030c24c9 (/usr/bin/cc+0x30c24c9)
  #20 0x00000000030a6421 (/usr/bin/cc+0x30a6421)
  #21 0x00000000030a9855 (/usr/bin/cc+0x30a9855)
  #22 0x00000000030a3861 (/usr/bin/cc+0x30a3861)
  #23 0x00000000030a08c8 (/usr/bin/cc+0x30a08c8)
  #24 0x000000000307deec (/usr/bin/cc+0x307deec)
  #25 0x00000000030c3449 (/usr/bin/cc+0x30c3449)
  #26 0x00000000030c24c9 (/usr/bin/cc+0x30c24c9)
  #27 0x00000000030c1e37 (/usr/bin/cc+0x30c1e37)
  #28 0x000000000307d165 (/usr/bin/cc+0x307d165)
  #29 0x00000000030363c6 (/usr/bin/cc+0x30363c6)
  #30 0x0000000003099a2b (/usr/bin/cc+0x3099a2b)
  #31 0x00000000030995a2 (/usr/bin/cc+0x30995a2)
  #32 0x000000000307d3b0 (/usr/bin/cc+0x307d3b0)
  #33 0x00000000030363c6 (/usr/bin/cc+0x30363c6)
  #34 0x0000000003099a2b (/usr/bin/cc+0x3099a2b)
  #35 0x00000000030995a2 (/usr/bin/cc+0x30995a2)
  #36 0x000000000307d1d0 (/usr/bin/cc+0x307d1d0)
  #37 0x00000000030363c6 (/usr/bin/cc+0x30363c6)
  #38 0x0000000003035157 (/usr/bin/cc+0x3035157)
  #39 0x0000000003030edd (/usr/bin/cc+0x3030edd)
  #40 0x0000000002b509b6 (/usr/bin/cc+0x2b509b6)
  #41 0x0000000002ad68e6 (/usr/bin/cc+0x2ad68e6)
  #42 0x0000000002bf3827 (/usr/bin/cc+0x2bf3827)
  #43 0x0000000002215070 (/usr/bin/cc+0x2215070)
  #44 0x0000000002221ac5 (/usr/bin/cc+0x2221ac5)
  #45 0x00000000029ac907 (/usr/bin/cc+0x29ac907)
  #46 0x0000000004841dca (/usr/bin/cc+0x4841dca)
  #47 0x00000000029ac585 (/usr/bin/cc+0x29ac585)
  #48 0x000000000297f8e1 (/usr/bin/cc+0x297f8e1)
  #49 0x000000000297fd1f (/usr/bin/cc+0x297fd1f)
  #50 0x0000000002992c8c (/usr/bin/cc+0x2992c8c)
  cc: error: clang frontend command failed with exit code 139 (use -v to see invocation)
  FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
  Target: x86_64-unknown-freebsd13.1
  Thread model: posix
  InstalledDir: /usr/bin
  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/code_generator-74cbda.cpp
  cc: note: diagnostic msg: /tmp/code_generator-74cbda.sh
  cc: note: diagnostic msg:

  ********************
  error: command '/usr/bin/cc' failed with exit code 139
Comment 1 Tim Bell 2022-08-05 05:39:00 UTC
This happened while building 
   'grpc_tools._protoc_compiler' extension
deep inside 'pip3 install -vvv -r src/python/requirements.txt' for this project: https://github.com/jim-olsen/StarlinkRemote

The source file /tmp/code_generator-74cbda.cpp is 7.9MBytes, so it is too large to attach here.
I can provide it offline if useful.
Comment 2 Tim Bell 2022-08-05 05:41:50 UTC
% /usr/bin/cc --version
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2022-08-05 08:32:24 UTC
(In reply to Tim Bell from comment #1)
The code_generator-74cbda.cpp file is essential to be able to reproduce, so please compress it, and upload it somewhere. :)
Comment 4 Tim Bell 2022-08-05 14:29:24 UTC
Please clone this repo to get a copy of code_generator-74cbda.cpp:
https://github.com/eizai9xis/clang_265635

Let me know if I can provide anything else.
Comment 5 Tim Bell 2022-08-05 14:37:07 UTC
Sorry - running the code_generator-74cbda.sh build script on that source file does not crash.

I only see the crash when running the full blown 'pip3 install -vvv -r src/python/requirements.txt'

I'm working to understand this and provide a smaller test case.
Comment 6 Tim Bell 2022-10-30 00:35:53 UTC
Closing the report.  I could not reproduce this.