Closed
Description
[REQUIRED] Step 2: Describe your environment
- Xcode version: 10.1
- Firebase SDK version: 5.13.0
- Firebase Component: Firestore
- Component version: Latest one included in 5.13.0 pod
[REQUIRED] Step 3: Describe the problem
We never saw this crash before. We thought it might be related to the recent switch from gRPC in #1968 and related ones.
The app is currently running in a small internal beta test with about 20 Users so far. The crash occurred on 3 different devices for 3 users from those 20. (iPhone 6, iPhone 6s, iPhone X. All are running iOS 12.0.1 or newer)
Steps to reproduce:
As far as we can see from our analytics screen views and the code we can just believe that the following state was in the app:
- We had one snapshot listener open which was about to being disposed (the user left the screen where this snapshot listener was running)
- It might have been that the document the snapshot listener was attached to was deleted or modified while the listener has been disposed
Stacktrace:
Crashed: com.google.firebase.firestore
SIGABRT ABORT 0x00000001d429b104
Crashed: com.google.firebase.firestore
0 libsystem_kernel.dylib 0x1d429b104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1d4316070 pthread_kill$VARIANT$mp + 380
2 libsystem_c.dylib 0x1d41f2d78 abort + 140
3 grpcpp 0x10203d414 non-virtual thunk to grpc::Channel::PerformOpsOnCall(grpc::internal::CallOpSetInterface*, grpc::internal::Call*) (channel_cc.cc)
4 APP_NAME 0x10139345c grpc::ClientAsyncReaderWriter<grpc::ByteBuffer, grpc::ByteBuffer>::Finish(grpc::Status*, void*) (call.h:680)
5 APP_NAME 0x101393238 firebase::firestore::remote::GrpcStream::Shutdown() (functional:1862)
6 APP_NAME 0x1013931c8 firebase::firestore::remote::GrpcStream::FinishImmediately() (grpc_stream.h:186)
7 APP_NAME 0x1013935c0 firebase::firestore::remote::GrpcStream::WriteAndFinish(grpc::ByteBuffer&&) (optional.h:184)
8 APP_NAME 0x1013a9704 firebase::firestore::remote::WriteStream::TearDown(firebase::firestore::remote::GrpcStream*) (byte_buffer.h:88)
9 APP_NAME 0x1013a4a04 firebase::firestore::remote::Stream::Close(firebase::firestore::util::Status const&) (memory:2595)
10 APP_NAME 0x1013a4868 firebase::firestore::remote::Stream::Stop() (memory:2595)
11 APP_NAME 0x1012fb454 firebase::firestore::util::AsyncQueue::ExecuteBlocking(std::__1::function<void ()> const&) (atomic:921)
12 APP_NAME 0x1013032a8 firebase::firestore::util::internal::TimeSlot::InvokedByLibdispatch(void*) (executor_libdispatch.mm:173)
13 libdispatch.dylib 0x1d413e484 _dispatch_client_callout + 16
14 libdispatch.dylib 0x1d40e183c _dispatch_continuation_pop$VARIANT$mp + 412
15 libdispatch.dylib 0x1d40f1bac _dispatch_source_invoke$VARIANT$mp + 1704
16 libdispatch.dylib 0x1d40e5aac _dispatch_lane_serial_drain$VARIANT$mp + 284
17 libdispatch.dylib 0x1d40e6728 _dispatch_lane_invoke$VARIANT$mp + 432
18 libdispatch.dylib 0x1d40eeec8 _dispatch_workloop_worker_thread + 600
19 libsystem_pthread.dylib 0x1d43200dc _pthread_wqthread + 312
20 libsystem_pthread.dylib 0x1d4322cec start_wqthread + 4
com.google.firebase.firestore.rpc
com.google.firebase.firestore.rpc
0 libsystem_kernel.dylib 0x1d429d000 poll + 8
1 grpc 0x101f39a3c pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) (ev_poll_posix.cc:986)
2 grpc 0x101f3c308 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) (ev_posix.cc:264)
3 grpc 0x101f31270 cq_next(grpc_completion_queue*, gpr_timespec, void*) (completion_queue.cc:927)
4 grpcpp 0x10203e968 grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) (completion_queue_cc.cc:57)
5 APP_NAME 0x1012fdb50 firebase::firestore::remote::Datastore::PollGrpcQueue() (datastore.mm:128)
6 APP_NAME 0x101303e6c firebase::firestore::util::internal::DispatchAsync(NSObject<OS_dispatch_queue>*, std::__1::function<void ()>&&)::$_0::__invoke(void*) (executor_libdispatch.mm:57)
7 libdispatch.dylib 0x1d413e484 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1d40e5be0 _dispatch_lane_serial_drain$VARIANT$mp + 592
9 libdispatch.dylib 0x1d40e6728 _dispatch_lane_invoke$VARIANT$mp + 432
10 libdispatch.dylib 0x1d40eeec8 _dispatch_workloop_worker_thread + 600
11 libsystem_pthread.dylib 0x1d43200dc _pthread_wqthread + 312
12 libsystem_pthread.dylib 0x1d4322cec start_wqthread + 4
Thread #1
Thread
0 libsystem_kernel.dylib 0x1d429b374 __select_nocancel + 8
1 libsystem_dnssd.dylib 0x1d4232b78 deliver_request + 1000
2 libsystem_dnssd.dylib 0x1d4233ea0 DNSServiceCreateConnection + 116
3 libsystem_info.dylib 0x1d424c244 _mdns_search_ex + 940
4 libsystem_info.dylib 0x1d424bdac _mdns_search + 128
5 libsystem_info.dylib 0x1d424b2a8 mdns_addrinfo + 940
6 libsystem_info.dylib 0x1d4251118 search_addrinfo + 264
7 libsystem_info.dylib 0x1d42551c4 si_addrinfo + 1672
8 libsystem_info.dylib 0x1d4248964 _getaddrinfo_internal + 196
9 libsystem_info.dylib 0x1d4248894 getaddrinfo + 56
10 grpc 0x101f6dba0 posix_blocking_resolve_address(char const*, char const*, grpc_resolved_addresses**) (resolve_address_posix.cc:87)
11 grpc 0x101f6de98 do_request_thread(void*, grpc_error*) (resolve_address_posix.cc:157)
12 grpc 0x101f3d2b0 GrpcExecutor::RunClosures(grpc_closure_list) (executor.cc:70)
13 grpc 0x101f3d440 GrpcExecutor::ThreadMain(void*) (executor.cc:175)
14 grpc 0x101f93338 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*)::'lambda'(void*)::__invoke(void*) (thd_posix.cc:101)
15 libsystem_pthread.dylib 0x1d431f2ac _pthread_body + 128
16 libsystem_pthread.dylib 0x1d431f20c _pthread_start + 48
17 libsystem_pthread.dylib 0x1d4322cf4 thread_start + 4
Thread #2
Thread
0 libsystem_kernel.dylib 0x1d429af0c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1d4317cd8 _pthread_cond_wait$VARIANT$mp + 636
2 grpc 0x101f8c950 gpr_cv_wait (sync_posix.cc:91)
3 grpc 0x101f95e64 timer_thread(void*) (trace.h:72)
4 grpc 0x101f93338 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*)::'lambda'(void*)::__invoke(void*) (thd_posix.cc:101)
5 libsystem_pthread.dylib 0x1d431f2ac _pthread_body + 128
6 libsystem_pthread.dylib 0x1d431f20c _pthread_start + 48
7 libsystem_pthread.dylib 0x1d4322cf4 thread_start + 4
Thread #3
Thread
0 libsystem_kernel.dylib 0x1d429af0c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1d4317cd8 _pthread_cond_wait$VARIANT$mp + 636
2 grpc 0x101f8c940 gpr_cv_wait (sync_posix.cc:89)
3 grpc 0x101f95e64 timer_thread(void*) (trace.h:72)
4 grpc 0x101f93338 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*)::'lambda'(void*)::__invoke(void*) (thd_posix.cc:101)
5 libsystem_pthread.dylib 0x1d431f2ac _pthread_body + 128
6 libsystem_pthread.dylib 0x1d431f20c _pthread_start + 48
7 libsystem_pthread.dylib 0x1d4322cf4 thread_start + 4
In the "Keys" entry of the crash log there's the following entry:
crash_info_entry_0
abort() called
These are all stack traces related to firestore / grpc i believe. There is no other information in the crash log.
I hope i could provide some information to maybe find the cause of this crash.
Kind regards