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

GetLogLen crash求助 #456

Closed
BokiceLee opened this issue Sep 14, 2018 · 7 comments
Closed

GetLogLen crash求助 #456

BokiceLee opened this issue Sep 14, 2018 · 7 comments

Comments

@BokiceLee
Copy link

公司的几个项目都用了xlog打日志,每天都会出现少量的崩溃(参见以下崩溃信息),类似#204的问题,如果#204的问题是sdcard读写问题的话,iOS应该不会有这种情况发生吧。
目前本地复现不出crash,苦苦分析不出问题,只能来这里求助了。
(崩溃信息,与业务逻辑相关的信息已屏蔽,望谅解~)

NETWORK_TYPE:*
Incident Identifier: ***************
CrashReporter Key: ***************
Hardware Model: iPhone9,2
Process: applicationName [18***]
Path: /var/containers/Bundle/Application/*****/applicationName.app/applicationName
Identifier: com..applicationName
Version: ..
(
)
Code Type: ARM-64
Parent Process: ? [1]

Date/Time: 2018-09-13 11:37:17.000 +0800
OS Version: iOS 11.4 (15F79)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: 0x00000000 at 0x0000000104500000
Crashed Thread: 1

Thread 0:
0 libsystem_kernel.dylib 0x0000000180ad513c __psynch_mutexwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c78604 _pthread_mutex_lock_wait (in libsystem_pthread.dylib) + 96
2 libsystem_pthread.dylib 0x0000000180c78550 _pthread_mutex_lock_slow$VARIANT$mp (in libsystem_pthread.dylib) + 260
3 CoreFoundation 0x0000000180feb220 -[CFPrefsSearchListSource alreadylocked_copyDictionary] (in CoreFoundation) + 360
4 CoreFoundation 0x0000000180fe9524 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] (in CoreFoundation) + 88
5 CoreFoundation 0x000000018108689c -[CFPrefsSource copyValueForKey:] (in CoreFoundation) + 64
6 CoreFoundation 0x0000000181090a80 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke (in CoreFoundation) + 40
7 CoreFoundation 0x0000000180fecd6c __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke (in CoreFoundation) + 268
8 CoreFoundation 0x0000000180fec588 normalizeQuintuplet (in CoreFoundation) + 356
9 CoreFoundation 0x0000000180fecc54 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] (in CoreFoundation) + 108
10 CoreFoundation 0x0000000181090a18 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] (in CoreFoundation) + 124
11 CoreFoundation 0x00000001810932b4 _CFPreferencesCopyAppValueWithContainer (in CoreFoundation) + 116
12 Foundation 0x00000001819882fc -[NSUserDefaults(NSUserDefaults) objectForKey:] (in Foundation) + 52
...
22 UIKit 0x000000018af31758 UIApplicationMain (in UIKit) + 236
23 applicationName 0x0000000102f4d85c _main (in applicationName) (main.m:35)
24 libdyld.dylib 0x00000001809a5fc0 start (in libdyld.dylib) + 4

Thread 1 Crashed:
0 applicationName 0x0000000103151290 LogCrypt::GetLogLen (in applicationName) (log_crypt.cc:0)
1 applicationName 0x00000001037771b4 LogBuffer::Flush (in applicationName) (log_buffer.cc:79)
2 applicationName 0x0000000103773968 __async_log_thread (in applicationName) (appender.cc:506)
3 applicationName 0x00000001037768c8 Thread::start_routine (in applicationName) (thread.h:414)
4 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
5 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 2 name: com.apple.uikit.eventfetch-thread
Thread 2:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 Foundation 0x0000000181989674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 304
6 Foundation 0x000000018198951c -[NSRunLoop(NSRunLoop) runUntilDate:] (in Foundation) + 148
7 UIKit 0x000000018ac16768 -[UIEventFetcher threadMain] (in UIKit) + 136
8 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 3:
0 libsystem_kernel.dylib 0x0000000180ad5610 __semwait_signal (in libsystem_kernel.dylib) + 8
1 libsystem_c.dylib 0x00000001809ee12c nanosleep (in libsystem_c.dylib) + 212
2 libsystem_c.dylib 0x0000000180a56ef4 sleep (in libsystem_c.dylib) + 44
...
4 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
5 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 4:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
...
3 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
4 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 5:
...

Thread 6:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000180f64b28 CFRunLoopRun (in CoreFoundation) + 116
。。。
8 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 7:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000180f64b28 CFRunLoopRun (in CoreFoundation) + 116
...
8 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 8 name: com.apple.NSURLConnectionLoader
Thread 8:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CFNetwork 0x00000001818226e0 -[__CoreSchedulingSetRunnable runForever] (in CFNetwork) + 220
6 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
7 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x0000000180ad5538 select$DARWIN_EXTSN (in libsystem_kernel.dylib) + 8
1 CoreFoundation 0x0000000180fff378 __CFSocketManager (in CoreFoundation) + 644
2 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
3 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 10 name: com.apple.CoreMotion.MotionThread
Thread 10:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000180f64b28 CFRunLoopRun (in CoreFoundation) + 116
6 CoreMotion 0x00000001865099dc CLStartStopAdvertisingBeacon (in CoreMotion) + 231572
7 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 11:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000180f64b28 CFRunLoopRun (in CoreFoundation) + 116
...
8 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 12:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000180f64b28 CFRunLoopRun (in CoreFoundation) + 116
...
8 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 13:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
...
7 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 14:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
3 JavaScriptCore 0x000000018869b460 std::__1::condition_variable_any::wait<std::__1::unique_lockbmalloc::Mutex >() (in JavaScriptCore) + 104
4 JavaScriptCore 0x000000018869b074 bmalloc::Scavenger::threadRunLoop() (in JavaScriptCore) + 164
5 JavaScriptCore 0x000000018869ae1c bmalloc::Scavenger::Scavenger() (in JavaScriptCore) + 0
6 JavaScriptCore 0x000000018869b238 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(bmalloc::Scavenger), bmalloc::Scavenger*> >() (in JavaScriptCore) + 44
7 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 15 name: WebThread
Thread 15:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 WebCore 0x00000001891d62d0 RunWebThread() (in WebCore) + 592
6 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
7 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 16:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c2ec std::__1::condition_variable::__do_timed_wait() (in libc++.1.dylib) + 96
...
8 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 17:
0 libsystem_kernel.dylib 0x0000000180ad5538 select$DARWIN_EXTSN (in libsystem_kernel.dylib) + 8
...
5 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 18:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
...
7 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 19:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
...
8 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 20:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c2ec std::__1::condition_variable::__do_timed_wait() (in libc++.1.dylib) + 96
...
8 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 21:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
...
5 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 22:
0 libsystem_kernel.dylib 0x0000000180ad50f4 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018018c25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
...
9 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 23:
0 libsystem_pthread.dylib 0x0000000180c73b04 start_wqthread (in libsystem_pthread.dylib) + 0

Thread 24:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 libxpc.dylib 0x0000000180cc4750 xpc_pipe_routine (in libxpc.dylib) + 316
3 libxpc.dylib 0x0000000180cb45cc _xpc_interface_routine (in libxpc.dylib) + 204
4 libxpc.dylib 0x0000000180cb4b8c _xpc_look_up_endpoint (in libxpc.dylib) + 224
5 libxpc.dylib 0x0000000180cada3c _xpc_connection_bootstrap_look_up_slow (in libxpc.dylib) + 200
6 libxpc.dylib 0x0000000180cad778 _xpc_connection_init (in libxpc.dylib) + 532
7 libxpc.dylib 0x0000000180cad554 _xpc_connection_resume_init (in libxpc.dylib) + 20
8 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
9 libdispatch.dylib 0x0000000180947b84 _dispatch_queue_override_invoke$VARIANT$mp (in libdispatch.dylib) + 716
10 libdispatch.dylib 0x000000018094dcac _dispatch_root_queue_drain (in libdispatch.dylib) + 588
11 libdispatch.dylib 0x000000018094d9fc _dispatch_worker_thread3 (in libdispatch.dylib) + 120
12 libsystem_pthread.dylib 0x0000000180c73fac _pthread_wqthread (in libsystem_pthread.dylib) + 1176

Thread 25:
0 CoreFoundation 0x0000000180ff8c10 _CFRelease (in CoreFoundation) + 172
1 CoreFoundation 0x000000018100e758 _CFStringCreateWithFormatAndArgumentsAux2 (in CoreFoundation) + 156
2 CoreFoundation 0x000000018100e758 _CFStringCreateWithFormatAndArgumentsAux2 (in CoreFoundation) + 156
3 Foundation 0x00000001819a4bf8 -[NSString stringByAppendingFormat:] (in Foundation) + 104
...
14 libdispatch.dylib 0x0000000180940aa0 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
15 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
16 libdispatch.dylib 0x000000018094a9b4 _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 608
17 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
18 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
19 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
20 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 26:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 Foundation 0x0000000181989674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 304
...
7 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
8 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 27:
0 libsystem_kernel.dylib 0x0000000180ad5610 __semwait_signal (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c77088 _pthread_join$VARIANT$mp (in libsystem_pthread.dylib) + 760
2 applicationName 0x0000000103775038 Thread::join (in applicationName) (thread.h:283)
3 applicationName 0x0000000103774d0c appender_close (in applicationName) (lock.h:29)
4 libsystem_c.dylib 0x0000000180a44900 __cxa_finalize_ranges (in libsystem_c.dylib) + 400
5 libsystem_c.dylib 0x00000001809ee25c exit (in libsystem_c.dylib) + 24
6 AssertionServices 0x00000001836c4bf4 __50-[BKSWorkspace _queue_handleConnectToHostMessage:]_block_invoke.62 (in AssertionServices) + 0
7 libxpc.dylib 0x0000000180caf004 _xpc_connection_call_event_handler (in libxpc.dylib) + 68
8 libxpc.dylib 0x0000000180cb2f80 do_mach_notify_port_destroyed (in libxpc.dylib) + 160
9 libxpc.dylib 0x0000000180cb2eac _Xmach_notify_port_destroyed (in libxpc.dylib) + 80
10 libxpc.dylib 0x0000000180cb2e30 notify_server (in libxpc.dylib) + 92
11 libxpc.dylib 0x0000000180cb964c _xpc_connection_pass2mig (in libxpc.dylib) + 164
12 libxpc.dylib 0x0000000180cac9f8 _xpc_connection_mach_event (in libxpc.dylib) + 1080
13 libdispatch.dylib 0x0000000180940b30 _dispatch_client_callout4 (in libdispatch.dylib) + 16
14 libdispatch.dylib 0x0000000180957440 _dispatch_mach_msg_invoke$VARIANT$mp (in libdispatch.dylib) + 352
15 libdispatch.dylib 0x000000018094a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
16 libdispatch.dylib 0x0000000180957eec _dispatch_mach_invoke$VARIANT$mp (in libdispatch.dylib) + 508
17 libdispatch.dylib 0x000000018094a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
18 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
19 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
20 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
21 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 28:
0 libsystem_kernel.dylib 0x0000000180ad67c8 kevent_id (in libsystem_kernel.dylib) + 8
1 libdispatch.dylib 0x000000018095c574 _dispatch_kq_poll (in libdispatch.dylib) + 208
2 libdispatch.dylib 0x000000018095bb98 _dispatch_event_loop_poke$VARIANT$mp (in libdispatch.dylib) + 428
3 libnetwork.dylib 0x0000000181f3ffcc nw_endpoint_flow_input_finished (in libnetwork.dylib) + 184
4 libnetwork.dylib 0x0000000181fc070c nw_socket_handle_socket_event (in libnetwork.dylib) + 1616
5 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
6 libdispatch.dylib 0x0000000180948e94 _dispatch_continuation_pop$VARIANT$mp (in libdispatch.dylib) + 424
7 libdispatch.dylib 0x0000000180952784 _dispatch_source_invoke$VARIANT$mp (in libdispatch.dylib) + 1364
8 libdispatch.dylib 0x000000018094a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
9 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
10 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
11 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
12 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 29:
0 libsystem_pthread.dylib 0x0000000180c73b04 start_wqthread (in libsystem_pthread.dylib) + 0

Thread 30:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 libxpc.dylib 0x0000000180cc4750 xpc_pipe_routine (in libxpc.dylib) + 316
3 libxpc.dylib 0x0000000180cb45cc _xpc_interface_routine (in libxpc.dylib) + 204
4 libxpc.dylib 0x0000000180cb4b8c _xpc_look_up_endpoint (in libxpc.dylib) + 224
5 libxpc.dylib 0x0000000180cada3c _xpc_connection_bootstrap_look_up_slow (in libxpc.dylib) + 200
6 libxpc.dylib 0x0000000180cad778 _xpc_connection_init (in libxpc.dylib) + 532
7 libxpc.dylib 0x0000000180cad554 _xpc_connection_resume_init (in libxpc.dylib) + 20
8 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
9 libdispatch.dylib 0x0000000180947b84 _dispatch_queue_override_invoke$VARIANT$mp (in libdispatch.dylib) + 716
10 libdispatch.dylib 0x000000018094dcac _dispatch_root_queue_drain (in libdispatch.dylib) + 588
11 libdispatch.dylib 0x000000018094d9fc _dispatch_worker_thread3 (in libdispatch.dylib) + 120
12 libsystem_pthread.dylib 0x0000000180c73fac _pthread_wqthread (in libsystem_pthread.dylib) + 1176

Thread 31:
0 SiriTTS 0x000000018e1e7910 std::__1::vector<fst::CacheState<fst::ReverseArc<fst::ArcTpl<fst::LatticeWeightTpl > >, fst::PoolAllocator<fst::ReverseArc<fst::ArcTpl<fst::LatticeWeightTpl > > > >*, std::__1::allocator<fst::CacheState<fst::ReverseArc<fst::ArcTpl<fst::Lattic
1 libsystem_c.dylib 0x0000000180a448f0 __cxa_finalize_ranges (in libsystem_c.dylib) + 384
2 libsystem_c.dylib 0x00000001809ee25c exit (in libsystem_c.dylib) + 24
3 FrontBoardServices 0x00000001838577ec -[FBSWorkspace clientBeginTransaction:] (in FrontBoardServices) + 0
4 libdispatch.dylib 0x0000000180940aa0 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
5 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
6 libdispatch.dylib 0x000000018094a9b4 _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 608
7 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
8 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
9 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
10 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 32:
0 libsystem_pthread.dylib 0x0000000180c73b04 start_wqthread (in libsystem_pthread.dylib) + 0

Thread 33:
0 libsystem_pthread.dylib 0x0000000180c73b04 start_wqthread (in libsystem_pthread.dylib) + 0

Thread 34:
0 libobjc.A.dylib 0x000000018021c928 objc_msgSend (in libobjc.A.dylib) + 40
...
4 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
5 libdispatch.dylib 0x0000000180948e94 _dispatch_continuation_pop$VARIANT$mp (in libdispatch.dylib) + 424
6 libdispatch.dylib 0x0000000180952784 _dispatch_source_invoke$VARIANT$mp (in libdispatch.dylib) + 1364
7 libdispatch.dylib 0x000000018094a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
8 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
9 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
10 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
11 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 35:
0 libsystem_kernel.dylib 0x0000000180ad5d84 __workq_kernreturn (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180c73eb4 _pthread_wqthread (in libsystem_pthread.dylib) + 928

Thread 36:
0 libsystem_kernel.dylib 0x0000000180ab3e44 semaphore_wait_trap (in libsystem_kernel.dylib) + 8
1 libdispatch.dylib 0x0000000180942f48 _dispatch_sema4_wait$VARIANT$mp (in libdispatch.dylib) + 24
2 libdispatch.dylib 0x0000000180943e80 _dispatch_group_wait_slow (in libdispatch.dylib) + 192
3 CoreFoundation 0x0000000180fea75c CFPREFERENCES_IS_WAITING_FOR_SYSTEM_CFPREFSD (in CoreFoundation) + 64
4 CoreFoundation 0x0000000180fbb76c -[CFPrefsPlistSource createRequestNewContentMessageForDaemon:] (in CoreFoundation) + 460
5 CoreFoundation 0x0000000180fea5c8 -[CFPrefsSearchListSource createRequestNewContentMessageForDaemon:] (in CoreFoundation) + 236
6 CoreFoundation 0x0000000180fea91c -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] (in CoreFoundation) + 80
7 CoreFoundation 0x0000000180feb238 -[CFPrefsSearchListSource alreadylocked_copyDictionary] (in CoreFoundation) + 384
8 CoreFoundation 0x0000000180fe9524 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] (in CoreFoundation) + 88
9 CoreFoundation 0x000000018108689c -[CFPrefsSource copyValueForKey:] (in CoreFoundation) + 64
10 CoreFoundation 0x0000000181090a80 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke (in CoreFoundation) + 40
11 CoreFoundation 0x0000000180fecd6c __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke (in CoreFoundation) + 268
12 CoreFoundation 0x0000000180fec588 normalizeQuintuplet (in CoreFoundation) + 356
13 CoreFoundation 0x0000000180fecc54 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] (in CoreFoundation) + 108
14 CoreFoundation 0x0000000181090a18 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] (in CoreFoundation) + 124
15 CoreFoundation 0x00000001810932b4 _CFPreferencesCopyAppValueWithContainer (in CoreFoundation) + 116
16 Foundation 0x00000001819882fc -[NSUserDefaults(NSUserDefaults) objectForKey:] (in Foundation) + 52
17 Foundation 0x00000001819893e4 -[NSUserDefaults(NSUserDefaults) stringForKey:] (in Foundation) + 24
...
21 libdispatch.dylib 0x0000000180940a60 _dispatch_client_callout (in libdispatch.dylib) + 16
22 libdispatch.dylib 0x0000000180948e94 _dispatch_continuation_pop$VARIANT$mp (in libdispatch.dylib) + 424
23 libdispatch.dylib 0x0000000180952784 _dispatch_source_invoke$VARIANT$mp (in libdispatch.dylib) + 1364
24 libdispatch.dylib 0x000000018094a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
25 libdispatch.dylib 0x000000018094b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
26 libdispatch.dylib 0x000000018094bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
27 libdispatch.dylib 0x0000000180954098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
28 libsystem_pthread.dylib 0x0000000180c73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 37:
0 libsystem_kernel.dylib 0x0000000180ab3e08 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180ab3c80 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x0000000180ff6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x0000000180ff4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000180f14da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 Foundation 0x0000000181989674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 304
...
7 Foundation 0x0000000181a99efc NSThread__start (in Foundation) + 1040
8 libsystem_pthread.dylib 0x0000000180c75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180c75110 _pthread_body (in libsystem_pthread.dylib) + 0

@garryyan
Copy link
Collaborator

garryyan commented Sep 18, 2018

能看到用户的存储使用情况吗?SIGBUS 和 mmap 有关的一般是越界访问了 mmap 的空间,之前有过类似的,是空间不够用了。

但是 xlog 会提前占位空间的。分析分析用户的共性吧

@BokiceLee BokiceLee reopened this Sep 20, 2018
@BokiceLee
Copy link
Author

BokiceLee commented Sep 20, 2018

终于看到一个有用的日志,大致是getloglen的同时由于另一个线程调用了exit,使得全局对象mmap_file被析构了,因此getloglen调用的mmapfile是closed了(析构函数中调用了close)的。想问一下,因为sg_cond_buffer_async已经有做过相关的处理,mmapfile为什么不做处理呢?是未考虑到还是有其他原因?(求回复。。。)

@garryyan
Copy link
Collaborator

mmapfile为什么不做处理呢?

指的哪方面的处理

@BokiceLee
Copy link
Author

全局对象改成全局引用,防止exit时对象析构的不可控

@garryyan
Copy link
Collaborator

sg_cond_buffer_async 也只在 windows 上这么做了,因为在 windows 上能稳定重现这个问题。

你这个问题的解决办法 不妨尝试下 atexit 注册下 appenderClose

@BokiceLee
Copy link
Author

xlog在appender_open中是已经注册了appender_close的了吧,这应该是多线程相关的问题,见线程14和23,线程14调用了appender_close,线程23同时析构了mmap_file对象,导致了appender_close及线程1中getloglen的mmap_file指针为空,
Thread 0:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 GraphicsServices 0x00000001831fa020 GSEventRunModal (in GraphicsServices) + 100
6 UIKit 0x000000018b234758 UIApplicationMain (in UIKit) + 236
7 applicationName 0x00000001009fe564 _main (in applicationName) (main.m:35)
8 libdyld.dylib 0x0000000180ca5fc0 start (in libdyld.dylib) + 4

Thread 1 Crashed:
0 applicationName 0x0000000100bb6bd4 LogCrypt::GetLogLen (in applicationName) (log_crypt.cc:0)
1 applicationName 0x000000010115a774 LogBuffer::Flush (in applicationName) (log_buffer.cc:79)
2 applicationName 0x0000000101157304 __async_log_thread (in applicationName) (appender.cc:510)
3 applicationName 0x0000000101159ee4 Thread::start_routine (in applicationName) (thread.h:414)
4 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
5 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 2 name: com.apple.uikit.eventfetch-thread
Thread 2:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 Foundation 0x0000000181c89674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 304
6 Foundation 0x0000000181c8951c -[NSRunLoop(NSRunLoop) runUntilDate:] (in Foundation) + 148
7 UIKit 0x000000018af19768 -[UIEventFetcher threadMain] (in UIKit) + 136
8 Foundation 0x0000000181d99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 3:
0 libsystem_kernel.dylib 0x0000000180dd5604 __semwait_signal (in libsystem_kernel.dylib) + 8
1 libsystem_c.dylib 0x0000000180cee12c nanosleep (in libsystem_c.dylib) + 212
2 libsystem_c.dylib 0x0000000180d56ef4 sleep (in libsystem_c.dylib) + 44
3 ...
4 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
5 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 4:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 ...
3 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
4 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 5:

Thread 6:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000181264b28 CFRunLoopRun (in CoreFoundation) + 116
6 ...
8 Foundation 0x0000000181d99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 7:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000181264b28 CFRunLoopRun (in CoreFoundation) + 116
...
8 Foundation 0x0000000181d99efc NSThread__start (in Foundation) + 1040
9 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
10 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 8:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CFNetwork 0x0000000181b226e0 -[__CoreSchedulingSetRunnable runForever] (in CFNetwork) + 220
6 Foundation 0x0000000181d99efc NSThread__start (in Foundation) + 1040
7 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x0000000180dd552c select$DARWIN_EXTSN (in libsystem_kernel.dylib) + 8
1 CoreFoundation 0x00000001812ff378 __CFSocketManager (in CoreFoundation) + 644
2 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
3 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 10 name: com.apple.CoreMotion.MotionThread
Thread 10:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
5 CoreFoundation 0x0000000181264b28 CFRunLoopRun (in CoreFoundation) + 116
6 CoreMotion 0x000000018680b9dc CLStartStopAdvertisingBeacon (in CoreMotion) + 231572
7 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 11:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 CoreFoundation 0x00000001812f6e40 __CFRunLoopServiceMachPort (in CoreFoundation) + 196
3 CoreFoundation 0x00000001812f4908 __CFRunLoopRun (in CoreFoundation) + 1568
4 CoreFoundation 0x0000000181214da8 CFRunLoopRunSpecific (in CoreFoundation) + 552
...
7 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 12:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b2ec std::__1::condition_variable::__do_timed_wait() (in libc++.1.dylib) + 96
3 JavaScriptCore 0x000000018899d6e8 std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >() (in JavaScriptCore) + 124
4 JavaScriptCore 0x000000018899d598 std::__1::condition_variable_any::wait_until<std::__1::unique_lockbmalloc::Mutex, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >() (in JavaScriptCore) + 112
5 JavaScriptCore 0x000000018899d0dc bmalloc::Scavenger::threadRunLoop() (in JavaScriptCore) + 272
6 JavaScriptCore 0x000000018899ce18 bmalloc::Scavenger::Scavenger() (in JavaScriptCore) + 0
7 JavaScriptCore 0x000000018899d234 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(bmalloc::Scavenger), bmalloc::Scavenger*> >() (in JavaScriptCore) + 44
8 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 13:
0 libsystem_kernel.dylib 0x0000000180dd67bc kevent_id (in libsystem_kernel.dylib) + 8
1 libdispatch.dylib 0x0000000180c5c574 _dispatch_kq_poll (in libdispatch.dylib) + 208
2 libdispatch.dylib 0x0000000180c5bb98 _dispatch_event_loop_poke$VARIANT$mp (in libdispatch.dylib) + 428
3 libdispatch.dylib 0x0000000180c45c30 _dispatch_queue_resume_finalize_activation (in libdispatch.dylib) + 80
4 libxpc.dylib 0x0000000180fadac8 _xpc_connection_check_in (in libxpc.dylib) + 288
5 libxpc.dylib 0x0000000180fad784 _xpc_connection_init (in libxpc.dylib) + 756
6 libxpc.dylib 0x0000000180fad480 _xpc_connection_resume_init (in libxpc.dylib) + 20
7 libdispatch.dylib 0x0000000180c40a60 _dispatch_client_callout (in libdispatch.dylib) + 16
8 libdispatch.dylib 0x0000000180c47b84 _dispatch_queue_override_invoke$VARIANT$mp (in libdispatch.dylib) + 716
9 libdispatch.dylib 0x0000000180c4dcac _dispatch_root_queue_drain (in libdispatch.dylib) + 588
10 libdispatch.dylib 0x0000000180c4d9fc _dispatch_worker_thread3 (in libdispatch.dylib) + 120
11 libsystem_pthread.dylib 0x0000000180f73fac _pthread_wqthread (in libsystem_pthread.dylib) + 1176

Thread 14:
0 libsystem_kernel.dylib 0x0000000180dd5604 __semwait_signal (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77088 _pthread_join$VARIANT$mp (in libsystem_pthread.dylib) + 760
2 applicationName 0x0000000101158830 Thread::join (in applicationName) (thread.h:283)
3 applicationName 0x0000000101158510 appender_close (in applicationName) (lock.h:29)
4 libsystem_c.dylib 0x0000000180d44900 __cxa_finalize_ranges (in libsystem_c.dylib) + 400
5 libsystem_c.dylib 0x0000000180cee25c exit (in libsystem_c.dylib) + 24
6 FrontBoardServices 0x0000000183b587ec -[FBSWorkspace clientBeginTransaction:] (in FrontBoardServices) + 0
7 libdispatch.dylib 0x0000000180c40aa0 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
8 libdispatch.dylib 0x0000000180c40a60 _dispatch_client_callout (in libdispatch.dylib) + 16
9 libdispatch.dylib 0x0000000180c4a9b4 _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 608
10 libdispatch.dylib 0x0000000180c4b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
11 libdispatch.dylib 0x0000000180c4bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
12 libdispatch.dylib 0x0000000180c54098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
13 libsystem_pthread.dylib 0x0000000180f73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

Thread 15:
0 libsystem_kernel.dylib 0x0000000180dd5d78 __workq_kernreturn (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f73eb4 _pthread_wqthread (in libsystem_pthread.dylib) + 928

Thread 16:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b2ec std::__1::condition_variable::__do_timed_wait() (in libc++.1.dylib) + 96
3 ...
8 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 17:
0 libsystem_kernel.dylib 0x0000000180dd552c select$DARWIN_EXTSN (in libsystem_kernel.dylib) + 8
1 ...
5 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 18:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
3 ...
7 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
8 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 19:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
3 ...
8 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 20:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b2ec std::__1::condition_variable::__do_timed_wait() (in libc++.1.dylib) + 96
3 ...
8 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 21:
0 libsystem_kernel.dylib 0x0000000180db3de8 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x0000000180db3c60 mach_msg (in libsystem_kernel.dylib) + 72
2 ...
5 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 22:
0 libsystem_kernel.dylib 0x0000000180dd50e8 __psynch_cvwait (in libsystem_kernel.dylib) + 8
1 libsystem_pthread.dylib 0x0000000180f77c90 _pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib) + 644
2 libc++.1.dylib 0x000000018048b25c std::__1::condition_variable::wait() (in libc++.1.dylib) + 24
3 ...
8 libsystem_pthread.dylib 0x0000000180f75220 _pthread_body (in libsystem_pthread.dylib) + 272
9 libsystem_pthread.dylib 0x0000000180f75110 _pthread_body (in libsystem_pthread.dylib) + 0

Thread 23:
0 libsystem_kernel.dylib 0x0000000180dd4d10 __munmap (in libsystem_kernel.dylib) + 8
1 applicationName 0x000000010115264c mars_boost::iostreams::detail::mapped_file_impl::close (in applicationName) (mapped_file.cpp:481)
2 applicationName 0x0000000101152e00 mars_boost::detail::sp_counted_impl_p<mars_boost::iostreams::detail::mapped_file_impl>::dispose (in applicationName) (path.hpp:37)
3 applicationName 0x0000000101158fec mars_boost::detail::shared_count::~shared_count (in applicationName) (sp_counted_base_clang.hpp:36)
4 applicationName 0x00000001011573bc mars_boost::iostreams::mapped_file::~mapped_file (in applicationName) (mapped_file.hpp:223)
5 libsystem_c.dylib 0x0000000180d448f0 __cxa_finalize_ranges (in libsystem_c.dylib) + 384
6 libsystem_c.dylib 0x0000000180cee25c exit (in libsystem_c.dylib) + 24
7 AssertionServices 0x00000001839c5bf4 __50-[BKSWorkspace _queue_handleConnectToHostMessage:]_block_invoke.62 (in AssertionServices) + 0
8 libxpc.dylib 0x0000000180faef30 _xpc_connection_call_event_handler (in libxpc.dylib) + 68
9 libxpc.dylib 0x0000000180fb2ebc do_mach_notify_port_destroyed (in libxpc.dylib) + 160
10 libxpc.dylib 0x0000000180fb2de8 _Xmach_notify_port_destroyed (in libxpc.dylib) + 80
11 libxpc.dylib 0x0000000180fb2d6c notify_server (in libxpc.dylib) + 92
12 libxpc.dylib 0x0000000180fb95cc _xpc_connection_pass2mig (in libxpc.dylib) + 164
13 libxpc.dylib 0x0000000180fac924 _xpc_connection_mach_event (in libxpc.dylib) + 1080
14 libdispatch.dylib 0x0000000180c40b30 _dispatch_client_callout4 (in libdispatch.dylib) + 16
15 libdispatch.dylib 0x0000000180c57440 _dispatch_mach_msg_invoke$VARIANT$mp (in libdispatch.dylib) + 352
16 libdispatch.dylib 0x0000000180c4a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
17 libdispatch.dylib 0x0000000180c57eec _dispatch_mach_invoke$VARIANT$mp (in libdispatch.dylib) + 508
18 libdispatch.dylib 0x0000000180c4a86c _dispatch_queue_serial_drain$VARIANT$mp (in libdispatch.dylib) + 280
19 libdispatch.dylib 0x0000000180c4b2fc _dispatch_queue_invoke$VARIANT$mp (in libdispatch.dylib) + 336
20 libdispatch.dylib 0x0000000180c4bcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp (in libdispatch.dylib) + 340
21 libdispatch.dylib 0x0000000180c54098 _dispatch_workloop_worker_thread$VARIANT$mp (in libdispatch.dylib) + 668
22 libsystem_pthread.dylib 0x0000000180f73e70 _pthread_wqthread (in libsystem_pthread.dylib) + 860

@garryyan
Copy link
Collaborator

嗯 多线程问题,你可以在你那里改成引用,然后灰度看看数据会不会变好,如果变好提个 pr 过来。因为目前微信是没这种类型的crash 的,我们是hook 了 exit 代码,在 exit 中释放各种资源,然后再调用系统的 exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants