How to track EXC_BAD_ACCESS (SIGSEGV) error?

1

I got this crash when debugging my project using Xcode, but I cannot find the way to resolve this issue. The app itself didn't force close, but my xcode stop debugging when this problem showing.

I've tested on another mac (same Xcode version) and it do same thing (debugger crash, xcode stop the running scheme, but program still working well)

[edit] Crashed at thread 9... It says RPC Packet thread for client tid.

Did somebody knows how to fix this LLDB issues?

Process:               lldb-rpc-server [26238]
Path:                  /Applications/Xcode.app/Contents/SharedFrameworks/LLDBRPC.framework/Versions/A/Resources/lldb-rpc-server
Identifier:            lldb-rpc-server
Version:               2
Code Type:             X86-64 (Native)
Parent Process:        Xcode [25226]
Responsible:           lldb-rpc-server [26238]
User ID:               502

Date/Time:             2019-01-07 13:59:04.891 +0700
OS Version:            Mac OS X 10.14.2 (18C54)
Report Version:        12
Anonymous UUID:        DFDE5FA9-F39E-DDB4-691F-47C516638843

Sleep/Wake UUID:       09F2CF9F-64A5-4E4A-8E46-1D9DA965A8C6

Time Awake Since Boot: 21000 seconds
Time Since Wake:       2300 seconds

System Integrity Protection: enabled

Crashed Thread:        8  RPC packet thread for client tid 00051d9b (335259)

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

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

VM Regions Near 0x282f26cb8:
    mapped file            000000018261f000-0000000182628000 [   36K] rw-/rwx SM=COW  Object_id=eafb807
--> 
    STACK GUARD            000070000d9fe000-000070000d9ff000 [    4K] ---/rwx SM=NUL  stack guard for thread 1

Thread 0:: Connection::RunLoop() packet reading thread  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff63408e5e read + 10
1   lldb-rpc-server                 0x0000000108dd0f37 rpc_common::RPCConnectionSocket::Read(std::__1::basic_string<unsigned char, std::__1::char_traits<unsigned char>, std::__1::allocator<unsigned char> >&, bool) + 173
2   lldb-rpc-server                 0x0000000108dd7ab7 rpc_common::Connection::ReceivePacket(rpc_common::RPCPacket&) + 149
3   lldb-rpc-server                 0x0000000108dd75c0 rpc_common::Connection::RunLoop() + 152
4   lldb-rpc-server                 0x0000000108e19bfe main + 494
5   libdyld.dylib                   0x00007fff632cded9 start + 1

Thread 1:: RPC packet thread for client tid 00051d27 (335143)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 2:: lldb.debugger.io-handler
0   libsystem_kernel.dylib          0x00007fff63408122 __read_nocancel + 10
1   libsystem_c.dylib               0x00007fff6335c87b _sread + 16
2   libsystem_c.dylib               0x00007fff6335bed1 __srefill1 + 24
3   libsystem_c.dylib               0x00007fff63355824 fgets + 98
4   com.apple.LLDB.framework        0x000000010d1b1c75 lldb_private::IOHandlerEditline::GetLine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool&) + 405
5   com.apple.LLDB.framework        0x000000010d1b210d lldb_private::IOHandlerEditline::Run() + 153
6   com.apple.LLDB.framework        0x000000010d075ad2 lldb_private::Debugger::ExecuteIOHandlers() + 68
7   com.apple.LLDB.framework        0x000000010d0787ba lldb_private::Debugger::IOHandlerThread(void*) + 14
8   com.apple.LLDB.framework        0x000000010d2bf3ef lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105
9   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
10  libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
11  libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 3:
0   libsystem_pthread.dylib         0x00007fff634c03f8 start_wqthread + 0
1   ???                             0x0000000054485244 0 + 1414025796

Thread 4:
0   libsystem_kernel.dylib          0x00007fff6340717a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff634076d0 mach_msg + 60
2   com.apple.CoreFoundation        0x00007fff3608d0c2 __CFRunLoopServiceMachPort + 337
3   com.apple.CoreFoundation        0x00007fff3608c611 __CFRunLoopRun + 1654
4   com.apple.CoreFoundation        0x00007fff3608bd48 CFRunLoopRunSpecific + 463
5   com.apple.CoreFoundation        0x00007fff3608bb54 CFRunLoopRun + 40
6   com.apple.DebugSymbols          0x00007fff4b5d909b SpotlightQueryThread(void*) + 475
7   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
8   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
9   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 5:: <lldb.process.gdb-remote.async>
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   com.apple.LLDB.framework        0x000000010d087d71 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>&) + 195
4   com.apple.LLDB.framework        0x000000010d088019 lldb_private::Listener::GetEvent(std::__1::shared_ptr<lldb_private::Event>&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&) + 33
5   com.apple.LLDB.framework        0x000000010d20f181 lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(void*) + 281
6   com.apple.LLDB.framework        0x000000010d2bf3ef lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105
7   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
8   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
9   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 6:: <lldb.process.internal-state(pid=0)>
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   com.apple.LLDB.framework        0x000000010d087d71 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>&) + 195
4   com.apple.LLDB.framework        0x000000010d088019 lldb_private::Listener::GetEvent(std::__1::shared_ptr<lldb_private::Event>&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&) + 33
5   com.apple.LLDB.framework        0x000000010d2ec3c1 lldb_private::Process::RunPrivateStateThread(bool) + 189
6   com.apple.LLDB.framework        0x000000010d2ebea6 lldb_private::Process::PrivateStateThread(void*) + 22
7   com.apple.LLDB.framework        0x000000010d2bf3ef lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105
8   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
9   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
10  libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 7:: RPC packet thread for client tid 0004f416 (324630)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 8 Crashed:: RPC packet thread for client tid 00051d9b (335259)
0   libsystem_platform.dylib        0x00007fff634b5d89 _platform_memmove$VARIANT$Haswell + 169
1   com.apple.LLDB.framework        0x000000010d0db549 lldb_private::Value::GetValueAsData(lldb_private::ExecutionContext*, lldb_private::DataExtractor&, unsigned int, lldb_private::Module*) + 1549
2   com.apple.LLDB.framework        0x000000010d0e8778 lldb_private::ValueObjectChild::UpdateValue() + 1100
3   com.apple.LLDB.framework        0x000000010d0dd23a lldb_private::ValueObject::UpdateValueIfNeeded(bool) + 646
4   com.apple.LLDB.framework        0x000000010d0de59d lldb_private::ValueObject::ResolveValue(lldb_private::Scalar&) + 43
5   com.apple.LLDB.framework        0x000000010d0e110d lldb_private::ValueObject::GetValueAsUnsigned(unsigned long long, bool*) + 75
6   com.apple.LLDB.framework        0x000000010d3e9750 lldb_private::formatters::swift::Data_SummaryProvider(lldb_private::ValueObject&, lldb_private::Stream&, lldb_private::TypeSummaryOptions const&) + 192
7   com.apple.LLDB.framework        0x000000010d4e375c lldb_private::CXXFunctionSummaryFormat::FormatObject(lldb_private::ValueObject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 98
8   com.apple.LLDB.framework        0x000000010d0df30a lldb_private::ValueObject::GetSummaryAsCString(lldb_private::TypeSummaryImpl*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 202
9   com.apple.LLDB.framework        0x000000010d0df404 lldb_private::ValueObject::GetSummaryAsCString(lldb::LanguageType) + 200
10  com.apple.LLDB.framework        0x000000010d244837 lldb_private::formatters::swift::SwiftOptionalSummaryProvider::FormatObject(lldb_private::ValueObject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 85
11  com.apple.LLDB.framework        0x000000010d0df30a lldb_private::ValueObject::GetSummaryAsCString(lldb_private::TypeSummaryImpl*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 202
12  com.apple.LLDB.framework        0x000000010d0df404 lldb_private::ValueObject::GetSummaryAsCString(lldb::LanguageType) + 200
13  com.apple.LLDB.framework        0x000000010a1889e8 lldb::SBValue::GetSummary() + 72
14  lldb-rpc-server                 0x0000000108e15a5f rpc_server::_ZN4lldb7SBValue10GetSummaryEv::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 35
15  lldb-rpc-server                 0x0000000108dd673f rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 469
16  lldb-rpc-server                 0x0000000108dd74e0 rpc_common::Connection::HandleRPCPacket(rpc_common::RPCPacket&) + 62
17  lldb-rpc-server                 0x0000000108ddaf12 Packets::ProcessPackets() + 256
18  lldb-rpc-server                 0x0000000108ddad95 Packets::ReadThread() + 289
19  lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
20  libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
21  libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
22  libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 9:: RPC packet thread for client tid 00051c0a (334858)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 10:: RPC packet thread for client tid 00051da9 (335273)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 11:: RPC packet thread for client tid 00051ef3 (335603)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 12:: RPC packet thread for client tid 00051ef4 (335604)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 13:: RPC packet thread for client tid 0005219b (336283)
0   libsystem_kernel.dylib          0x00007fff6340a7de __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff634c4593 _pthread_cond_wait + 724
2   libc++.1.dylib                  0x00007fff609a3bda std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   lldb-rpc-server                 0x0000000108ddadb5 Packets::ReadThread() + 321
4   lldb-rpc-server                 0x0000000108ddac6f Packets::RunReadThread(void*) + 9
5   libsystem_pthread.dylib         0x00007fff634c1305 _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff634c426f _pthread_start + 70
7   libsystem_pthread.dylib         0x00007fff634c0415 thread_start + 13

Thread 8 crashed with X86 Thread State (64-bit):
  rax: 0x00007f9a0adb3f80  rbx: 0x00007f9a0adb3f80  rcx: 0x0000000000000008  rdx: 0x0000000000000000
  rdi: 0x00007f9a0adb3f80  rsi: 0x0000000282f26cb8  rbp: 0x0000700010393470  rsp: 0x0000700010393470
   r8: 0x0000000000000000   r9: 0x0000000000000009  r10: 0x0000000000000001  r11: 0x00007f9787e8d2c8
  r12: 0x0000000000000008  r13: 0x0000000000000000  r14: 0x00007f9a087296a8  r15: 0x00007000103935d0
  rip: 0x00007fff634b5d89  rfl: 0x0000000000010246  cr2: 0x0000000282f26cb8

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

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 12059
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=413.7M resident=0K(0%) swapped_out_or_unallocated=413.7M(100%)
Writable regions: Total=1.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.3G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        2 
Dispatch continuations            8192K        2 
Kernel Alloc Once                    8K        2 
MALLOC                             1.2G      388 
MALLOC guard page                   16K        5 
MALLOC_LARGE (reserved)           2088K        3         reserved VM address space (unallocated)
STACK GUARD                       56.1M       15 
Stack                             90.0M       60 
VM_ALLOCATE                       7756K       21 
VM_ALLOCATE (reserved)            2816K       12         reserved VM address space (unallocated)
__DATA                            20.7M      207 
__FONT_DATA                          4K        2 
__LINKEDIT                       233.0M       18 
__TEXT                           180.7M      207 
__UNICODE                          564K        2 
mapped file                        1.2G     1307 
shared memory                      592K        7 
===========                     =======  ======= 
TOTAL                              3.0G     2243 
TOTAL, minus reserved VM space     3.0G     2243 
ios
iphone
swift
xcode
lldb
asked on Stack Overflow Jan 7, 2019 by Ricardo Milos • edited Jan 8, 2019 by Ricardo Milos

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0