Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid debug info crashes dsymutil (NULL DIE) #46447

Closed
kornelski opened this issue Dec 2, 2017 · 5 comments
Closed

Invalid debug info crashes dsymutil (NULL DIE) #46447

kornelski opened this issue Dec 2, 2017 · 5 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kornelski
Copy link
Contributor

kornelski commented Dec 2, 2017

I'm experiencing frequent cashes of llvm-dsymutil when building Rust projects with debug info (cargo build).

The LLVM bug report for the crash itself concludes that it's fault of invalid debug information provided, with NULL DIE.

crash report
Process:               llvm-dsymutil [5564]
Path:                  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-dsymutil
Identifier:            llvm-dsymutil
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        rustc [5548]
Responsible:           llvm-dsymutil [5564]
User ID:               502

Date/Time: 2017-12-02 13:31:13.712 +0000
OS Version: Mac OS X 10.13.2 (17C85a)
Report Version: 12
Anonymous UUID: BE4D029C-8263-04EE-616C-0AF80B0DF90B

Sleep/Wake UUID: 248C95AA-42C4-4D9D-8256-3866A8A665C2

Time Awake Since Boot: 5400 seconds
Time Since Wake: 4100 seconds

System Integrity Protection: disabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]

VM Regions Near 0:
-->
__TEXT 0000000105d94000-0000000106fe3000 [ 18.3M] r-x/rwx SM=COW /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-dsymutil

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dsymutil 0x0000000105db1dfa llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1066
1 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
2 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
3 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
4 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
5 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
6 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
7 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
8 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
9 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
10 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
11 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
12 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
13 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
14 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
15 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
16 dsymutil 0x0000000105db1da4 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 980
17 dsymutil 0x0000000105db2022 llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1618
18 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
19 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
20 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
21 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
22 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
23 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
24 dsymutil 0x0000000105db216f llvm::dsymutil::(anonymous namespace)::DwarfLinker::lookForDIEsToKeep(llvm::dsymutil::(anonymous namespace)::DwarfLinker::RelocationManager&, llvm::DWARFDie const&, llvm::dsymutil::DebugMapObject const&, llvm::dsymutil::(anonymous namespace)::CompileUnit&, unsigned int) + 1951
25 dsymutil 0x0000000105dad484 llvm::dsymutil::(anonymous namespace)::DwarfLinker::link(llvm::dsymutil::DebugMap const&) + 14964
26 dsymutil 0x0000000105da92aa llvm::dsymutil::linkDwarf(llvm::StringRef, llvm::dsymutil::DebugMap const&, llvm::dsymutil::LinkOptions const&) + 2762
27 dsymutil 0x0000000105d98f75 main + 8421
28 libdyld.dylib 0x00007fff6656b115 start + 1

Thread 1:
0 libsystem_kernel.dylib 0x00007fff666bacee __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff667f7662 _pthread_cond_wait + 732
2 libc++.1.dylib 0x00007fff645a0cb0 std::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 18
3 dsymutil 0x000000010645143b std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, llvm::ThreadPool::ThreadPool(unsigned int)::$_0> >(void*, void*) + 203
4 libsystem_pthread.dylib 0x00007fff667f66c1 _pthread_body + 340
5 libsystem_pthread.dylib 0x00007fff667f656d _pthread_start + 377
6 libsystem_pthread.dylib 0x00007fff667f5c5d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x000000000000d7be rdx: 0x00007ffee9e67330
rdi: 0x00007ffee9e6a270 rsi: 0x00007ffee9e6a180 rbp: 0x00007ffee9e67220 rsp: 0x00007ffee9e67090
r8: 0x00007fa346a85590 r9: 0x00007fa3478cc73c r10: 0x0000000000000007 r11: 0x00007fa3478cb000
r12: 0x00007fa344c5a1e0 r13: 0x00007fa346a85590 r14: 0x00007ffee9e6a180 r15: 0x00007ffee9e67330
rip: 0x0000000105db1dfa rfl: 0x0000000000010202 cr2: 0x0000000000000000

Logical CPU: 0
Error Code: 0x00000004
Trap Number: 14

rustc 1.24.0-nightly (bb42071 2017-12-01)
Apple LLVM version 9.0.0 (clang-900.0.39)
Default target: x86_64-apple-darwin17.3.0

@kornelski
Copy link
Contributor Author

Also bt command in lldb fails with:

error: libdssim-ba9a10f9cbbeb53e.rlib(dssim-ba9a10f9cbbeb53e.std-panic.volatile.rcgu.o) DWARF DIE at 0x000021dd (class closure) has a member variable 0x000021e4 (__0) whose type is a forward declaration, not a complete definition.

@pietroalbini pietroalbini added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Jan 23, 2018
@michaeleiselsc
Copy link

+1 for having this issue

@sfackler sfackler added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Mar 9, 2018
@rocallahan
Copy link

rocallahan commented Apr 6, 2018

libxul.so in image.tar.bz2 in the Linux Firefox build here https://tools.taskcluster.net/groups/HvVI2bceT4qJ71SN6rZo0A/tasks/BSJE8VonQuKKq1SJMK2Q8A/runs/0/artifacts may have the same issue. The rust compilation unit at debuginfo offset 0x396207cc contains

< 9><0x000be2ff>                    DW_TAG_inlined_subroutine
                                     DW_AT_abstract_origin       <0x0064dfea>

but 0x0064dfea is beyond the end of the compilation unit.

@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 6, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Dec 19, 2022

visiting for wg-debugging triage

does anyone know if this is still a problem?

@pnkfelix
Copy link
Member

closing based on weak inference that this was resolved by #46772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants