由于应用程序耗时过长而导致启动崩溃 - 死锁 - 钥匙串

时间:2014-10-21 09:01:03

标签: ios security crash deadlock keychain

我有一个难题要解决...我们的应用程序在启动时崩溃(可怕的badf00d错误,启动时间超过5秒)但我们无法重现此问题。我能够从用户那里获得崩溃日志。不幸的是,我没有.ipad完全象征崩溃(愚蠢的错误)。

然而,我想知道是否无法找出回溯中发生的事情。似乎某些安全代码中发生了死锁。当尝试加载主视图时,似乎也会发生这种情况。这与代码签名有关吗?任何见解都会有所帮助!

Date/Time:           2014-10-02 23:34:23.472 +1000
Launch Time:         2014-10-02 23:34:03.057 +1000
OS Version:          iOS 8.0.2 (12A405)
Report Version:      105

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread:  0

Application Specific Information:
com.myappsoftware.myapp failed to scene-create in time

Elapsed total CPU time (seconds): 4.230 (user 4.230, system 0.000), 10% CPU 
Elapsed application CPU time (seconds): 1.039, 3% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x36360540 semaphore_wait_trap + 8
1   libdispatch.dylib               0x36297eee _dispatch_semaphore_wait_slow + 186
2   libxpc.dylib                    0x364077b8 xpc_connection_send_message_with_reply_sync + 152
3   Security                        0x2b8dd310 securityd_message_with_reply_sync + 64
4   Security                        0x2b8dd48c securityd_send_sync_and_do + 44
5   Security                        0x2b8ea452 __SecItemCopyMatching_block_invoke + 166
6   Security                        0x2b8e96f6 SecOSStatusWith + 14
7   Security                        0x2b8ea36e SecItemCopyMatching + 174
8   My App                          0x003e6db2 0x3a000 + 3853746
9   My App                          0x0006bcd0 0x3a000 + 203984
10  My App                          0x0006bd28 0x3a000 + 204072
11  My App                          0x0006c8c4 0x3a000 + 207044
12  My App                          0x0004bf7e 0x3a000 + 73598
13  UIKit                           0x2bb1e12a -[UIViewController loadViewIfRequired] + 598
14  UIKit                           0x2bbc7e00 -[UINavigationController _layoutViewController:] + 28
15  UIKit                           0x2bbc7d28 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 224
16  UIKit                           0x2bbc72be -[UINavigationController _startTransition:fromViewController:toViewController:] + 70
17  UIKit                           0x2bbc6fee -[UINavigationController _startDeferredTransitionIfNeeded:] + 574
18  UIKit                           0x2bbc6d58 -[UINavigationController __viewWillLayoutSubviews] + 40
19  UIKit                           0x2bbc6cec -[UILayoutContainerView layoutSubviews] + 180
20  UIKit                           0x2bb1b672 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
21  QuartzCore                      0x2b543cc8 -[CALayer layoutSublayers] + 132
22  QuartzCore                      0x2b53f6b0 CA::Layer::layout_if_needed(CA::Transaction*) + 356
23  QuartzCore                      0x2b53f538 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
24  QuartzCore                      0x2b53ef1c CA::Context::commit_transaction(CA::Transaction*) + 220
25  QuartzCore                      0x2b53ed20 CA::Transaction::commit() + 320
26  UIKit                           0x2bd7f390 -[UIApplication _reportMainSceneUpdateFinished:] + 40
27  UIKit                           0x2bd80138 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2508
28  UIKit                           0x2bd8a544 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 32
29  UIKit                           0x2bd7e554 -[UIApplication workspaceDidEndTransaction:] + 128
30  FrontBoardServices              0x2edc10e6 __31-[FBSSerialQueue performAsync:]_block_invoke + 10
31  CoreFoundation                  0x286465b2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 10
32  CoreFoundation                  0x28645874 __CFRunLoopDoBlocks + 212
33  CoreFoundation                  0x286443ae __CFRunLoopRun + 1710
34  CoreFoundation                  0x2859261c CFRunLoopRunSpecific + 472
35  CoreFoundation                  0x2859242e CFRunLoopRunInMode + 102
36  UIKit                           0x2bb8256a -[UIApplication _run] + 554
37  UIKit                           0x2bb7d354 UIApplicationMain + 1436
38  My App                          0x0004ac3a 0x3a000 + 68666
39  libdyld.dylib                   0x362adaac start + 0

我实际上能够象征崩溃。它实际上很奇怪,看起来像死锁:

0   libsystem_kernel.dylib          0x3a64d540 semaphore_wait_trap + 8
1   libdispatch.dylib               0x3a584eee _dispatch_semaphore_wait_slow + 186
2   libxpc.dylib                    0x3a6f47b8 xpc_connection_send_message_with_reply_sync + 152
3   Security                        0x2fbca310 securityd_message_with_reply_sync + 64
4   Security                        0x2fbca48c securityd_send_sync_and_do + 44
5   Security                        0x2fbd7452 __SecItemCopyMatching_block_invoke + 166
6   Security                        0x2fbd66f6 SecOSStatusWith + 14
7   Security                        0x2fbd736e SecItemCopyMatching + 174
8   My App                          0x004aadb2 +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] + 390

我还有其他堆栈跟踪,其中另一个线程也同时被卡在同一点:

Thread 5 name:  Dispatch queue: com.Flurry.Analytics.Session
Thread 5:
0   libsystem_kernel.dylib          0x37c07540 semaphore_wait_trap + 8
1   libdispatch.dylib               0x37b3eeee _dispatch_semaphore_wait_slow + 186
2   libxpc.dylib                    0x37cae7b8 xpc_connection_send_message_with_reply_sync + 152
3   Security                        0x2d184310 securityd_message_with_reply_sync + 64
4   Security                        0x2d18448c securityd_send_sync_and_do + 44
5   Security                        0x2d1910fa __SecItemAdd_block_invoke + 158
6   Security                        0x2d1906f6 SecOSStatusWith + 14
7   Security                        0x2d190ac6 SecItemAdd + 338
8   My App                          0x000c57a4 -[FlurryKeychainWrapper setData:forKey:] + 144
9   My App                          0x000c569a -[FlurryKeychainWrapper setObject:forKey:] + 66
10  My App                          0x000b75a8 -[FlurrySession initialTimestamp] + 880
11  My App                          0x000b66a4 -[FlurrySession dataForSessions:] + 872
12  My App                          0x000b503c -[FlurrySession sendSessionsToServerIncludingCurrentSession:] + 624
13  libdispatch.dylib               0x37b348c8 _dispatch_call_block_and_release + 8
14  libdispatch.dylib               0x37b3c64c _dispatch_queue_drain + 948
15  libdispatch.dylib               0x37b37098 _dispatch_queue_invoke + 80
16  libdispatch.dylib               0x37b3db9e _dispatch_root_queue_drain + 318
17  libdispatch.dylib               0x37b3ecd2 _dispatch_worker_thread3 + 90
18  libsystem_pthread.dylib         0x37c95e2e _pthread_wqthread + 666
19  libsystem_pthread.dylib         0x37c95b80 start_wqthread + 4

0 个答案:

没有答案