MSAL Version
2.3.0
Description
When I have the app in background without internet connection, receive some notification, gain back internet connection and foreground the app, it hits a deadlock within MSAL and crashes.
Error Details
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<com.symphony.intune(AD242FCD-75FD-444D-8AFD-EBD668CDDC2D)>:896 exhausted real (wall clock) time allowance of 30.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 50.710 (user 29.310, system 21.400), 28% CPU",
"Elapsed application CPU time (seconds): 30.186, 17% CPU"
)
ThermalInfo: (
"Thermal Level: 0",
"Thermal State: nominal"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1e27f1f18 __psynch_mutexwait + 8
1 libsystem_pthread.dylib 0x21bcdeb68 _pthread_mutex_firstfit_lock_wait + 84
2 libsystem_pthread.dylib 0x21bcdec98 _pthread_mutex_firstfit_lock_slow + 220
3 CFNetwork 0x192b8aae0 __CFURLCacheCopyResponseForRequestWithCompletionHandler + 300
4 CFNetwork 0x192c2f860 CFURLCacheCopyResponseForRequest + 168
5 CFNetwork 0x192c4b950 -[NSURLCache cachedResponseForRequest:] + 40
6 SymphonyIntune 0x104984f7c -[MSIDHttpRequest cachedResponse] + 68
7 SymphonyIntune 0x10498438c -[MSIDHttpRequest sendWithBlock:] + 468
8 SymphonyIntune 0x10494fe2c -[MSIDAuthority loadOpenIdMetadataWithContext:completionBlock:] + 492
9 SymphonyIntune 0x104987d20 __69-[MSIDInteractiveAuthorizationCodeRequest getAuthCodeWithCompletion:]_block_invoke + 200
10 SymphonyIntune 0x10494f914 __78-[MSIDAuthority resolveAndValidate:userPrincipalName:context:completionBlock:]_block_invoke + 420
11 SymphonyIntune 0x104931d74 -[MSIDAadAuthorityResolver handleRecord:authority:completionBlock:] + 248
12 SymphonyIntune 0x1049313e0 -[MSIDAadAuthorityResolver resolveAuthority:userPrincipalName:validate:context:completionBlock:] + 184
13 SymphonyIntune 0x10494f720 -[MSIDAuthority resolveAndValidate:userPrincipalName:context:completionBlock:] + 516
14 SymphonyIntune 0x104987c04 -[MSIDInteractiveAuthorizationCodeRequest getAuthCodeWithCompletion:] + 352
15 SymphonyIntune 0x104989530 -[MSIDInteractiveTokenRequest executeRequestWithCompletion:] + 180
16 SymphonyIntune 0x1049a28c0 -[MSIDLocalInteractiveController acquireTokenWithRequest:completionBlock:] + 252
17 SymphonyIntune 0x1049a19c8 -[MSIDLocalInteractiveController acquireToken:] + 372
18 SymphonyIntune 0x104956efc -[MSIDBrokerInteractiveController handleFailedOpenURL:] + 420
19 IntuneMAMSwift 0x1090668c4 0x108ec8000 + 1697988
20 libdispatch.dylib 0x199558aac _dispatch_call_block_and_release + 32
21 libdispatch.dylib 0x199572584 _dispatch_client_callout + 16
22 libdispatch.dylib 0x19958f5a0 _dispatch_main_queue_drain.cold.5 + 812
23 libdispatch.dylib 0x199567d30 _dispatch_main_queue_drain + 180
24 libdispatch.dylib 0x199567c6c _dispatch_main_queue_callback_4CF + 44
25 CoreFoundation 0x191639d90 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
26 CoreFoundation 0x1915dd4f4 __CFRunLoopRun + 1980
27 CoreFoundation 0x1915dec3c CFRunLoopRunSpecific + 572
28 GraphicsServices 0x1de7bd454 GSEventRunModal + 168
29 UIKitCore 0x193ff1274 -[UIApplication _run] + 816
30 UIKitCore 0x193fbca28 UIApplicationMain + 336
31 IntuneMAMSwift 0x10919af10 0x108ec8000 + 2961168
32 SymphonyIntune 0x1047e0004 main + 64
33 dyld 0x1b84b3f08 start + 6040
MSAL Logs
I'm not able to capture MSAL logs as described in the documentation because I also embed IntuneMAMSwift and MicrosoftTunnelApi frameworks. It seems like IntuneMAMSwift already sets the logger callback so I can do it myself.
Reproduction Steps
- Correctly enroll to Intune and sign in to the app
- Remove internet connection from the phone
- Send app to background
- Receive a few messages in the app
- Restore internet connection and wait for the notifications for the messages above to appear
- Bring app back to foreground
At this point the app gets stuck and crashes
Expected Behavior
It must not get stuck on a deadlock and not crash
Regression
No response
Screenshots & Screen Recordings
No response
Additional context
No response
MSAL Version
2.3.0
Description
When I have the app in background without internet connection, receive some notification, gain back internet connection and foreground the app, it hits a deadlock within MSAL and crashes.
Error Details
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<com.symphony.intune(AD242FCD-75FD-444D-8AFD-EBD668CDDC2D)>:896 exhausted real (wall clock) time allowance of 30.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 50.710 (user 29.310, system 21.400), 28% CPU",
"Elapsed application CPU time (seconds): 30.186, 17% CPU"
)
ThermalInfo: (
"Thermal Level: 0",
"Thermal State: nominal"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1e27f1f18 __psynch_mutexwait + 8
1 libsystem_pthread.dylib 0x21bcdeb68 _pthread_mutex_firstfit_lock_wait + 84
2 libsystem_pthread.dylib 0x21bcdec98 _pthread_mutex_firstfit_lock_slow + 220
3 CFNetwork 0x192b8aae0 __CFURLCacheCopyResponseForRequestWithCompletionHandler + 300
4 CFNetwork 0x192c2f860 CFURLCacheCopyResponseForRequest + 168
5 CFNetwork 0x192c4b950 -[NSURLCache cachedResponseForRequest:] + 40
6 SymphonyIntune 0x104984f7c -[MSIDHttpRequest cachedResponse] + 68
7 SymphonyIntune 0x10498438c -[MSIDHttpRequest sendWithBlock:] + 468
8 SymphonyIntune 0x10494fe2c -[MSIDAuthority loadOpenIdMetadataWithContext:completionBlock:] + 492
9 SymphonyIntune 0x104987d20 __69-[MSIDInteractiveAuthorizationCodeRequest getAuthCodeWithCompletion:]_block_invoke + 200
10 SymphonyIntune 0x10494f914 __78-[MSIDAuthority resolveAndValidate:userPrincipalName:context:completionBlock:]_block_invoke + 420
11 SymphonyIntune 0x104931d74 -[MSIDAadAuthorityResolver handleRecord:authority:completionBlock:] + 248
12 SymphonyIntune 0x1049313e0 -[MSIDAadAuthorityResolver resolveAuthority:userPrincipalName:validate:context:completionBlock:] + 184
13 SymphonyIntune 0x10494f720 -[MSIDAuthority resolveAndValidate:userPrincipalName:context:completionBlock:] + 516
14 SymphonyIntune 0x104987c04 -[MSIDInteractiveAuthorizationCodeRequest getAuthCodeWithCompletion:] + 352
15 SymphonyIntune 0x104989530 -[MSIDInteractiveTokenRequest executeRequestWithCompletion:] + 180
16 SymphonyIntune 0x1049a28c0 -[MSIDLocalInteractiveController acquireTokenWithRequest:completionBlock:] + 252
17 SymphonyIntune 0x1049a19c8 -[MSIDLocalInteractiveController acquireToken:] + 372
18 SymphonyIntune 0x104956efc -[MSIDBrokerInteractiveController handleFailedOpenURL:] + 420
19 IntuneMAMSwift 0x1090668c4 0x108ec8000 + 1697988
20 libdispatch.dylib 0x199558aac _dispatch_call_block_and_release + 32
21 libdispatch.dylib 0x199572584 _dispatch_client_callout + 16
22 libdispatch.dylib 0x19958f5a0 _dispatch_main_queue_drain.cold.5 + 812
23 libdispatch.dylib 0x199567d30 _dispatch_main_queue_drain + 180
24 libdispatch.dylib 0x199567c6c _dispatch_main_queue_callback_4CF + 44
25 CoreFoundation 0x191639d90 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
26 CoreFoundation 0x1915dd4f4 __CFRunLoopRun + 1980
27 CoreFoundation 0x1915dec3c CFRunLoopRunSpecific + 572
28 GraphicsServices 0x1de7bd454 GSEventRunModal + 168
29 UIKitCore 0x193ff1274 -[UIApplication _run] + 816
30 UIKitCore 0x193fbca28 UIApplicationMain + 336
31 IntuneMAMSwift 0x10919af10 0x108ec8000 + 2961168
32 SymphonyIntune 0x1047e0004 main + 64
33 dyld 0x1b84b3f08 start + 6040
MSAL Logs
I'm not able to capture MSAL logs as described in the documentation because I also embed IntuneMAMSwift and MicrosoftTunnelApi frameworks. It seems like IntuneMAMSwift already sets the logger callback so I can do it myself.
Reproduction Steps
At this point the app gets stuck and crashes
Expected Behavior
It must not get stuck on a deadlock and not crash
Regression
No response
Screenshots & Screen Recordings
No response
Additional context
No response