Closed tzvc closed 3 years ago
When running our app on IOS devices in production we get crash reports that seem to indicate a segmentation fault in the Firestore thread.
[REQUIRED] Step 1: Describe your environment
Bug report
When running our app on IOS devices in production we get crash reports that seem to indicate a segmentation fault in the Firestore thread.
Example of such crash report (Click To Expand):
``` Incident Identifier: A1FDE1F5-24C0-4A8E-9997-349194DA2922 Hardware Model: iPhone11,2 Process: Runner [43579] Path: /private/var/containers/Bundle/Application/D21E47C9-8B1D-488D-88C4-14C10BE0172E/Runner.app/Runner Identifier: app.zag.prod Version: 30 (1.0.16) AppStoreTools: 12E506 AppVariant: 1:iPhone11,2:14 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: app.zag.prod [3644] Date/Time: 2021-08-21 11:43:04.0939 +0200 Launch Time: 2021-08-21 11:42:54.2703 +0200 OS Version: iPhone OS 14.7.1 (18G82) Release Type: User Baseband Version: 3.04.01 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x6c62616e45656385 -> 0x0000006e45656385 (possible pointer authentication failure) VM Region Info: 0x6e45656385 is in 0x1000000000-0x7000000000; bytes after start: 404891198341 bytes before end: 7425662074 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL ...(unallocated) ---> GPU Carveout (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated) UNUSED SPACE AT END Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [43579] Triggered by Thread: 28 Thread 0 name: Thread 0: 0 libsystem_kernel.dylib 0x00000001bceb84fc mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001bceb7884 mach_msg + 76 (mach_msg.c:103) 2 CoreFoundation 0x000000018ec6be58 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2641) 3 CoreFoundation 0x000000018ec65cf8 __CFRunLoopRun + 1212 (CFRunLoop.c:2974) 4 CoreFoundation 0x000000018ec65308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 5 GraphicsServices 0x00000001a62e8734 GSEventRunModal + 164 (GSEvent.c:2259) 6 UIKitCore 0x00000001916e375c -[UIApplication _run] + 1072 (UIApplication.m:3269) 7 UIKitCore 0x00000001916e8fcc UIApplicationMain + 168 (UIApplication.m:4740) 8 Runner 0x00000001029fc450 main + 64 (AppDelegate.swift:6) 9 libdyld.dylib 0x000000018e921cf8 start + 4 Thread 1 name: Thread 1: 0 libsystem_pthread.dylib 0x00000001da96651c _pthread_mutex_lock_init_slow + 188 (pthread_mutex.c:1537) 1 Runner 0x0000000102c156c8 0x1029f4000 + 2234056 2 Runner 0x0000000102cd50d0 0x1029f4000 + 3018960 3 Runner 0x0000000102c6ea40 0x1029f4000 + 2599488 4 Runner 0x0000000102c6ee88 0x1029f4000 + 2600584 5 Runner 0x0000000102c6d0e4 0x1029f4000 + 2592996 6 Runner 0x0000000102c6b3cc 0x1029f4000 + 2585548 7 Runner 0x0000000102c69fc0 0x1029f4000 + 2580416 8 Runner 0x0000000102c69d94 0x1029f4000 + 2579860 9 Runner 0x0000000102cb3784 0x1029f4000 + 2881412 10 Runner 0x0000000102cb0ba8 0x1029f4000 + 2870184 11 Runner 0x0000000102cb07e4 0x1029f4000 + 2869220 12 Runner 0x0000000102cb0220 0x1029f4000 + 2867744 13 Runner 0x0000000102c99390 0x1029f4000 + 2773904 14 Runner 0x0000000102c99264 0x1029f4000 + 2773604 15 Runner 0x0000000102c990f4 0x1029f4000 + 2773236 16 libdispatch.dylib 0x000000018e8dda84 _dispatch_call_block_and_release + 32 (init.c:1466) 17 libdispatch.dylib 0x000000018e8df81c _dispatch_client_callout + 20 (object.m:559) 18 libdispatch.dylib 0x000000018e8e2cf4 _dispatch_continuation_pop + 448 (inline_internal.h:2557) 19 libdispatch.dylib 0x000000018e8e2384 _dispatch_async_redirect_invoke + 592 (queue.c:805) 20 libdispatch.dylib 0x000000018e8f0fe0 _dispatch_root_queue_drain + 388 (inline_internal.h:2598) 21 libdispatch.dylib 0x000000018e8f17d8 _dispatch_worker_thread2 + 112 (queue.c:6765) 22 libsystem_pthread.dylib 0x00000001da962768 _pthread_wqthread + 216 (pthread.c:2453) 23 libsystem_pthread.dylib 0x00000001da96974c start_wqthread + 8 Thread 2: 0 libsystem_pthread.dylib 0x00000001da969744 start_wqthread + 0 Thread 3 name: Thread 3: 0 libsystem_malloc.dylib 0x000000019e35f4ec set_tiny_meta_header_in_use + 244 (magazine_tiny.c:146) 1 libsystem_malloc.dylib 0x000000019e360af4 tiny_malloc_from_free_list + 556 (magazine_tiny.c:2197) 2 libsystem_malloc.dylib 0x000000019e35edb0 tiny_malloc_should_clear + 224 (magazine_tiny.c:2250) 3 libsystem_malloc.dylib 0x000000019e34811c szone_malloc_should_clear + 80 (magazine_malloc.c:232) 4 libsystem_malloc.dylib 0x000000019e3569a0 _malloc_zone_malloc + 152 (malloc.c:1572) 5 libc++abi.dylib 0x00000001a38df894 operator new(unsigned long) + 32 (stdlib_new_delete.cpp:31) 6 Runner 0x0000000102c71acc 0x1029f4000 + 2611916 7 Runner 0x0000000102c719a8 0x1029f4000 + 2611624 8 Runner 0x0000000102c6c9bc 0x1029f4000 + 2591164 9 Runner 0x0000000102c6b3cc 0x1029f4000 + 2585548 10 Runner 0x0000000102c69fc0 0x1029f4000 + 2580416 11 Runner 0x0000000102c69d94 0x1029f4000 + 2579860 12 Runner 0x0000000102cb3784 0x1029f4000 + 2881412 13 Runner 0x0000000102cb0ba8 0x1029f4000 + 2870184 14 Runner 0x0000000102cb07e4 0x1029f4000 + 2869220 15 Runner 0x0000000102cb0220 0x1029f4000 + 2867744 16 Runner 0x0000000102c99390 0x1029f4000 + 2773904 17 Runner 0x0000000102c99264 0x1029f4000 + 2773604 18 Runner 0x0000000102c990f4 0x1029f4000 + 2773236 19 libdispatch.dylib 0x000000018e8dda84 _dispatch_call_block_and_release + 32 (init.c:1466) 20 libdispatch.dylib 0x000000018e8df81c _dispatch_client_callout + 20 (object.m:559) 21 libdispatch.dylib 0x000000018e8e2cf4 _dispatch_continuation_pop + 448 (inline_internal.h:2557) 22 libdispatch.dylib 0x000000018e8e2384 _dispatch_async_redirect_invoke + 592 (queue.c:805) 23 libdispatch.dylib 0x000000018e8f0fe0 _dispatch_root_queue_drain + 388 (inline_internal.h:2598) 24 libdispatch.dylib 0x000000018e8f17d8 _dispatch_worker_thread2 + 112 (queue.c:6765) 25 libsystem_pthread.dylib 0x00000001da962768 _pthread_wqthread + 216 (pthread.c:2453) 26 libsystem_pthread.dylib 0x00000001da96974c start_wqthread + 8 Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001bceb84fc mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001bceb7884 mach_msg + 76 (mach_msg.c:103) 2 CoreFoundation 0x000000018ec6be58 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2641) 3 CoreFoundation 0x000000018ec65cf8 __CFRunLoopRun + 1212 (CFRunLoop.c:2974) 4 CoreFoundation 0x000000018ec65308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 5 Foundation 0x000000018ff54d8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:377) 6 Foundation 0x000000018ff54c58 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:424) 7 UIKitCore 0x0000000191798304 -[UIEventFetcher threadMain] + 516 (UIEventFetcher.m:929) 8 Foundation 0x00000001900c630c __NSThread__start__ + 864 (NSThread.m:724) 9 libsystem_pthread.dylib 0x00000001da960bfc _pthread_start + 320 (pthread.c:887) 10 libsystem_pthread.dylib 0x00000001da969758 thread_start + 8 Thread 5: 0 libsystem_pthread.dylib 0x00000001da969744 start_wqthread + 0 Thread 6 name: Thread 6: 0 libsystem_kernel.dylib 0x00000001bcedf9bc poll + 8 1 grpc 0x0000000103fb3980 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 1152 (ev_poll_posix.cc:1024) 2 grpc 0x0000000103fb5840 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 72 (ev_posix.cc:324) 3 grpc 0x0000000103fa7b60 cq_next(grpc_completion_queue*, gpr_timespec, void*) + 516 (completion_queue.cc:1059) 4 grpcpp 0x00000001043252c8 grpc_impl::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) + 60 (completion_queue_cc.cc:54) 5 FirebaseFirestore 0x0000000103629524 grpc_impl::CompletionQueue::Next(void**, bool*) + 52 (completion_queue_impl.h:179) 6 FirebaseFirestore 0x0000000103629524 firebase::firestore::remote::Datastore::PollGrpcQueue() + 104 (datastore.cc:137) 7 FirebaseFirestore 0x000000010371450c std::__1::__function::__value_func