mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.21k stars 2.93k forks source link

Firefox 109 Beta crashes every time it's closed #12710

Closed tarikeshaq closed 1 year ago

tarikeshaq commented 1 year ago

Steps to reproduce

Actual behavior

Device & build information

I'm happy to help debug this here!

Attachments: Logs from a crash report:


Incident Identifier: D612B5F5-B8EA-4C34-98D2-3E7C305C3871
Beta Identifier:     144F73B6-55FE-4195-92BF-197142EAA1D2
Hardware Model:      iPhone14,7
Process:             Client [48193]
Path:                /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Client
Identifier:          org.mozilla.ios.FirefoxBeta
Version:             109.0 (24271)
AppStoreTools:       14C17
AppVariant:          1:iPhone14,7:16
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Background
Parent Process:      launchd [1]
Coalition:           org.mozilla.ios.FirefoxBeta [7934]

Date/Time:           2022-12-15 15:04:51.7158 -0500
Launch Time:         2022-12-15 14:38:36.5525 -0500
OS Version:          iPhone OS 16.1.1 (20B101)
Release Type:        User
Baseband Version:    1.13.03
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: application<org.mozilla.ios.FirefoxBeta>:48193 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 29.880 (user 26.020, system 3.860), 46% CPU",
"Elapsed application CPU time (seconds): 10.826, 17% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib                 0x1d00e60a0 kevent_id + 8
1   libdispatch.dylib                      0x19aae4f1c _dispatch_kq_poll + 228
2   libdispatch.dylib                      0x19aae5940 _dispatch_event_loop_wait_for_ownership + 444
3   libdispatch.dylib                      0x19aad1844 __DISPATCH_WAIT_FOR_QUEUE__ + 340
4   libdispatch.dylib                      0x19aad140c _dispatch_sync_f_slow + 144
5   Sync                                   0x104f41d80 SwiftData.forceClose() + 172
6   Sync                                   0x104f3c5b0 BrowserDB.forceClose() + 28
7   Client                                 0x10242c110 BrowserProfile.shutdown() + 172
8   Client                                 0x1023e7294 partial apply for specialized closure #2 in BackgroundSyncUtil.scheduleSyncOnAppBackground() + 64
9   Client                                 0x1020ebab4 thunk for @escaping @callee_guaranteed () -> () + 28
10  libdispatch.dylib                      0x19aac04b4 _dispatch_call_block_and_release + 32
11  libdispatch.dylib                      0x19aac1fdc _dispatch_client_callout + 20
12  libdispatch.dylib                      0x19aad07f4 _dispatch_main_queue_drain + 928
13  libdispatch.dylib                      0x19aad0444 _dispatch_main_queue_callback_4CF + 44
14  CoreFoundation                         0x1935826f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
15  CoreFoundation                         0x193564058 __CFRunLoopRun + 2036
16  CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
17  GraphicsServices                       0x1cc866368 GSEventRunModal + 164
18  UIKitCore                              0x195a473d0 -[UIApplication _run] + 888
19  UIKitCore                              0x195a47034 UIApplicationMain + 340
20  Client                                 0x1020a8dcc main + 304
21  dyld                                   0x1b1bd0960 start + 2528

Thread 1 name:  com.apple.uikit.eventfetch-thread
Thread 1:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   CoreFoundation                         0x193562af0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x193563d34 __CFRunLoopRun + 1232
6   CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
7   Foundation                             0x18d912334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8   Foundation                             0x18d91221c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9   UIKitCore                              0x195b7c33c -[UIEventFetcher threadMain] + 436
10  Foundation                             0x18d92b808 __NSThread__start__ + 716
11  libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
12  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 2 name:  glean.dispatcher
Thread 2:
0   libsystem_kernel.dylib                 0x1d00e641c __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1e054f06c _pthread_cond_wait + 1232
2   Glean                                  0x1058d14a0 std::thread::park::hf7060706a22e96bf + 124
3   Glean                                  0x10585f0b0 crossbeam_channel::context::Context::wait_until::hdfc1af2eebf8a4fc (.1918) + 152
4   Glean                                  0x105865680 crossbeam_channel::context::Context::with::_$u7b$$u7b$closure$u7d$$u7d$::h4372882d8ca58345 + 156
5   Glean                                  0x105882514 std::sys_common::backtrace::__rust_begin_short_backtrace::h42ffb6ab312bd37e + 3560
6   Glean                                  0x10588b114 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h5eabb0245706d825 + 124
7   Glean                                  0x1058ee2d4 std::sys::unix::thread::Thread::new::thread_start::hbc52c4a0aa5ba80b + 36
8   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
9   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 3:
0   libsystem_kernel.dylib                 0x1d00e6008 __semwait_signal + 8
1   libsystem_c.dylib                      0x19ab0a7d8 nanosleep + 220
2   libsystem_c.dylib                      0x19ab1ead8 sleep + 52
3   ...C4CDAE39604B_PackageProduct         0x103ade028 monitorCachedData + 676
4   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
5   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 4 name:  SentryCrash Exception Handler (Secondary)
Thread 4:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f21a0 thread_suspend + 112
3   ...C4CDAE39604B_PackageProduct         0x103ad98e4 handleExceptions + 128
4   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
5   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 5 name:  SentryCrash Exception Handler (Primary)
Thread 5:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   ...C4CDAE39604B_PackageProduct         0x103ad9910 handleExceptions + 172
5   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
6   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 6 name:  io.sentry.app-hang-tracker
Thread 6:
0   libsystem_kernel.dylib                 0x1d00e6008 __semwait_signal + 8
1   libsystem_c.dylib                      0x19ab0a7d8 nanosleep + 220
2   Foundation                             0x18d982b60 +[NSThread sleepForTimeInterval:] + 160
3   ...C4CDAE39604B_PackageProduct         0x103a7fca0 -[SentryANRTracker detectANRs] + 448
4   Foundation                             0x18d92b808 __NSThread__start__ + 716
5   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
6   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 7 name:  reqwest-internal-sync-runtime
Thread 7:
0   libsystem_kernel.dylib                 0x1d00e7480 kevent + 8
1   RustMozillaAppServices                 0x103de7a0c mio::sys::unix::selector::kqueue::Selector::select::h964a2ff4ee7bfb2d + 104
2   RustMozillaAppServices                 0x1040e4510 tokio::io::driver::Driver::turn::hf600e905a79a0e7a + 140
3   RustMozillaAppServices                 0x1040f5ccc _$LT$tokio..park..either..Either$LT$A$C$B$GT$$u20$as$u20$tokio..park..Park$GT$::park_timeout::hddfeea6338045e6d + 64
4   RustMozillaAppServices                 0x1040f8500 tokio::time::driver::Driver$LT$P$GT$::park_internal::hd415631bca36dc4a + 340
5   RustMozillaAppServices                 0x1040f5c14 _$LT$tokio..park..either..Either$LT$A$C$B$GT$$u20$as$u20$tokio..park..Park$GT$::park::hfa813b42d4d71d3d + 56
6   RustMozillaAppServices                 0x1040fcd64 tokio::runtime::basic_scheduler::Context::enter::h09dfdae37304b634 + 100
7   RustMozillaAppServices                 0x1040fcacc tokio::runtime::basic_scheduler::Context::park::hbc07ade17b8d037b + 172
8   RustMozillaAppServices                 0x10400ed74 tokio::macros::scoped_tls::ScopedKey$LT$T$GT$::set::h1196fecc4241969f + 424
9   RustMozillaAppServices                 0x103fc4f60 tokio::runtime::basic_scheduler::CoreGuard::enter::h63a3d959417e78bc + 92
10  RustMozillaAppServices                 0x103fc44d4 tokio::runtime::basic_scheduler::BasicScheduler::block_on::h5367b796d2360cd2 + 308
11  RustMozillaAppServices                 0x10400ef00 tokio::runtime::Runtime::block_on::h4f4eefdf4e85b6f3 + 108
12  RustMozillaAppServices                 0x103fd7eb4 std::sys_common::backtrace::__rust_begin_short_backtrace::h63d6cbb8fe4216f2 + 584
13  RustMozillaAppServices                 0x103fcb720 std::panicking::try::h7f33bc975135bb05 + 52
14  RustMozillaAppServices                 0x103fcbf50 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h8e5a0327e225fcf6 + 132
15  RustMozillaAppServices                 0x10406c74c std::sys::unix::thread::Thread::new::thread_start::h95b46d8ef6f32ece + 36
16  libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
17  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 8 name:  JavaScriptCore libpas scavenger
Thread 8:
0   libsystem_kernel.dylib                 0x1d00e641c __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1e054f06c _pthread_cond_wait + 1232
2   JavaScriptCore                         0x1a6b863ec scavenger_thread_main + 1364
3   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
4   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 9 name:   Dispatch queue: */br
Thread 9:
0   RustMozillaAppServices                 0x1042776fc sqlite3BtreePayloadSize + 32
1   RustMozillaAppServices                 0x1042776f4 sqlite3BtreePayloadSize + 24
2   RustMozillaAppServices                 0x10428297c sqlite3VdbeExec + 9976
3   RustMozillaAppServices                 0x104241b14 sqlite3Step + 512
4   RustMozillaAppServices                 0x10423c2dc sqlite3_step + 104
5   Sync                                   0x104f48f58 ConcreteSQLiteDBConnection.executeChange(_:withArgs:) + 1252
6   Sync                                   0x104f4b3b8 protocol witness for SQLiteDBConnection.executeChange(_:withArgs:) in conformance ConcreteSQLiteDBConnection + 28
7   Sync                                   0x104f3c89c closure #1 in BrowserDB.run(_:) + 144
8   Sync                                   0x104f3d1f8 partial apply for closure #1 in BrowserDB.run(_:) + 16
9   Sync                                   0x104f4ab50 ConcreteSQLiteDBConnection.transaction<A>(_:) + 592
10  Sync                                   0x104f4b458 protocol witness for SQLiteDBConnection.transaction<A>(_:) in conformance ConcreteSQLiteDBConnection + 28
11  Sync                                   0x104f4dee0 partial apply for closure #1 in SwiftData.transaction<A>(synchronous:_:) + 96
12  Sync                                   0x104f4159c doWork #1 <A>() in SwiftData.withConnection<A>(_:synchronous:_:) + 604
13  Sync                                   0x104ef686c thunk for @escaping @callee_guaranteed () -> () + 28
14  libdispatch.dylib                      0x19aad1114 _dispatch_block_async_invoke2 + 148
15  libdispatch.dylib                      0x19aac1fdc _dispatch_client_callout + 20
16  libdispatch.dylib                      0x19aac9694 _dispatch_lane_serial_drain + 672
17  libdispatch.dylib                      0x19aaca1e0 _dispatch_lane_invoke + 384
18  libdispatch.dylib                      0x19aad4e10 _dispatch_workloop_worker_thread + 652
19  libsystem_pthread.dylib                0x1e0547df8 _pthread_wqthread + 288
20  libsystem_pthread.dylib                0x1e0547b98 start_wqthread + 8

Thread 10 name:  com.apple.NSURLConnectionLoader
Thread 10:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   CoreFoundation                         0x193562af0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x193563d34 __CFRunLoopRun + 1232
6   CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
7   CFNetwork                              0x1948c05a8 0x19466a000 + 2450856
8   Foundation                             0x18d92b808 __NSThread__start__ + 716
9   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
10  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 11:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 12:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 13:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x0000000000000000   x2: 0x0000000000000001   x3: 0x000000016dd5e408
    x4: 0x0000000000000001   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000403
    x8: 0x0000000000000400   x9: 0x00000001e9b54f80  x10: 0x0000000000000400  x11: 0x00000000000020ff
   x12: 0x00000001e9b59f20  x13: 0x001ffe2000000000  x14: 0x00000000000007fb  x15: 0x00000000d026305d
   x16: 0x0000000000000177  x17: 0xbb300001e9b54390  x18: 0x0000000000000000  x19: 0x0000000000000403
   x20: 0x0000000000000000  x21: 0x0000000000000000  x22: 0x0000000000000001  x23: 0x000000016dd5e408
   x24: 0x0000000000000001  x25: 0x000000016dd5e408  x26: 0x00000002828bda80  x27: 0x0000000000020400
   x28: 0x00000001e9b54f80   fp: 0x000000016dd5e3f0   lr: 0x000000019aae4f1c
    sp: 0x000000016dd5e390   pc: 0x00000001d00e60a0 cpsr: 0x00001000
   far: 0x000000011e28c2fe  esr: 0x56000080  Address size fault

Binary Images:
       0x1d00e5000 -        0x1d011bffb libsystem_kernel.dylib arm64e  <ff27fc8f90ba3332ab7ac5bc2d9ca7b1> /usr/lib/system/libsystem_kernel.dylib
       0x19aabe000 -        0x19ab04fff libdispatch.dylib arm64e  <fea36690a0003c55b7009120b05aa69b> /usr/lib/system/libdispatch.dylib
       0x104e90000 -        0x1050e3fff Sync arm64  <ac64eeb9344e34f18edae106ef58c849> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Sync.framework/Sync
       0x1020a0000 -        0x10273bfff Client arm64  <dc19cf31a24934959b7f2f77dce58b3f> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Client
       0x1934e8000 -        0x1938cdfff CoreFoundation arm64e  <5cdc5d9ae5063740b64ebb30867b4f1b> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x1cc865000 -        0x1cc86dfff GraphicsServices arm64e  <a633a095122639428f413877660185ee> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x1956a5000 -        0x196e82fff UIKitCore arm64e  <179501b60fc2344ab969b4e3961ebe10> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x1b1bbb000 -        0x1b1c3e00f dyld arm64e  <cb3ff411476234d286a4eca13f9fb6c3> /usr/lib/dyld
       0x18d8d0000 -        0x18e219fff Foundation arm64e  <c431acb6fe043d28b6774de6e1c7d81f> /System/Library/Frameworks/Foundation.framework/Foundation
       0x1e0547000 -        0x1e0552fff libsystem_pthread.dylib arm64e  <1aa3a4b6f9e730568c8b4e4dd81312a4> /usr/lib/system/libsystem_pthread.dylib
       0x1057f8000 -        0x105957fff Glean arm64  <2839d433a5a4320598878fcf21cccc7f> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Glean.framework/Glean
       0x19ab05000 -        0x19ab84ff7 libsystem_c.dylib arm64e  <dad0ce088f353ff4899e43dc44eb65a7> /usr/lib/system/libsystem_c.dylib
       0x103a78000 -        0x103b23fff Sentry_1BC4CDAE39604B_PackageProduct arm64  <24976486a8cf3a658089e6ae2b813fa1> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Sentry_1BC4CDAE39604B_PackageProduct.framework/Sentry_1BC4CDAE39604B_PackageProduct
       0x103be4000 -        0x104577fff RustMozillaAppServices arm64  <1292f595591d3a57b9fe9861b3c470c6> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/RustMozillaAppServices.framework/RustMozillaAppServices
       0x1a6a90000 -        0x1a7f4bfff JavaScriptCore arm64e  <d309aa36b4943228be7d44e5674ed663> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
       0x19466a000 -        0x194a31fff CFNetwork arm64e  <edb0559fc996327f9b3a6616e316f24d> /System/Library/Frameworks/CFNetwork.framework/CFNetwork

EOF

┆Issue is synchronized with this Jira Task

tarikeshaq commented 1 year ago

Another thing to note, is that my Sync account has a lot of history, so it could be something with the history sync taking a while...

A side note: with #12420 history sync will take significantly less time since its only syncs up to 5000 entries but I'm not exactly sure that's the case here

tarikeshaq commented 1 year ago

Looks like even after Sync is done, it's still reproducible, maybe my browser.db got corrupted somehow? The call that seems to crash is browserDB.forceClose and if I'm reading the logs right (which I could very well not be) the closing is taking too long?

I also have a second log for crashes, it's very similar but seems like this one the app is crashing on foreground and it's crashing when calling browserDB.reopen


Incident Identifier: DDA979D9-6256-4FF2-8DA4-38102ADB56A2
Beta Identifier:     144F73B6-55FE-4195-92BF-197142EAA1D2
Hardware Model:      iPhone14,7
Process:             Client [48440]
Path:                /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Client
Identifier:          org.mozilla.ios.FirefoxBeta
Version:             109.0 (24271)
AppStoreTools:       14C17
AppVariant:          1:iPhone14,7:16
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           org.mozilla.ios.FirefoxBeta [7934]

Date/Time:           2022-12-15 15:29:02.2060 -0500
Launch Time:         2022-12-15 15:28:50.1481 -0500
OS Version:          iPhone OS 16.1.1 (20B101)
Release Type:        User
Baseband Version:    1.13.03
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<org.mozilla.ios.FirefoxBeta>:48440] failed to terminate gracefully after 5.0s
ProcessVisibility: Unknown
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 8.290 (user 7.280, system 1.010), 22% CPU",
"Elapsed application CPU time (seconds): 6.144, 17% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib                 0x1d00e60a0 kevent_id + 8
1   libdispatch.dylib                      0x19aae4f1c _dispatch_kq_poll + 228
2   libdispatch.dylib                      0x19aae5940 _dispatch_event_loop_wait_for_ownership + 444
3   libdispatch.dylib                      0x19aad1844 __DISPATCH_WAIT_FOR_QUEUE__ + 340
4   libdispatch.dylib                      0x19aad140c _dispatch_sync_f_slow + 144
5   Sync                                   0x1032d6010 SwiftData.reopenIfClosed() + 172
6   Sync                                   0x1032d05d8 BrowserDB.reopenIfClosed() + 28
7   Client                                 0x10079bf74 BrowserProfile.reopen() + 172
8   Client                                 0x1006ca36c specialized AppDelegate.applicationDidBecomeActive(_:) + 164
9   Client                                 0x1006c926c AppDelegate.handleNotifications(_:) + 232
10  Client                                 0x1006c9404 @objc AppDelegate.handleNotifications(_:) + 128
11  CoreFoundation                         0x19351f404 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
12  CoreFoundation                         0x1935c6474 ___CFXRegistrationPost_block_invoke + 88
13  CoreFoundation                         0x1935a9724 _CFXRegistrationPost + 440
14  CoreFoundation                         0x193533a08 _CFXNotificationPost + 704
15  Foundation                             0x18d92cffc -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
16  UIKitCore                              0x195936530 -[UIApplication _stopDeactivatingForReason:] + 1236
17  UIKitCore                              0x1958493a0 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 108
18  UIKitCore                              0x195743600 _UIScenePerformActionsWithLifecycleActionMask + 108
19  UIKitCore                              0x195a85918 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216
20  UIKitCore                              0x195935fa4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 220
21  UIKitCore                              0x195935dcc -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 620
22  UIKitCore                              0x19593597c -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 252
23  UIKitCore                              0x195935848 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148
24  UIKitCore                              0x196017fa8 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736
25  UIKitCore                              0x1960b0f98 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224
26  UIKitCore                              0x1957e1958 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316
27  UIKitCore                              0x195c547a8 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.214 + 556
28  UIKitCore                              0x1958b40b8 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216
29  UIKitCore                              0x1958b3f28 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244
30  UIKitCore                              0x1958b3d68 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336
31  FrontBoardServices                     0x1a910dcdc -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 420
32  FrontBoardServices                     0x1a910db18 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 144
33  FrontBoardServices                     0x1a9111294 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
34  FrontBoardServices                     0x1a91111b0 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 340
35  libdispatch.dylib                      0x19aac1fdc _dispatch_client_callout + 20
36  libdispatch.dylib                      0x19aac5a5c _dispatch_block_invoke_direct + 264
37  FrontBoardServices                     0x1a911b3b0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
38  FrontBoardServices                     0x1a911af4c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
39  FrontBoardServices                     0x1a911d72c -[FBSSerialQueue _performNextFromRunLoopSource] + 28
40  CoreFoundation                         0x1935bdf54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
41  CoreFoundation                         0x1935ca32c __CFRunLoopDoSource0 + 176
42  CoreFoundation                         0x19354e210 __CFRunLoopDoSources0 + 244
43  CoreFoundation                         0x193563ba8 __CFRunLoopRun + 836
44  CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
45  GraphicsServices                       0x1cc866368 GSEventRunModal + 164
46  UIKitCore                              0x195a473d0 -[UIApplication _run] + 888
47  UIKitCore                              0x195a47034 UIApplicationMain + 340
48  Client                                 0x100418dcc main + 304
49  dyld                                   0x1b1bd0960 start + 2528

Thread 1 name:   Dispatch queue: */br
Thread 1:
0   RustMozillaAppServices                 0x102614460 sqlite3VdbeExec + 476
1   RustMozillaAppServices                 0x10261a9dc sqlite3VdbeExec + 26456
2   RustMozillaAppServices                 0x1025d5b14 sqlite3Step + 512
3   RustMozillaAppServices                 0x1025d02dc sqlite3_step + 104
4   Sync                                   0x1032dcf58 ConcreteSQLiteDBConnection.executeChange(_:withArgs:) + 1252
5   Sync                                   0x1032df3b8 protocol witness for SQLiteDBConnection.executeChange(_:withArgs:) in conformance ConcreteSQLiteDBConnection + 28
6   Sync                                   0x1032d089c closure #1 in BrowserDB.run(_:) + 144
7   Sync                                   0x1032d11f8 partial apply for closure #1 in BrowserDB.run(_:) + 16
8   Sync                                   0x1032deb50 ConcreteSQLiteDBConnection.transaction<A>(_:) + 592
9   Sync                                   0x1032df458 protocol witness for SQLiteDBConnection.transaction<A>(_:) in conformance ConcreteSQLiteDBConnection + 28
10  Sync                                   0x1032e1ee0 partial apply for closure #1 in SwiftData.transaction<A>(synchronous:_:) + 96
11  Sync                                   0x1032d559c doWork #1 <A>() in SwiftData.withConnection<A>(_:synchronous:_:) + 604
12  Sync                                   0x10328a86c thunk for @escaping @callee_guaranteed () -> () + 28
13  libdispatch.dylib                      0x19aad1114 _dispatch_block_async_invoke2 + 148
14  libdispatch.dylib                      0x19aac1fdc _dispatch_client_callout + 20
15  libdispatch.dylib                      0x19aac9694 _dispatch_lane_serial_drain + 672
16  libdispatch.dylib                      0x19aaca1e0 _dispatch_lane_invoke + 384
17  libdispatch.dylib                      0x19aad4e10 _dispatch_workloop_worker_thread + 652
18  libsystem_pthread.dylib                0x1e0547df8 _pthread_wqthread + 288
19  libsystem_pthread.dylib                0x1e0547b98 start_wqthread + 8

Thread 2 name:  com.apple.uikit.eventfetch-thread
Thread 2:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   CoreFoundation                         0x193562af0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x193563d34 __CFRunLoopRun + 1232
6   CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
7   Foundation                             0x18d912334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8   Foundation                             0x18d91221c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9   UIKitCore                              0x195b7c33c -[UIEventFetcher threadMain] + 436
10  Foundation                             0x18d92b808 __NSThread__start__ + 716
11  libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
12  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 3:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 4 name:  glean.dispatcher
Thread 4:
0   libsystem_kernel.dylib                 0x1d00e641c __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1e054f06c _pthread_cond_wait + 1232
2   Glean                                  0x103c654a0 std::thread::park::hf7060706a22e96bf + 124
3   Glean                                  0x103bf30b0 crossbeam_channel::context::Context::wait_until::hdfc1af2eebf8a4fc (.1918) + 152
4   Glean                                  0x103bf9680 crossbeam_channel::context::Context::with::_$u7b$$u7b$closure$u7d$$u7d$::h4372882d8ca58345 + 156
5   Glean                                  0x103c16514 std::sys_common::backtrace::__rust_begin_short_backtrace::h42ffb6ab312bd37e + 3560
6   Glean                                  0x103c1f114 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h5eabb0245706d825 + 124
7   Glean                                  0x103c822d4 std::sys::unix::thread::Thread::new::thread_start::hbc52c4a0aa5ba80b + 36
8   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
9   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 5:
0   libsystem_kernel.dylib                 0x1d00e6008 __semwait_signal + 8
1   libsystem_c.dylib                      0x19ab0a7d8 nanosleep + 220
2   libsystem_c.dylib                      0x19ab1ead8 sleep + 52
3   ...C4CDAE39604B_PackageProduct         0x101e72028 monitorCachedData + 676
4   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
5   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 6 name:  SentryCrash Exception Handler (Secondary)
Thread 6:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f21a0 thread_suspend + 112
3   ...C4CDAE39604B_PackageProduct         0x101e6d8e4 handleExceptions + 128
4   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
5   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 7 name:  SentryCrash Exception Handler (Primary)
Thread 7:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   ...C4CDAE39604B_PackageProduct         0x101e6d910 handleExceptions + 172
5   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
6   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 8 name:  io.sentry.app-hang-tracker
Thread 8:
0   libsystem_kernel.dylib                 0x1d00e6008 __semwait_signal + 8
1   libsystem_c.dylib                      0x19ab0a7d8 nanosleep + 220
2   Foundation                             0x18d982b60 +[NSThread sleepForTimeInterval:] + 160
3   ...C4CDAE39604B_PackageProduct         0x101e13ca0 -[SentryANRTracker detectANRs] + 448
4   Foundation                             0x18d92b808 __NSThread__start__ + 716
5   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
6   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 9 name:  reqwest-internal-sync-runtime
Thread 9:
0   libsystem_kernel.dylib                 0x1d00e7480 kevent + 8
1   RustMozillaAppServices                 0x10217ba0c mio::sys::unix::selector::kqueue::Selector::select::h964a2ff4ee7bfb2d + 104
2   RustMozillaAppServices                 0x102478510 tokio::io::driver::Driver::turn::hf600e905a79a0e7a + 140
3   RustMozillaAppServices                 0x102489ccc _$LT$tokio..park..either..Either$LT$A$C$B$GT$$u20$as$u20$tokio..park..Park$GT$::park_timeout::hddfeea6338045e6d + 64
4   RustMozillaAppServices                 0x10248c500 tokio::time::driver::Driver$LT$P$GT$::park_internal::hd415631bca36dc4a + 340
5   RustMozillaAppServices                 0x102489c14 _$LT$tokio..park..either..Either$LT$A$C$B$GT$$u20$as$u20$tokio..park..Park$GT$::park::hfa813b42d4d71d3d + 56
6   RustMozillaAppServices                 0x102490d64 tokio::runtime::basic_scheduler::Context::enter::h09dfdae37304b634 + 100
7   RustMozillaAppServices                 0x102490acc tokio::runtime::basic_scheduler::Context::park::hbc07ade17b8d037b + 172
8   RustMozillaAppServices                 0x1023a2d74 tokio::macros::scoped_tls::ScopedKey$LT$T$GT$::set::h1196fecc4241969f + 424
9   RustMozillaAppServices                 0x102358f60 tokio::runtime::basic_scheduler::CoreGuard::enter::h63a3d959417e78bc + 92
10  RustMozillaAppServices                 0x1023584d4 tokio::runtime::basic_scheduler::BasicScheduler::block_on::h5367b796d2360cd2 + 308
11  RustMozillaAppServices                 0x1023a2f00 tokio::runtime::Runtime::block_on::h4f4eefdf4e85b6f3 + 108
12  RustMozillaAppServices                 0x10236beb4 std::sys_common::backtrace::__rust_begin_short_backtrace::h63d6cbb8fe4216f2 + 584
13  RustMozillaAppServices                 0x10235f720 std::panicking::try::h7f33bc975135bb05 + 52
14  RustMozillaAppServices                 0x10235ff50 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h8e5a0327e225fcf6 + 132
15  RustMozillaAppServices                 0x10240074c std::sys::unix::thread::Thread::new::thread_start::h95b46d8ef6f32ece + 36
16  libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
17  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 10:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 11:
0   libsystem_pthread.dylib                0x1e0547b90 start_wqthread + 0

Thread 12 name:  com.apple.NSURLConnectionLoader
Thread 12:
0   libsystem_kernel.dylib                 0x1d00e5b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1d00f8008 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1d00f8248 mach_msg_overwrite + 388
3   libsystem_kernel.dylib                 0x1d00e608c mach_msg + 24
4   CoreFoundation                         0x193562af0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x193563d34 __CFRunLoopRun + 1232
6   CoreFoundation                         0x193568ed4 CFRunLoopRunSpecific + 612
7   CFNetwork                              0x1948c05a8 0x19466a000 + 2450856
8   Foundation                             0x18d92b808 __NSThread__start__ + 716
9   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
10  libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 13 name:  JavaScriptCore libpas scavenger
Thread 13:
0   libsystem_kernel.dylib                 0x1d00e641c __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1e054f06c _pthread_cond_wait + 1232
2   JavaScriptCore                         0x1a6b863ec scavenger_thread_main + 1364
3   libsystem_pthread.dylib                0x1e05486cc _pthread_start + 148
4   libsystem_pthread.dylib                0x1e0547ba4 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x0000000000000000   x2: 0x0000000000000001   x3: 0x000000016f9eca48
    x4: 0x0000000000000001   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000403
    x8: 0x0000000000000400   x9: 0x00000001e9b54f80  x10: 0x0000000000000400  x11: 0x00000000000020ff
   x12: 0x00000001e9b59f20  x13: 0x001ffe2000000000  x14: 0x00000000000007fb  x15: 0x000000008307904e
   x16: 0x0000000000000177  x17: 0xbb300001e9b54390  x18: 0x0000000000000000  x19: 0x0000000000000403
   x20: 0x0000000000000000  x21: 0x0000000000000000  x22: 0x0000000000000001  x23: 0x000000016f9eca48
   x24: 0x0000000000000001  x25: 0x000000016f9eca48  x26: 0x0000000280465a00  x27: 0x0000000000020400
   x28: 0x00000001e9b54f80   fp: 0x000000016f9eca30   lr: 0x000000019aae4f1c
    sp: 0x000000016f9ec9d0   pc: 0x00000001d00e60a0 cpsr: 0x00001000
   far: 0x00000001e9db11d8  esr: 0x56000080  Address size fault

Binary Images:
       0x1d00e5000 -        0x1d011bffb libsystem_kernel.dylib arm64e  <ff27fc8f90ba3332ab7ac5bc2d9ca7b1> /usr/lib/system/libsystem_kernel.dylib
       0x19aabe000 -        0x19ab04fff libdispatch.dylib arm64e  <fea36690a0003c55b7009120b05aa69b> /usr/lib/system/libdispatch.dylib
       0x103224000 -        0x103477fff Sync arm64  <ac64eeb9344e34f18edae106ef58c849> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Sync.framework/Sync
       0x100410000 -        0x100aabfff Client arm64  <dc19cf31a24934959b7f2f77dce58b3f> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Client
       0x1934e8000 -        0x1938cdfff CoreFoundation arm64e  <5cdc5d9ae5063740b64ebb30867b4f1b> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x18d8d0000 -        0x18e219fff Foundation arm64e  <c431acb6fe043d28b6774de6e1c7d81f> /System/Library/Frameworks/Foundation.framework/Foundation
       0x1956a5000 -        0x196e82fff UIKitCore arm64e  <179501b60fc2344ab969b4e3961ebe10> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x1a910a000 -        0x1a91affff FrontBoardServices arm64e  <65e92d01137f3e1698a6a33706699695> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
       0x1cc865000 -        0x1cc86dfff GraphicsServices arm64e  <a633a095122639428f413877660185ee> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x1b1bbb000 -        0x1b1c3e00f dyld arm64e  <cb3ff411476234d286a4eca13f9fb6c3> /usr/lib/dyld
       0x101f78000 -        0x10290bfff RustMozillaAppServices arm64  <1292f595591d3a57b9fe9861b3c470c6> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/RustMozillaAppServices.framework/RustMozillaAppServices
       0x1e0547000 -        0x1e0552fff libsystem_pthread.dylib arm64e  <1aa3a4b6f9e730568c8b4e4dd81312a4> /usr/lib/system/libsystem_pthread.dylib
       0x103b8c000 -        0x103cebfff Glean arm64  <2839d433a5a4320598878fcf21cccc7f> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Glean.framework/Glean
       0x19ab05000 -        0x19ab84ff7 libsystem_c.dylib arm64e  <dad0ce088f353ff4899e43dc44eb65a7> /usr/lib/system/libsystem_c.dylib
       0x101e0c000 -        0x101eb7fff Sentry_1BC4CDAE39604B_PackageProduct arm64  <24976486a8cf3a658089e6ae2b813fa1> /private/var/containers/Bundle/Application/C4A33F53-DCD0-449F-8BA5-A4FA863573FA/Client.app/Frameworks/Sentry_1BC4CDAE39604B_PackageProduct.framework/Sentry_1BC4CDAE39604B_PackageProduct
       0x19466a000 -        0x194a31fff CFNetwork arm64e  <edb0559fc996327f9b3a6616e316f24d> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
       0x1a6a90000 -        0x1a7f4bfff JavaScriptCore arm64e  <d309aa36b4943228be7d44e5674ed663> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore

EOF
dnarcese commented 1 year ago

@tarikeshaq can you reproduce this on 109 prod version?

tarikeshaq commented 1 year ago

@dnarcese no - when I debugged last time I had to resync all my data a few times to trigger this state again. Not sure if fixes landed in 109 that could have alleviated it, or if it's just not as consistent anymore but I'm not seeing it so I'll close the ticket