Skip to content

Instantly share code, notes, and snippets.

@DavidGoldman
Created October 12, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidGoldman/a14feb7e1a0ae1fbfd8f795fd758722b to your computer and use it in GitHub Desktop.
Save DavidGoldman/a14feb7e1a0ae1fbfd8f795fd758722b to your computer and use it in GitHub Desktop.
lldb Xcode 12 slow with Swift to set breakpoint
Process: lldb-rpc-server [56121]
UUID: 61A1DE53-7A76-34D3-98A7-1B1D3C343A42
Path: /Applications/Xcode_12.app/Contents/SharedFrameworks/LLDBRPC.framework/Versions/A/Resources/lldb-rpc-server
Architecture: x86_64
Parent: Xcode [55994]
Responsible: Xcode [55994]
UID: 253939
Footprint: 1368.31 MB -> 1528.83 MB (+160.52 MB)
Pageins: 148 pages
Start time: 2020-10-12 13:16:49 -0400
End time: 2020-10-12 13:16:59 -0400
Num samples: 999 (1-999)
CPU Time: 9.777s (38.6G cycles, 54.5G instructions, 0.71c/i)
Note: 1 idle work queue thread omitted
Thread 0x45c02 DispatchQueue "com.apple.main-thread"(1) Thread name "Connection::RunLoop() packet reading thread" 999 samples (1-999) priority 31 (base 31)
999 start + 1 (libdyld.dylib + 109769) [0x7fff6840ccc9]
999 main + 470 (lldb-rpc-server + 14390) [0x103582836]
999 rpc_common::Connection::RunLoop() + 253 (lldb-rpc-server + 395149) [0x1035df78d]
999 rpc_common::Connection::ReceivePacket(rpc_common::RPCPacket&) + 229 (lldb-rpc-server + 396485) [0x1035dfcc5]
999 read + 10 (libsystem_kernel.dylib + 6174) [0x7fff6854e81e]
*999 hndl_unix_scall64 + 22 (kernel + 791046) [0xffffff80002c1206]
*999 unix_syscall64 + 647 (kernel + 7883751) [0xffffff8000984be7]
*999 read_nocancel + 138 (kernel + 6949402) [0xffffff80008a0a1a]
*999 ??? (kernel + 6950114) [0xffffff80008a0ce2]
*999 soreceive + 2281 (kernel + 7162249) [0xffffff80008d4989]
*999 sbwait + 226 (kernel + 7207138) [0xffffff80008df8e2]
*999 ??? (kernel + 6844968) [0xffffff8000887228]
*999 lck_mtx_sleep + 112 (kernel + 1226960) [0xffffff800032b8d0]
*999 thread_block_reason + 175 (kernel + 1289487) [0xffffff800033ad0f]
*999 ??? (kernel + 1295569) [0xffffff800033c4d1]
*999 machine_switch_context + 200 (kernel + 2365544) [0xffffff8000441868]
Thread 0x45c0d 999 samples (1-999) priority 20 (base 20)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 SpotlightQueryThread(void*) + 483 (DebugSymbols + 8211) [0x7fff4844b013]
999 CFRunLoopRun + 40 (CoreFoundation + 1090697) [0x7fff2e425489]
999 CFRunLoopRunSpecific + 462 (CoreFoundation + 532030) [0x7fff2e39ce3e]
999 __CFRunLoopRun + 1319 (CoreFoundation + 534978) [0x7fff2e39d9c2]
999 __CFRunLoopServiceMachPort + 247 (CoreFoundation + 540405) [0x7fff2e39eef5]
999 mach_msg_trap + 10 (libsystem_kernel.dylib + 3578) [0x7fff6854ddfa]
*999 ipc_mqueue_receive_continue + 0 (kernel + 1032304) [0xffffff80002fc070]
Thread 0x45c31 Thread name "RPC packet thread for client tid 000452ff (283391)" 999 samples (1-999) priority 31 (base 31)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 Packets::RunReadThread(void*) + 9 (lldb-rpc-server + 405817) [0x1035e2139]
999 Packets::ReadThread() + 369 (lldb-rpc-server + 406193) [0x1035e22b1]
999 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18 (libc++.1.dylib + 34194) [0x7fff656df592]
999 __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff68550882]
*999 psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]
Thread 0x71e9d Thread name "lldb.debugger.io-handler" 999 samples (1-999) priority 31 (base 31)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 111 (LLDB + 2949167) [0x103a8702f]
999 lldb_private::Debugger::IOHandlerThread(void*) + 19 (LLDB + 2254931) [0x1039dd853]
999 lldb_private::Debugger::ExecuteIOHandlers() + 105 (LLDB + 2243593) [0x1039dac09]
999 lldb_private::IOHandlerEditline::Run() + 206 (LLDB + 2343678) [0x1039f32fe]
999 lldb_private::IOHandlerEditline::GetLine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool&) + 1327 (LLDB + 2341503) [0x1039f2a7f]
999 fgets + 98 (libsystem_c.dylib + 234732) [0x7fff684954ec]
999 __srefill1 + 24 (libsystem_c.dylib + 260422) [0x7fff6849b946]
999 __read_nocancel + 10 (libsystem_kernel.dylib + 9886) [0x7fff6854f69e]
*999 hndl_unix_scall64 + 22 (kernel + 791046) [0xffffff80002c1206]
*999 unix_syscall64 + 647 (kernel + 7883751) [0xffffff8000984be7]
*999 read_nocancel + 138 (kernel + 6949402) [0xffffff80008a0a1a]
*999 ??? (kernel + 6950114) [0xffffff80008a0ce2]
*999 ??? (kernel + 3792803) [0xffffff800059dfa3]
*999 spec_read + 797 (kernel + 3902077) [0xffffff80005b8a7d]
*999 ??? (kernel + 7021471) [0xffffff80008b239f]
*999 ttread + 1338 (kernel + 7011738) [0xffffff80008afd9a]
*999 ??? (kernel + 6844968) [0xffffff8000887228]
*999 lck_mtx_sleep + 112 (kernel + 1226960) [0xffffff800032b8d0]
*999 thread_block_reason + 175 (kernel + 1289487) [0xffffff800033ad0f]
*999 ??? (kernel + 1295569) [0xffffff800033c4d1]
*999 machine_switch_context + 200 (kernel + 2365544) [0xffffff8000441868]
Thread 0x7203e Thread name "<lldb.process.gdb-remote.async>" 999 samples (1-999) priority 31 (base 31)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 111 (LLDB + 2949167) [0x103a8702f]
999 lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(void*) + 341 (LLDB + 7039045) [0x103e6d845]
999 lldb_private::Listener::GetEvent(std::__1::shared_ptr<lldb_private::Event>&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&) + 30 (LLDB + 4622350) [0x103c1f80e]
999 lldb_private::Listener::GetEventInternal(lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb_private::Broadcaster*, lldb_private::ConstString const*, unsigned int, unsigned int, std::__1::shared_ptr<lldb_private::Event>&) + 459 (LLDB + 4621947) [0x103c1f67b]
999 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18 (libc++.1.dylib + 34194) [0x7fff656df592]
999 __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff68550882]
*999 psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]
Thread 0x72040 Thread name "<lldb.process.internal-state(pid=80713)>" 999 samples (1-999) priority 31 (base 31)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 111 (LLDB + 2949167) [0x103a8702f]
999 lldb_private::Process::PrivateStateThread(void*) + 21 (LLDB + 3934677) [0x103b779d5]
999 lldb_private::Process::RunPrivateStateThread(bool) + 203 (LLDB + 3935947) [0x103b77ecb]
999 lldb_private::Process::GetEventsPrivate(std::__1::shared_ptr<lldb_private::Event>&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, bool) + 227 (LLDB + 3902083) [0x103b6fa83]
999 lldb_private::Listener::GetEvent(std::__1::shared_ptr<lldb_private::Event>&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&) + 30 (LLDB + 4622350) [0x103c1f80e]
999 lldb_private::Listener::GetEventInternal(lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb_private::Broadcaster*, lldb_private::ConstString const*, unsigned int, unsigned int, std::__1::shared_ptr<lldb_private::Event>&) + 459 (LLDB + 4621947) [0x103c1f67b]
999 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18 (libc++.1.dylib + 34194) [0x7fff656df592]
999 __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff68550882]
*999 psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]
Thread 0x7214c Thread name "RPC packet thread for client tid 0007214b (467275)" 999 samples (1-999) priority 31 (base 31) cpu time 0.655s (2.6G cycles, 3.9G instructions, 0.66c/i)
999 thread_start + 15 (libsystem_pthread.dylib + 7051) [0x7fff6860cb8b]
999 _pthread_start + 148 (libsystem_pthread.dylib + 24841) [0x7fff68611109]
999 Packets::RunReadThread(void*) + 9 (lldb-rpc-server + 405817) [0x1035e2139]
999 Packets::ReadThread() + 314 (lldb-rpc-server + 406138) [0x1035e227a]
999 Packets::ProcessPackets() + 989 (lldb-rpc-server + 407277) [0x1035e26ed]
999 rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 1425 (lldb-rpc-server + 391873) [0x1035deac1]
999 rpc_server::_ZN4lldb8SBTarget26BreakpointCreateByLocationEPKcj::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 179 (lldb-rpc-server + 355363) [0x1035d5c23]
999 lldb::SBTarget::BreakpointCreateByLocation(char const*, unsigned int) + 341 (LLDB + 1356245) [0x1039021d5]
999 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int) + 511 (LLDB + 1357183) [0x10390257f]
999 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long) + 284 (LLDB + 1357644) [0x10390274c]
999 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long, lldb::SBFileSpecList&) + 381 (LLDB + 1358573) [0x103902aed]
999 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned int, unsigned long long, lldb::SBFileSpecList&) + 492 (LLDB + 1359436) [0x103902e4c]
999 lldb_private::Target::CreateBreakpoint(lldb_private::FileSpecList const*, lldb_private::FileSpec const&, unsigned int, unsigned int, unsigned long long, lldb_private::LazyBool, lldb_private::LazyBool, bool, bool, lldb_private::LazyBool) + 765 (LLDB + 4281613) [0x103bcc50d]
999 lldb_private::Target::CreateBreakpoint(std::__1::shared_ptr<lldb_private::SearchFilter>&, std::__1::shared_ptr<lldb_private::BreakpointResolver>&, bool, bool, bool) + 395 (LLDB + 4280779) [0x103bcc1cb]
999 lldb_private::Target::AddBreakpoint(std::__1::shared_ptr<lldb_private::Breakpoint>, bool) + 210 (LLDB + 4274866) [0x103bcaab2]
999 lldb_private::SearchFilter::Search(lldb_private::Searcher&) + 177 (LLDB + 2535137) [0x103a21ee1]
999 lldb_private::SearchFilter::DoModuleIteration(lldb_private::SymbolContext const&, lldb_private::Searcher&) + 342 (LLDB + 2535510) [0x103a22056]
999 lldb_private::BreakpointResolverFileLine::SearchCallback(lldb_private::SearchFilter&, lldb_private::SymbolContext&, lldb_private::Address*) + 233 (LLDB + 2161257) [0x1039c6a69]
999 lldb_private::CompileUnit::ResolveSymbolContext(lldb_private::FileSpec const&, unsigned int, bool, bool, lldb::SymbolContextItem, lldb_private::SymbolContextList&) + 1086 (LLDB + 3334494) [0x103ae515e]
999 lldb_private::Address::CalculateSymbolContext(lldb_private::SymbolContext*, lldb::SymbolContextItem) const + 203 (LLDB + 2199915) [0x1039d016b]
999 lldb_private::Module::ResolveSymbolContextForAddress(lldb_private::Address const&, lldb::SymbolContextItem, lldb_private::SymbolContext&, bool) + 409 (LLDB + 2421481) [0x103a062e9]
999 SymbolFileDWARFDebugMap::ResolveSymbolContext(lldb_private::Address const&, lldb::SymbolContextItem, lldb_private::SymbolContext&) + 523 (LLDB + 7704475) [0x103f0ff9b]
999 SymbolFileDWARF::ResolveSymbolContext(lldb_private::Address const&, lldb::SymbolContextItem, lldb_private::SymbolContext&) + 582 (LLDB + 7636758) [0x103eff716]
999 SymbolFileDWARF::ParseFunction(lldb_private::CompileUnit&, DWARFDIE const&) + 66 (LLDB + 7614210) [0x103ef9f02]
999 SymbolFileDWARF::GetTypeSystemForLanguage(lldb::LanguageType) + 167 (LLDB + 7607639) [0x103ef8557]
999 lldb_private::SymbolFile::GetTypeSystemForLanguage(lldb::LanguageType) + 52 (LLDB + 3656900) [0x103b33cc4]
999 lldb_private::Module::GetTypeSystemForLanguage(lldb::LanguageType) + 30 (LLDB + 2420302) [0x103a05e4e]
999 lldb_private::TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType, lldb_private::Module*, bool) + 450 (LLDB + 3722274) [0x103b43c22]
999 CreateTypeSystemInstance(lldb::LanguageType, lldb_private::Module*, lldb_private::Target*, char const*) + 24 (LLDB + 3503384) [0x103b0e518]
999 lldb_private::SwiftASTContext::CreateInstance(lldb::LanguageType, lldb_private::Module&, lldb_private::Target*, bool) + 9897 (LLDB + 3483401) [0x103b09709]
999 lldb_private::SwiftASTContext::ValidateSectionModules(lldb_private::Module&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 264 (LLDB + 3492120) [0x103b0b918]
999 lldb_private::SwiftASTContext::GetModule(lldb_private::SourceModule const&, lldb_private::Status&) + 725 (LLDB + 3506821) [0x103b0f285]
999 swift::ASTContext::getModuleByName(llvm::StringRef) + 420 (LLDB + 22578164) [0x104d3f3f4]
999 swift::MemoryBufferSerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 285 (LLDB + 18843757) [0x1049af86d]
999 swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, llvm::StringRef, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, bool) + 664 (LLDB + 18834776) [0x1049ad558]
999 swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1435 (LLDB + 18441931) [0x10494d6cb]
999 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>, bool) + 359 (LLDB + 18200791) [0x1049128d7]
999 swift::ASTContext::getModule(llvm::ArrayRef<swift::Located<swift::Identifier> >) + 244 (LLDB + 22577700) [0x104d3f224]
643 swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 452 (LLDB + 18843236) [0x1049af664]
643 swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, llvm::StringRef, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, bool) + 664 (LLDB + 18834776) [0x1049ad558]
643 swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1435 (LLDB + 18441931) [0x10494d6cb]
322 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>, bool) + 359 (LLDB + 18200791) [0x1049128d7]
322 swift::ASTContext::getModule(llvm::ArrayRef<swift::Located<swift::Identifier> >) + 244 (LLDB + 22577700) [0x104d3f224]
322 swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 452 (LLDB + 18843236) [0x1049af664]
322 swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, llvm::StringRef, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, bool) + 664 (LLDB + 18834776) [0x1049ad558]
322 swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1435 (LLDB + 18441931) [0x10494d6cb]
322 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>, bool) + 498 (LLDB + 18200930) [0x104912962]
322 swift::ClangImporter::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 75 (LLDB + 21422539) [0x104c251cb]
320 swift::ClangImporter::Implementation::loadModuleClang(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 543 (LLDB + 21420815) [0x104c24b0f]
320 swift::ClangImporter::Implementation::loadModuleClang(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >)::$_6::operator()(llvm::ArrayRef<std::__1::pair<clang::IdentifierInfo*, clang::SourceLocation> >, bool) const + 311 (LLDB + 21421479) [0x104c24da7]
320 clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::__1::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool) + 6065 (LLDB + 49870497) [0x1067466a1]
283 clang::CompilerInstance::findOrCompileModuleAndReadAST(llvm::StringRef, clang::SourceLocation, clang::SourceLocation, bool) + 5815 (LLDB + 49860903) [0x106744127]
277 compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, llvm::StringRef, clang::FrontendInputFile, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (clang::CompilerInstance&)>, llvm::function_ref<void (clang::CompilerInstance&)>) + 4135 (LLDB + 49883223) [0x106749857]
277 llvm::CrashRecoveryContext::RunSafelyOnThread(llvm::function_ref<void ()>, unsigned int) + 97 (LLDB + 8380737) [0x103fb5141]
277 llvm::llvm_execute_on_thread(void (*)(void*), void*, llvm::Optional<unsigned int>) + 34 (LLDB + 8932626) [0x10403bd12]
277 llvm_execute_on_thread_impl(void* (*)(void*), void*, llvm::Optional<unsigned int>, (anonymous namespace)::JoiningPolicy) + 109 (LLDB + 8932749) [0x10403bd8d]
277 __ulock_wait + 10 (libsystem_kernel.dylib + 9566) [0x7fff6854f55e]
*194 ??? (kernel + 6990400) [0xffffff80008aaa40] (blocked by turnstile waiting for lldb-rpc-server [56121] thread 0x72258)
*83 ??? (kernel + 6990400) [0xffffff80008aaa40] (blocked by turnstile waiting for lldb-rpc-server [56121] thread 0x722d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment