Skip to content

Instantly share code, notes, and snippets.

@tapthaker
Last active June 15, 2022 00:25
Show Gist options
  • Save tapthaker/85690c39508e2c313e94d8a32e41cb94 to your computer and use it in GitHub Desktop.
Save tapthaker/85690c39508e2c313e94d8a32e41cb94 to your computer and use it in GitHub Desktop.
LLD Crashes
# THe following are intermittent LLD crashes that we ran into. They seem to be due to the thread's stack overflowing.
# We came up with this hypothesis because increasing the pthread's stack size seems to fix these or us:
# Patch: https://gist.github.com/tapthaker/e9fef745c84f7663731c6ae285991aca
Stack dump:
0. Program arguments: /private/var/tmp/_bazel_ios/execroot/__main__/external/lld_archive/ld64.lld @/var/folders/gm/w0c7fl0j3jn8dkxvllqdr8k00000gn/T/response-b9041c.txt
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x000000010d337efa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x000000010d336c38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x000000010d3385f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff80c8dae2d _sigtramp + 29
4 libsystem_platform.dylib 0x00000000003ac1ff _sigtramp + 18446603370374173679
5 ld64.lld 0x000000010d6620d5 void lld::macho::writeResult() + 20645
6 ld64.lld 0x000000010d65c11d void lld::macho::writeResult() + 381
7 ld64.lld 0x000000010d5f54da lld::macho::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 35754
8 ld64.lld 0x000000010d1cc20d main + 3149
9 ld64.lld 0x000000010d1cb7c1 main + 513
10 dyld 0x0000000119cf44fe start + 462
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Error in child process 'external/lld_uber_toolchain/linker/clang++'. 254
external/lld_uber_toolchain/wrapped_clang_pp: line 45: 36532 Abort trap: 6
Stack dump:
0 ld64.lld 0x000000010dfd9efa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x000000010dfd8c38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x000000010dfda5f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff807fbce2d _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370446991856
5 ld64.lld 0x000000010e2aa163 lld::macho::TrieBuilder::build() + 67
6 ld64.lld 0x000000010e2e65c3 lld::macho::ExportSection::finalizeContents() + 451
7 ld64.lld 0x000000010e312988 void lld::macho::writeResult() + 80216
8 ld64.lld 0x000000010df6f581 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) + 1057
9 ld64.lld 0x000000010df70023 llvm::ThreadPool::~ThreadPool() + 371
10 libsystem_pthread.dylib 0x00007ff807fa74f4 _pthread_start + 125
11 libsystem_pthread.dylib 0x00007ff807fa300f thread_start + 15
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Error in child process 'external/lld_uber_toolchain/linker/clang++'. 254
external/lld_uber_toolchain/wrapped_clang_pp: line 45: 7674 Abort trap: 6 "${cmd[@]}"
Stack dump:
0. Program arguments: /private/var/tmp/_bazel_ios/execroot/__main__/external/lld_archive/ld64.lld @/var/folders/76/djp7wlj11yv3q9gcrs3g7rb40000gn/T/response-c263fc.txt
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x000000010d03aefa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x000000010d039c38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x000000010d03b5f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff815cb0e2d _sigtramp + 29
4 libsystem_platform.dylib 0x00007ff7b3033ba0 _sigtramp + 18446744072052288912
5 ld64.lld 0x000000010d34a296 lld::macho::StringTableSection::writeTo(unsigned char*) const + 70
6 ld64.lld 0x000000010d3666f0 void lld::macho::writeResult() + 26304
7 ld64.lld 0x000000010d35fea8 void lld::macho::writeResult() + 3848
8 ld64.lld 0x000000010d2f84da lld::macho::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 35754
9 ld64.lld 0x000000010cecf20d main + 3149
10 ld64.lld 0x000000010cece7c1 main + 513
11 dyld 0x000000011ca4e4fe start + 462
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Error in child process 'external/lld_uber_toolchain/linker/clang++'. 254
external/lld_uber_toolchain/wrapped_clang_pp: line 45: 47741 Abort trap: 6
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x00000001033b4efa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x00000001033b3c38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x00000001033b55f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff8180f3e2d _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370177282544
5 ld64.lld 0x00000001056bbae9 llvm::DWARFDebugInfoEntry::extractFast(llvm::DWARFUnit const&, unsigned long long*, llvm::DWARFDataExtractor const&, unsigned long long, unsigned int) + 105
6 ld64.lld 0x00000001056e961f llvm::DWARFUnit::extractDIEsToVector(bool, bool, std::__1::vector>&) const + 431
7 ld64.lld 0x00000001056e9d96 llvm::DWARFUnit::tryExtractDIEsIfNeeded(bool) + 134
8 ld64.lld 0x00000001056e92db llvm::DWARFUnit::getCompilationDir() + 43
9 ld64.lld 0x00000001036c2330 lld::macho::SymtabSection::emitBeginSourceStab(llvm::DWARFUnit*) + 48
10 ld64.lld 0x00000001036c352c lld::macho::SymtabSection::emitStabs() + 1484
11 ld64.lld 0x00000001036c3b1d lld::macho::SymtabSection::finalizeContents() + 637
12 ld64.lld 0x00000001036ed988 void lld::macho::writeResult() + 80216
13 ld64.lld 0x000000010334a581 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) + 1057
14 ld64.lld 0x000000010334b023 llvm::ThreadPool::~ThreadPool() + 371
15 libsystem_pthread.dylib 0x00007ff8180de4f4 _pthread_start + 125
16 libsystem_pthread.dylib 0x00007ff8180da00f thread_start + 15
clang: error: unable to execute command: Segmentation fault: 11
Stack dump:
0. Program arguments: /private/var/tmp/_bazel_ios/execroot/__main__/external/lld_archive/ld64.lld @/var/folders/5g/qbm2ckv12g95gdgx9rcq8yz40000gn/T/response-f48710.txt
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x0000000103118efa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x0000000103117c38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x00000001031195f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff81fee5e2d _sigtramp + 29
4 libsystem_platform.dylib 0x00000000001edb4f _sigtramp + 18446603370047241535
5 ld64.lld 0x0000000103403bb5 lld::macho::ConcatInputSection::writeTo(unsigned char*) + 101
6 ld64.lld 0x00000001033c76a4 lld::macho::TextOutputSection::writeTo(unsigned char*) const + 148
7 ld64.lld 0x00000001034446f0 void lld::macho::writeResult() + 26304
8 ld64.lld 0x000000010343dea8 void lld::macho::writeResult() + 3848
9 ld64.lld 0x00000001033d64da lld::macho::link(llvm::ArrayRef, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 35754
10 ld64.lld 0x0000000102fad20d main + 3149
11 ld64.lld 0x0000000102fac7c1 main + 513
12 dyld 0x0000000113be04fe start + 462
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Error in child process 'external/lld_uber_toolchain/linker/clang++'. 254
external/lld_uber_toolchain/wrapped_clang_pp: line 45: 75236 Abort trap: 6
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x0000000100d7fefa llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1 ld64.lld 0x0000000100d7ec38 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x0000000100d805f0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 816
3 libsystem_platform.dylib 0x00007ff81fee5e2d _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370045219312
5 ld64.lld 0x0000000100cf11ad llvm::parallelForEachN(unsigned long, unsigned long, llvm::function_ref) + 10077
6 ld64.lld 0x0000000100cf10ad llvm::parallelForEachN(unsigned long, unsigned long, llvm::function_ref) + 9821
7 ld64.lld 0x0000000100cefd3f llvm::parallelForEachN(unsigned long, unsigned long, llvm::function_ref) + 4847
8 ld64.lld 0x0000000100cefe01 llvm::parallelForEachN(unsigned long, unsigned long, llvm::function_ref) + 5041
9 libsystem_pthread.dylib 0x00007ff81fed04f4 _pthread_start + 125
10 libsystem_pthread.dylib 0x00007ff81fecc00f thread_start + 15
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
Error in child process 'external/lld_uber_toolchain/linker/clang++'. 254
external/lld_uber_toolchain/wrapped_clang_pp: line 45: 58576 Abort trap: 6 "${cmd[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment