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

fix: iOS Crash at 0xfffffffffffffffe #1700

Closed
eseidel opened this issue Feb 5, 2024 · 8 comments
Closed

fix: iOS Crash at 0xfffffffffffffffe #1700

eseidel opened this issue Feb 5, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@eseidel
Copy link
Contributor

eseidel commented Feb 5, 2024

https://discord.com/channels/1030243211995791380/1125516353370075306/1202928574097657906

Manually symbolicated:

1   App                                      0x1104e666c kDartIsolateSnapshotInstructions + 122412 
     0x2E66C    FutureListener.handleValue (in App) (future_impl.dart:162)
2   App                                      0x1104e64fc kDartIsolateSnapshotInstructions + 122044
    0x2E4FC    Future._propagateToListeners.handleValueCallback (in App) (future_impl.dart:848)
3   App                                      0x1104e481c kDartIsolateSnapshotInstructions + 114652
    0x2C81C    Future._propagateToListeners (in App) (future_impl.dart:879)
4   App                                      0x1104e5130 kDartIsolateSnapshotInstructions + 116976
    0x2D130    Future._completeWithValue (in App) (future_impl.dart:642)
5   App                                      0x110a6f0d0 kDartIsolateSnapshotInstructions + 5925008
    0x5B70D0    SuspendState._returnAsync (in App) (async_patch.dart:340)
6   App                                      0x1104bc588 kDartVmSnapshotInstructions + 1416
    0x4588    stub RunDartOnCPU (in App) + 160
7   ???                               0xfffffffffffffffe ???
8   App                                      0x1104e666c kDartIsolateSnapshotInstructions + 122412
    0x2E66C    FutureListener.handleValue (in App) (future_impl.dart:162)
9   App                                      0x1104e64fc kDartIsolateSnapshotInstructions + 122044
    0x2E4FC    Future._propagateToListeners.handleValueCallback (in App) (future_impl.dart:848)
10  App                                      0x1104e481c kDartIsolateSnapshotInstructions + 114652
    0x2C81C    Future._propagateToListeners (in App) (future_impl.dart:879)
11  App                                      0x1104e6ffc kDartIsolateSnapshotInstructions + 124860
     0x2EFFC    Future._complete (in App) (future_impl.dart:623)
12  App                                      0x1109dfdec kDartIsolateSnapshotInstructions + 5338540
    0x527DEC    SyncCompleter.complete (in App) (future_impl.dart:58)
13  App                                      0x11051bc20 kDartIsolateSnapshotInstructions + 340960
    0x63C20    Isolate._spawnCommon.<anonymous closure> (in App) (isolate_patch.dart:0)
14  App                                      0x110a72864 kDartIsolateSnapshotInstructions + 5939236
    0x5BA864    Closure.call (#2) (in App) (function.dart:1)
15  App                                      0x110518d5c kDartIsolateSnapshotInstructions + 328988
    0x60D5C    RawReceivePort._handleMessage (in App) (isolate_patch.dart:185)
16  App                                      0x1104bc588 kDartVmSnapshotInstructions + 1416
    0x4588    stub RunDartOnCPU (in App) + 160
17  ???                               0xfffffffffffffffe ???
@eseidel eseidel added the bug Something isn't working label Feb 5, 2024
@eseidel
Copy link
Contributor Author

eseidel commented Feb 5, 2024

Likely the same as #1698.

@eseidel
Copy link
Contributor Author

eseidel commented Feb 7, 2024

If anyone is experiencing this and is using a crash reporting service, we've added a new guide on how to get the corresponding .dsym files to upload them to your service for more detailed reports:
https://docs.shorebird.dev/guides/crash-reporting

@jonasbark
Copy link

Incident Identifier: C3840B72-8AB0-496E-911A-F9BEE0762E23
Hardware Model:      iPhone8,1
Process:             Runner [897]
Path:                /private/var/containers/Bundle/Application/1B74C3B2-075D-48FD-8DB9-07E600D61B74/Runner.app/Runner
Identifier:          io.fieldbots.app
Version:             4.3.0 (348)
AppStoreTools:       15C5500a
AppVariant:          1:iPhone8,1:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           io.fieldbots.app [540]

Date/Time:           2024-02-08 10:25:43.8714 +0100
Launch Time:         2024-02-08 10:25:26.1192 +0100
OS Version:          iPhone OS 15.7.9 (19H365)
Release Type:        User
Baseband Version:    9.61.00
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: UNKNOWN_0x101 at 0xfffffffffffffffe
Exception Codes: 0x0000000000000101, 0xfffffffffffffffe
VM Region Info: 0xfffffffffffffffe is not in any region.  Bytes after previous region: 18446743592673214463  
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      commpage (reserved)     1000000000-7000000000 [384.0G] ---/--- SM=NUL  ...(unallocated)
--->  
      UNUSED SPACE AT END
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 10 Bus error: 10
Terminating Process: exc handler [897]

Triggered by Thread:  6


Kernel Triage:
VM - Fault hit memory shortage
VM - Fault hit memory shortage
VM - Fault hit memory shortage
VM - Fault hit memory shortage
VM - Fault hit memory shortage


Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib        	0x00000001bc409aac mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001bc40a07c mach_msg + 72 (mach_msg.c:119)
2   CoreFoundation                	0x0000000181ac3c88 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646)
3   CoreFoundation                	0x0000000181ac7f90 __CFRunLoopRun + 1160 (CFRunLoop.c:3000)
4   CoreFoundation                	0x0000000181adb174 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
5   GraphicsServices              	0x00000001a25f6988 GSEventRunModal + 160 (GSEvent.c:2200)
6   UIKitCore                     	0x00000001842dda88 -[UIApplication _run] + 1080 (UIApplication.m:3511)
7   UIKitCore                     	0x0000000184076f78 UIApplicationMain + 336 (UIApplication.m:5064)
8   Runner                        	0x000000010014472c main + 64 (AppDelegate.swift:5)
9   dyld                          	0x00000001002cc4d0 start + 444 (dyldMain.cpp:879)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib        	0x00000001bc409aac mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001bc40a07c mach_msg + 72 (mach_msg.c:119)
2   IOKit                         	0x000000018e251610 io_connect_method + 508 (:-1)
3   IOKit                         	0x000000018e2509bc IOConnectCallMethod + 172 (IOKitLib.c:2270)
4   IOGPU                         	0x00000001cd7062d0 IOGPUCommandQueueSubmitCommandBuffers + 140 (IOGPUCommandQueue.c:352)
5   IOGPU                         	0x00000001cd7065ec -[IOGPUMetalCommandQueue _submitCommandBuffers:count:] + 744 (IOGPUMetalCommandQueue.m:267)
6   IOGPU                         	0x00000001cd707e80 -[IOGPUMetalCommandQueue submitCommandBuffers:count:] + 84 (IOGPUMetalCommandQueue.m:196)
7   Metal                         	0x000000019aefd11c -[_MTLCommandQueue _submitAvailableCommandBuffers] + 680 (MTLCommandQueue.m:0)
8   libdispatch.dylib             	0x0000000181810094 _dispatch_client_callout + 16 (object.m:560)
9   libdispatch.dylib             	0x00000001817b2bb8 _dispatch_continuation_pop$VARIANT$mp + 440 (inline_internal.h:2622)
10  libdispatch.dylib             	0x00000001817c48dc _dispatch_source_invoke$VARIANT$mp + 1668 (source.c:596)
11  libdispatch.dylib             	0x00000001817b6610 _dispatch_lane_serial_drain$VARIANT$mp + 344 (inline_internal.h:0)
12  libdispatch.dylib             	0x00000001817b71f4 _dispatch_lane_invoke$VARIANT$mp + 408 (queue.c:3944)
13  libdispatch.dylib             	0x00000001817c0ec8 _dispatch_workloop_worker_thread + 632 (queue.c:6732)
14  libsystem_pthread.dylib       	0x00000001dcf70e00 _pthread_wqthread + 284 (pthread.c:2599)
15  libsystem_pthread.dylib       	0x00000001dcf7092c start_wqthread + 8 (:-1)

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib        	0x00000001bc409aac mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001bc40a07c mach_msg + 72 (mach_msg.c:119)
2   CoreFoundation                	0x0000000181ac3c88 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646)
3   CoreFoundation                	0x0000000181ac7f90 __CFRunLoopRun + 1160 (CFRunLoop.c:3000)
4   CoreFoundation                	0x0000000181adb174 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
5   Foundation                    	0x00000001831e7eac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:373)
6   Foundation                    	0x0000000183226fd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:420)
7   UIKitCore                     	0x000000018425cef4 -[UIEventFetcher threadMain] + 512 (UIEventFetcher.m:1167)
8   Foundation                    	0x0000000183234bdc __NSThread__start__ + 792 (NSThread.m:972)
9   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
10  libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 3:
0   libsystem_pthread.dylib       	0x00000001dcf70924 start_wqthread + 0 (:-1)

Thread 4:
0   libsystem_pthread.dylib       	0x00000001dcf70924 start_wqthread + 0 (:-1)

Thread 5:
0   libsystem_pthread.dylib       	0x00000001dcf70924 start_wqthread + 0 (:-1)

Thread 6 name:
Thread 6 Crashed:
0   ???                           	0x0000007ffffffffe 0x0 + 549755813886
1   App                           	0x000000010764a88c _RootZone.runUnary + 40 (zone.dart:1661)
2   App                           	0x000000010764a88c FutureListener.handleValue + 220 (future_impl.dart:162)
3   App                           	0x000000010764a71c Future._propagateToListeners.handleValueCallback + 52 (future_impl.dart:846)
4   App                           	0x0000000107648a5c Future._propagateToListeners + 964 (future_impl.dart:875)
5   App                           	0x00000001076492f8 Future._completeWithValue + 116 (future_impl.dart:647)
6   App                           	0x0000000107f5cc20 SuspendState._returnAsync + 276 (async_patch.dart:352)
7   App                           	0x0000000107638588 stub RunDartOnCPU + 160
8   ???                           	0x0000007ffffffffe 0x0 + 549755813886
9   App                           	0x000000010764a88c _RootZone.runUnary + 40 (zone.dart:1661)
10  App                           	0x000000010764a88c FutureListener.handleValue + 220 (future_impl.dart:162)
11  App                           	0x000000010764a71c Future._propagateToListeners.handleValueCallback + 52 (future_impl.dart:846)
12  App                           	0x0000000107648a5c Future._propagateToListeners + 964 (future_impl.dart:875)
13  App                           	0x000000010764b23c Future._complete + 388 (future_impl.dart:638)
14  App                           	0x0000000107e9b1d8 SyncCompleter.complete + 196 (future_impl.dart:59)
15  App                           	0x000000010775f33c Isolate._spawnCommon.<anonymous closure> + 656 (isolate_patch.dart:487)
16  App                           	0x0000000107f60174 Closure.call (#2) + 700 (function.dart:0)
17  App                           	0x0000000107690560 RawReceivePort._handleMessage + 180 (isolate_patch.dart:184)
18  App                           	0x0000000107638588 stub RunDartOnCPU + 160
19  ???                           	0x0000007ffffffffe 0x0 + 549755813886

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bc4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:862)
2   Metal                         	0x000000019aefe144 -[_MTLCommandBuffer waitUntilScheduled] + 80 (MTLCommandBuffer.m:725)
3   Flutter                       	0x00000001024373b4 0x101d40000 + 7304116
4   Flutter                       	0x00000001023903b0 0x101d40000 + 6620080
5   Flutter                       	0x00000001027b0fa4 0x101d40000 + 10948516
6   Flutter                       	0x0000000102679184 0x101d40000 + 9671044
7   Flutter                       	0x00000001025b2d60 0x101d40000 + 8858976
8   Flutter                       	0x00000001025b2fb4 0x101d40000 + 8859572
9   Flutter                       	0x00000001024ae35c 0x101d40000 + 7791452
10  Flutter                       	0x00000001025b2648 0x101d40000 + 8857160
11  Flutter                       	0x00000001025b39ac 0x101d40000 + 8862124
12  Flutter                       	0x00000001025b31ec 0x101d40000 + 8860140
13  Flutter                       	0x00000001025cb53c 0x101d40000 + 8959292
14  Flutter                       	0x00000001024ac990 0x101d40000 + 7784848
15  Flutter                       	0x00000001024b0124 0x101d40000 + 7799076
16  CoreFoundation                	0x0000000181b641b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28 (CFRunLoop.c:1812)
17  CoreFoundation                	0x0000000181aeda38 __CFRunLoopDoTimer + 1008 (CFRunLoop.c:2420)
18  CoreFoundation                	0x0000000181ae85e8 __CFRunLoopDoTimers + 316 (CFRunLoop.c:2580)
19  CoreFoundation                	0x0000000181ac82b4 __CFRunLoopRun + 1964 (CFRunLoop.c:3116)
20  CoreFoundation                	0x0000000181adb174 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
21  Flutter                       	0x00000001024b0210 0x101d40000 + 7799312
22  Flutter                       	0x00000001024af884 0x101d40000 + 7796868
23  libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
24  libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib        	0x00000001bc409aac mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib        	0x00000001bc40a07c mach_msg + 72 (mach_msg.c:119)
2   CoreFoundation                	0x0000000181ac3c88 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646)
3   CoreFoundation                	0x0000000181ac7f90 __CFRunLoopRun + 1160 (CFRunLoop.c:3000)
4   CoreFoundation                	0x0000000181adb174 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
5   Flutter                       	0x00000001024b0210 0x101d40000 + 7799312
6   Flutter                       	0x00000001024af884 0x101d40000 + 7796868
7   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
8   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bc4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:862)
2   Flutter                       	0x000000010221dc34 0x101d40000 + 5102644
3   Flutter                       	0x00000001024a9464 0x101d40000 + 7771236
4   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
5   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bc4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:862)
2   Flutter                       	0x000000010221dc34 0x101d40000 + 5102644
3   Flutter                       	0x00000001024a9464 0x101d40000 + 7771236
4   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
5   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib        	0x00000001bc411390 shutdown + 8
1   Flutter                       	0x0000000102769354 0x101d40000 + 10654548
2   Flutter                       	0x00000001027966cc 0x101d40000 + 10839756
3   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
4   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 13 name:
Thread 13:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 14 name:
Thread 14:
0   Flutter                       	0x00000001028b6c44 0x101d40000 + 12020804
1   Flutter                       	0x00000001028b6028 0x101d40000 + 12017704
2   Flutter                       	0x00000001028a710c 0x101d40000 + 11956492
3   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
4   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
5   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 15 name:
Thread 15:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001027f6d24 0x101d40000 + 11234596
4   Flutter                       	0x00000001028a7250 0x101d40000 + 11956816
5   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
6   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
7   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 17 name:
Thread 17:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 18 name:
Thread 18:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bc4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:862)
2   Flutter                       	0x00000001028bf9f0 0x101d40000 + 12057072
3   Flutter                       	0x00000001028c0418 0x101d40000 + 12059672
4   Flutter                       	0x000000010281398c 0x101d40000 + 11352460
5   Flutter                       	0x000000010288c318 0x101d40000 + 11846424
6   App                           	0x00000001076422a0 stub CallToRuntime + 224
7   App                           	0x0000000107f5b000 stub _iso_stub_StackOverflowSharedWithoutFPURegsStub + 72
8   Flutter                       	0x00000001028990ec 0x101d40000 + 11899116
9   Flutter                       	0x000000010289c7c4 0x101d40000 + 11913156
10  Flutter                       	0x00000001027f00bc 0x101d40000 + 11206844
11  Flutter                       	0x00000001027fc2c8 0x101d40000 + 11256520
12  Flutter                       	0x0000000102801940 0x101d40000 + 11278656
13  Flutter                       	0x0000000102801640 0x101d40000 + 11277888
14  Flutter                       	0x00000001028a710c 0x101d40000 + 11956492
15  Flutter                       	0x000000010285f554 0x101d40000 + 11662676
16  libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
17  libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 19 name:
Thread 19:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001027f6d24 0x101d40000 + 11234596
4   Flutter                       	0x00000001028a7250 0x101d40000 + 11956816
5   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
6   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
7   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 20 name:
Thread 20:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 21 name:
Thread 21:
0   libsystem_kernel.dylib        	0x00000001bc40b088 __psynch_mutexdrop + 8
1   libsystem_pthread.dylib       	0x00000001dcf73bd8 _pthread_mutex_firstfit_wake + 24 (pthread_mutex.c:1317)
2   libsystem_pthread.dylib       	0x00000001dcf79804 _pthread_mutex_firstfit_unlock_slow$VARIANT$mp + 276 (pthread_mutex.c:1346)
3   Flutter                       	0x00000001028b54f4 0x101d40000 + 12014836
4   Flutter                       	0x00000001028b5eb8 0x101d40000 + 12017336
5   Flutter                       	0x00000001028a710c 0x101d40000 + 11956492
6   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
7   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
8   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 22 name:
Thread 22:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 23 name:
Thread 23:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 24 name:
Thread 24:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 25 name:
Thread 25:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)

Thread 26 name:
Thread 26:
0   libsystem_kernel.dylib        	0x00000001bc40a484 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001dcf78bf0 _pthread_cond_wait$VARIANT$mp + 1284 (pthread_cond.c:862)
2   Flutter                       	0x000000010285fb88 0x101d40000 + 11664264
3   Flutter                       	0x00000001028a721c 0x101d40000 + 11956764
4   Flutter                       	0x000000010285f554 0x101d40000 + 11662676
5   libsystem_pthread.dylib       	0x00000001dcf72338 _pthread_start + 116 (pthread.c:891)
6   libsystem_pthread.dylib       	0x00000001dcf70938 thread_start + 8 (:-1)


Thread 6 crashed with ARM Thread State (64-bit):
    x0: 0x0000000114e6a819   x1: 0x0000000114e6aff9   x2: 0x0000000101908081   x3: 0x0000000114e74be9
    x4: 0x00000000000000ac   x5: 0x0000000114e6a9e9   x6: 0x0000000114e6b148   x7: 0x00000000000000ff
    x8: 0x00000001019dea31   x9: 0x00000001089c4550  x10: 0x0000000102d7f3d0  x11: 0x00000001707c7150
   x12: 0x35772e64e60b00b9  x13: 0x0000000000000000  x14: 0x0000000000000011  x15: 0x0000000101affac8
   x16: 0x0000000000000000  x17: 0x0000000000000008  x18: 0x0000000000000000  x19: 0x4176fd8720000000
   x20: 0x4176fd8720000000  x21: 0x0000000108a88000  x22: 0x0000000101908081  x23: 0x4176fd8720000000
   x24: 0x0000000101c317a1  x25: 0x0000000101a1f000  x26: 0x000000010104dc00  x27: 0x0000000108900080
   x28: 0x0000000c00000000   fp: 0x0000000101affae8   lr: 0xfffffffffffffffe
    sp: 0x0000000101a1f000   pc: 0xfffffffffffffffe cpsr: 0x40000000
   esr: 0x8a000000 (PC alignment)


Binary Images:
        0x100140000 -         0x1001b3fff Runner arm64  <a919c8098d9b380eb113b0f1fa67d006> /private/var/containers/Bundle/Application/1B74C3B2-075D-48FD-8DB9-07E600D61B74/Runner.app/Runner
        0x1002b4000 -         0x100307fff dyld arm64  <58ab16ced7e032d3946d4f68fb1a4a17> /usr/lib/dyld
        0x101d40000 -         0x102cc3fff Flutter arm64  <4c4c441955553144a121660a3448dee5> /private/var/containers/Bundle/Application/1B74C3B2-075D-48FD-8DB9-07E600D61B74/Runner.app/Frameworks/Flutter.framework/Flutter
        0x107634000 -         0x1086f3fff App arm64  <bf9889606c173b25acf65f3cd6af587b> /private/var/containers/Bundle/Application/1B74C3B2-075D-48FD-8DB9-07E600D61B74/Runner.app/Frameworks/App.framework/App
        0x1817ac000 -         0x18182efff libdispatch.dylib arm64  <34ef3925030330bf9946ad99311620dd> /usr/lib/system/libdispatch.dylib
        0x181abd000 -         0x181efafff CoreFoundation arm64  <717d70c93b8e3abcae16050588fc3ee8> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
        0x1831d0000 -         0x1834b4fff Foundation arm64  <c3a840e10d1132a3937f7f668ffb13f0> /System/Library/Frameworks/Foundation.framework/Foundation
        0x183df8000 -         0x185593fff UIKitCore arm64  <36ae0870fed03b878a60bb2ee5192744> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
        0x18e24e000 -         0x18e2fdfff IOKit arm64  <2b1882faa1a630a08d05ef5e76405af0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
        0x19aeea000 -         0x19b012fff Metal arm64  <14423c0ab4e835d49956053fdce96dc7> /System/Library/Frameworks/Metal.framework/Metal
        0x1a25f5000 -         0x1a25fdfff GraphicsServices arm64  <8f5bd2c4f5d5358e82bd1b2259a5c050> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
        0x1bc409000 -         0x1bc43cfff libsystem_kernel.dylib arm64  <2fcc3a72ed39320588f63ae02762a4c1> /usr/lib/system/libsystem_kernel.dylib
        0x1cd700000 -         0x1cd72cfff IOGPU arm64  <5f391c9f1ec836439cb0d277746852cc> /System/Library/PrivateFrameworks/IOGPU.framework/IOGPU
        0x1dcf6f000 -         0x1dcf7ffff libsystem_pthread.dylib arm64  <309207e069d9317d86ae3a7ca0adc5d1> /usr/lib/system/libsystem_pthread.dylib

EOF

@eseidel
Copy link
Contributor Author

eseidel commented Feb 8, 2024

Thank you. This looks like the same crash point as expected. We still don't know how to reproduce, but we're about to meet with another customer in hopes of reproducing now.

Thread 6 Crashed:
0   ???                           	0x0000007ffffffffe 0x0 + 549755813886
1   App                           	0x000000010764a88c _RootZone.runUnary + 40 (zone.dart:1661)
2   App                           	0x000000010764a88c FutureListener.handleValue + 220 (future_impl.dart:162)
3   App                           	0x000000010764a71c Future._propagateToListeners.handleValueCallback + 52 (future_impl.dart:846)
4   App                           	0x0000000107648a5c Future._propagateToListeners + 964 (future_impl.dart:875)
5   App                           	0x00000001076492f8 Future._completeWithValue + 116 (future_impl.dart:647)
6   App                           	0x0000000107f5cc20 SuspendState._returnAsync + 276 (async_patch.dart:352)
7   App                           	0x0000000107638588 stub RunDartOnCPU + 160
8   ???                           	0x0000007ffffffffe 0x0 + 549755813886
9   App                           	0x000000010764a88c _RootZone.runUnary + 40 (zone.dart:1661)
10  App                           	0x000000010764a88c FutureListener.handleValue + 220 (future_impl.dart:162)
11  App                           	0x000000010764a71c Future._propagateToListeners.handleValueCallback + 52 (future_impl.dart:846)
12  App                           	0x0000000107648a5c Future._propagateToListeners + 964 (future_impl.dart:875)
13  App                           	0x000000010764b23c Future._complete + 388 (future_impl.dart:638)
14  App                           	0x0000000107e9b1d8 SyncCompleter.complete + 196 (future_impl.dart:59)
15  App                           	0x000000010775f33c Isolate._spawnCommon.<anonymous closure> + 656 (isolate_patch.dart:487)
16  App                           	0x0000000107f60174 Closure.call (#2) + 700 (function.dart:0)
17  App                           	0x0000000107690560 RawReceivePort._handleMessage + 180 (isolate_patch.dart:184)
18  App                           	0x0000000107638588 stub RunDartOnCPU + 160
19  ???                           	0x0000007ffffffffe 0x0 + 549755813886

@eseidel
Copy link
Contributor Author

eseidel commented Feb 8, 2024

OK, we have a repro! https://github.com/felangel/fresh/tree/master/packages/fresh_dio crashes repeatably.

We're investigating now.

@jonasbark
Copy link

jonasbark commented Feb 8, 2024

Not sure if it helps:

We're not using fresh_dio but a similar solution for token refresh:

..interceptors.add(
        InterceptorsWrapper(
          onRequest: (RequestOptions options, handler) async {
            try {
              final token = await passLoginHandler.getToken();
              options.headers.addAll(<String, String>{
                'Authorization': 'Bearer $token',
                'Accept': 'application/json',
              });
              return handler.next(options);
            } catch (e) {
              handler.reject(DioError(requestOptions: options, error: e.toString()));
            }
          },
          onError: (DioError error, handler) {
            //...
            handler.reject(error);
          },
        ),

where the getToken function is calling the refreshCredentials() from the oauth2 package.

EDIT: when our app crashes I'm indeed sending a request

@eseidel
Copy link
Contributor Author

eseidel commented Feb 8, 2024

Thank you! We were able to get a reproducible crash with package:dio and Flutter and are working on reducing it now. The crash ends up in Dio's async json parsing which uses a Dart isolate. So far it seems to only crash inside Flutter (not pure Dart). I'm sure it's a bug in our forked Dart, and hopefully we'll know more soon. 🤞

@eseidel
Copy link
Contributor Author

eseidel commented Feb 9, 2024

Thank you again! We found the bug and have a fix we will be releasing in the morning. See #1698 (comment) for more info.

@eseidel eseidel closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants