[lldb-dev] Apple LLDB 900.0.64 crash

Greg Clayton via lldb-dev lldb-dev at lists.llvm.org
Thu Jan 18 12:59:36 PST 2018


This is a crash that is happening as we are trying to translate DWARF back into Clang ASTs. You can enable DWARF logging by doing:

(lldb) log enable -f /tmp/dwarf.log dwarf info

Or add that line to your ~/.lldbinit file.

Then make it crash and we will have a log of what was wrong and might have an idea of the type that is causing the problem. If you get this log, there should be a line from this code:

      dwarf->GetObjectFile()->GetModule()->LogMessage(
          log, "SymbolFileDWARF::ParseType (die = 0x%8.8x, decl_ctx = %p (die "
               "0x%8.8x)) %s name = '%s')",
          die.GetOffset(), static_cast<void *>(context),
          context_die.GetOffset(), die.GetTagAsCString(), die.GetName());

right before it crashed. It might help to reproduce a minimal example that can be used to fix this issue.

Remember to remove the "log enable" from your ~/.lldbinit file if you did add it, otherwise you will slow down debugging in future sessions.

Greg Clayton


> On Jan 18, 2018, at 6:08 AM, Johan Øverbye via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> Hi :)
> 
> I hope this is an appropriate use of this mailing list, my apologies if not. I couldn't find any form to report LLDB bugs and wasn't sure where to ask.
> 
> With a recent update of Xcode I started getting an LLDB crash frequently while attempting to debug. (Not sure exactly which Xcode release sadly.) Sometimes it occurs when the debugger pauses execution (e.g. due to an assertion failure), other times when I attempt to inspect certain variables.
> 
> Here's the call stack of the offending thread:
> 
> Thread 7 Crashed:: RPC packet thread for client tid 00007997 (31127)
> 0   com.apple.LLDB.framework      	0x0000000108f98157 clang::ClassTemplateSpecializationDecl::Create(clang::ASTContext&, clang::TagTypeKind, clang::DeclContext*, clang::SourceLocation, clang::SourceLocation, clang::ClassTemplateDecl*, llvm::ArrayRef<clang::TemplateArgument>, clang::ClassTemplateSpecializationDecl*) + 71
> 1   com.apple.LLDB.framework      	0x000000010a6fc39c lldb_private::ClangASTContext::CreateClassTemplateSpecializationDecl(clang::DeclContext*, clang::ClassTemplateDecl*, int, lldb_private::ClangASTContext::TemplateParameterInfos const&) + 308
> 2   com.apple.LLDB.framework      	0x000000010a546de4 DWARFASTParserClang::ParseTypeFromDWARF(lldb_private::SymbolContext const&, DWARFDIE const&, lldb_private::Log*, bool*) + 5890
> 3   com.apple.LLDB.framework      	0x000000010a6e2623 SymbolFileDWARF::ParseType(lldb_private::SymbolContext const&, DWARFDIE const&, bool*) + 171
> 4   com.apple.LLDB.framework      	0x000000010a6dc33f SymbolFileDWARF::GetTypeForDIE(DWARFDIE const&, bool) + 369
> 5   com.apple.LLDB.framework      	0x000000010a6dbc6e SymbolFileDWARF::ResolveType(DWARFDIE const&, bool, bool) + 68
> 6   com.apple.LLDB.framework      	0x000000010a6dbbed SymbolFileDWARF::ResolveTypeUID(unsigned long long) + 45
> 7   com.apple.LLDB.framework      	0x000000010a759942 lldb_private::Type::ResolveClangType(lldb_private::Type::ResolveStateTag) + 154
> 8   com.apple.LLDB.framework      	0x000000010a759604 lldb_private::Type::GetForwardCompilerType() + 26
> 9   com.apple.LLDB.framework      	0x000000010a59be5f lldb_private::ValueObjectVariable::GetCompilerTypeImpl() + 37
> 10  com.apple.LLDB.framework      	0x000000010a58cf67 lldb_private::ValueObject::MaybeCalculateCompleteType() + 39
> 11  com.apple.LLDB.framework      	0x000000010a5912dd lldb_private::ValueObject::GetObjectRuntimeLanguage() + 33
> 12  com.apple.LLDB.framework      	0x000000010a59167b lldb_private::ValueObject::IsRuntimeSupportValue() + 73
> 13  com.apple.LLDB.framework      	0x0000000107c5faec lldb::SBFrame::GetVariables(lldb::SBVariablesOptions const&) + 624
> 14  com.apple.LLDB.framework      	0x0000000107c5fda4 lldb::SBFrame::GetVariables(bool, bool, bool, bool, lldb::DynamicValueType) + 208
> 15  lldb-rpc-server               	0x0000000106220aef rpc_server::_ZN4lldb7SBFrame12GetVariablesEbbbbNS_16DynamicValueTypeE::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 219
> 16  lldb-rpc-server               	0x00000001061e662a rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 506
> 17  lldb-rpc-server               	0x00000001061e730c rpc_common::Connection::HandleRPCPacket(rpc_common::RPCPacket&) + 62
> 18  lldb-rpc-server               	0x00000001061ea862 Packets::ProcessPackets() + 254
> 19  lldb-rpc-server               	0x00000001061ea68b Packets::ReadThread() + 187
> 20  lldb-rpc-server               	0x00000001061ea5cb Packets::RunReadThread(void*) + 9
> 21  libsystem_pthread.dylib       	0x00007fff7b8906c1 _pthread_body + 340
> 22  libsystem_pthread.dylib       	0x00007fff7b89056d _pthread_start + 377
> 23  libsystem_pthread.dylib       	0x00007fff7b88fc5d thread_start + 13
> 
> The full LLDB crash dump can be downloaded here: https://www.dropbox.com/s/87tpcb31t10679z/lldb-rpc-server_2018-01-18-134410_Johans-MacBook-Pro.crash?dl=0 <https://www.dropbox.com/s/87tpcb31t10679z/lldb-rpc-server_2018-01-18-134410_Johans-MacBook-Pro.crash?dl=0>
> 
> The (Apple) LLDB version is lldb-900.0.64. Not sure whether/how this corresponds to "official" LLDB version numbers.
> 
> Unfortunately I'm unable to share the code for confidentiality reasons. I'll attempt to isolate the issue but I thought I'd ask here in case it's a known issue or the cause is obvious.
> 
> 
> Thanks,
> 
> Johan Øverbye
> 
> This message, including any attachments, may contain confidential or privileged information and is intended solely for the addressee. If you are not an intended recipient, please notify the sender and delete this message and any back-up copies from your systems. We love trees! Please do not print this email unless absolutely necessary, thank you. String Applied Technologies is a limited company registered in England and Wales. Registered number: 08962109. Registered office: The Bradfield Centre, 184, Cambridge Science Park Milton Road, Cambridge, Cambridgeshire, CB4 0GF, United Kingdom_______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180118/d5a24cf2/attachment-0001.html>


More information about the lldb-dev mailing list