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

[RCTHTTPRequestHandler sendRequest:withDelegate:] crash in 0.59.4 #25152

Closed
xutm opened this issue Jun 5, 2019 · 6 comments
Closed

[RCTHTTPRequestHandler sendRequest:withDelegate:] crash in 0.59.4 #25152

xutm opened this issue Jun 5, 2019 · 6 comments
Labels
Bug 🌐Networking Related to a networking API. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@xutm
Copy link

xutm commented Jun 5, 2019

Crash

image

In the past seven days, there have been a lot of crashes.

Logs

#16. Crashed: com.facebook.react.HTTPRequestHandlerQueue
0 libobjc.A.dylib 0x183b301a0 objc_retain + 16
1 libobjc.A.dylib 0x183b251e4 objc_getProperty + 144
2 CFNetwork 0x185147a6c -[__NSCFURLSessionTask setPriority:] + 64
3 CFNetwork 0x185146624 -[__NSCFURLSessionTask initWithOriginalRequest:updatedRequest:ident:session:] + 816
4 CFNetwork 0x184f00df8 -[__NSCFLocalSessionTask initWithOriginalRequest:updatedRequest:ident:session:] + 124
5 CFNetwork 0x184ee9948 -[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:] + 172
6 discover 0x10130bf28 __50-[RCTHTTPRequestHandler sendRequest:withDelegate:]_block_invoke (RCTHTTPRequestHandler.mm:81)
7 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x184289eb4 _dispatch_queue_barrier_sync_invoke_and_complete + 56
9 discover 0x10130bd7c -[RCTHTTPRequestHandler sendRequest:withDelegate:] (RCTHTTPRequestHandler.mm:84)
10 discover 0x101337ba8 -[RCTNetworkTask start] (RCTNetworkTask.m:73)
11 discover 0x10130f5b4 __30-[RCTImageLoader dequeueTasks]_block_invoke (RCTImageLoader.m:332)
12 libdispatch.dylib 0x18424cb24 _dispatch_call_block_and_release + 24
13 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
14 libdispatch.dylib 0x18428b1b4 _dispatch_queue_serial_drain$VARIANT$armv81 + 568
15 libdispatch.dylib 0x18428bad8 _dispatch_queue_invoke$VARIANT$armv81 + 328
16 libdispatch.dylib 0x18428c47c _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 + 332
17 libdispatch.dylib 0x18429444c _dispatch_workloop_worker_thread$VARIANT$armv81 + 612
18 libsystem_pthread.dylib 0x18457fe70 _pthread_wqthread + 860
19 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

--

#0. fmdb.<FMDatabaseQueue: 0x1d044e280>
0 libsystem_kernel.dylib 0x1843e1be4 __ulock_wait + 8
1 libsystem_platform.dylib 0x18457bca8 _os_unfair_lock_lock_slow + 172
2 libobjc.A.dylib 0x183b25304 objc_setProperty + 224
3 discover 0x100fd2d20 +[FMResultSet resultSetWithStatement:usingParentDatabase:] (FMResultSet.m:25)
4 discover 0x100fce474 -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:876)
5 discover 0x100fce58c -[FMDatabase executeQuery:] (FMDatabase.m:899)
6 discover 0x1017cf80c __49-[XYKeyValueStore getCustomObjectById:fromTable:]_block_invoke (XYKeyValueStore.m:181)
7 discover 0x100fd2634 __30-[FMDatabaseQueue inDatabase:]_block_invoke (FMDatabaseQueue.m:162)
8 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
9 libdispatch.dylib 0x184289eb4 dispatch_queue_barrier_sync_invoke_and_complete + 56
10 discover 0x100fd25ac -[FMDatabaseQueue inDatabase:] (FMDatabaseQueue.m:176)
11 discover 0x1017cf65c -[XYKeyValueStore getCustomObjectById:fromTable:] (XYKeyValueStore.m:188)
12 discover 0x1018b73c0 -[XYPHUserDefaultsManager objectForKey:] (XYPHUserDefaultsManager.m:56)
13 discover 0x100f69320 -[ReactJSBridge(Development) getTrackEnv_resolver:getTrackEnv_rejecter:] (ReactJSBridge+Development.m:82)
14 CoreFoundation 0x184962580 invoking
+ 144
15 CoreFoundation 0x184841748 -[NSInvocation invoke] + 284
16 CoreFoundation 0x18484656c -[NSInvocation invokeWithTarget:] + 60
17 discover 0x10132a0cc -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.mm:554)
18 discover 0x1013311f0 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) (RCTNativeModule.mm:104)
19 discover 0x101330f50 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) (Optional.h:365)
20 libdispatch.dylib 0x18424cb24 _dispatch_call_block_and_release + 24
21 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
22 libdispatch.dylib 0x18428dd60 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 964
23 CoreFoundation 0x184903070 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
24 CoreFoundation 0x184900bc8 __CFRunLoopRun + 2272
25 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
26 GraphicsServices 0x186803020 GSEventRunModal + 100
27 UIKit 0x18e80178c UIApplicationMain + 236
28 discover 0x100e93404 main (main.m:56)
29 libdyld.dylib 0x1842b1fc0 start + 4

#1. com.xingin.analysis.emitter.thread
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 Foundation 0x185295674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 discover 0x1015cac14 -[_XYAnalysisEmitterRunloop startThread] (XYAnalysisEmitterRunloop.m:66)
7 Foundation 0x1853a5efc NSThread__start + 1040
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#2. com.apple.CoreMotion.MotionThread
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 CoreFoundation 0x184870b28 CFRunLoopRun + 116
6 CoreMotion 0x189e019dc CLStartStopAdvertisingBeacon + 231572
7 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
8 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
9 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#3. com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 Foundation 0x185295674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x18529551c -[NSRunLoop(NSRunLoop) runUntilDate:] + 148
7 UIKit 0x18e4e67e4 -[UIEventFetcher threadMain] + 136
8 Foundation 0x1853a5efc NSThread__start + 1040
9 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
10 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
11 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#4. com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 CFNetwork 0x18512e4b0 -[__CoreSchedulingSetRunnable runForever] + 220
6 Foundation 0x1853a5efc NSThread__start + 1040
7 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
8 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
9 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#5. com.twitter.crashlytics.ios.MachExceptionServer
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 discover 0x10270ef44 CLSMachExceptionServer + 3647788
3 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
4 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
5 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#6. com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x1843e1538 __select + 8
1 CoreFoundation 0x18490b378 __CFSocketManager + 644
2 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
3 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
4 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#7. Thread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 libc++.1.dylib 0x183a982ec std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 96
3 JavaScriptCore 0x18bf77430 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 124
4 JavaScriptCore 0x18bf772e0 std::__1::cv_status std::__1::condition_variable_any::wait_until<std::__1::unique_lockbmalloc::Mutex, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lockbmalloc::Mutex&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 112
5 JavaScriptCore 0x18bf76e24 bmalloc::Scavenger::threadRunLoop() + 272
6 JavaScriptCore 0x18bf76b60 bmalloc::Scavenger::Scavenger(std::__1::lock_guardbmalloc::StaticMutex&) + 10
7 JavaScriptCore 0x18bf76f7c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(bmalloc::Scavenger), bmalloc::Scavenger*> >(void*) + 44
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#8. WebThread
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 WebCore 0x18caaddcc RunWebThread(void*) + 592
6 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
7 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
8 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#9. GCDAsyncSocket-CFStream
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 Foundation 0x185295674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 discover 0x100f965b4 +[GCDAsyncSocket cfstreamThread] (GCDAsyncSocket.m:7601)
7 Foundation 0x1853a5efc NSThread__start + 1040
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#10. Thread
0 libsystem_kernel.dylib 0x1843e1610 __semwait_signal + 8
1 libsystem_c.dylib 0x1842fa12c nanosleep + 212
2 libsystem_c.dylib 0x184362ef4 sleep + 44
3 discover 0x101cf97dc monitorCachedData (XYRagnarokCrashCachedData.c:134)
4 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
5 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
6 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#11. Thread
0 libsystem_kernel.dylib 0x1843e1d84 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1845800a0 _pthread_wqthread + 1420
2 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#12. com.facebook.react.JavaScript
0 JavaScriptCore 0x18bd7f868 JSC::JSLock::lock(long) + 52
1 JavaScriptCore 0x18b4e616c JSC::JSLockHolder::JSLockHolder(JSC::ExecState*) + 64
2 JavaScriptCore 0x18b4e616c JSC::JSLockHolder::JSLockHolder(JSC::ExecState*) + 64
3 JavaScriptCore 0x18b5283e8 JSValueUnprotect + 36
4 discover 0x1012b9838 facebook::jsc::JSCRuntime::JSCObjectValue::invalidate() (JSCRuntime.cpp:431)
5 discover 0x1012bd46c facebook::jsi::Value::~Value() (jsi.cpp:179)
6 discover 0x1012beca0 facebook::jsi::dynamicFromValue(facebook::jsi::Runtime&, facebook::jsi::Value const&) (JSIDynamic.cpp:66)
7 discover 0x1012bec4c facebook::jsi::dynamicFromValue(facebook::jsi::Runtime&, facebook::jsi::Value const&) (dynamic-inl.h:1018)
8 discover 0x1012c0f90 facebook::react::JSIExecutor::callNativeModules(facebook::jsi::Value const&, bool) (JSIExecutor.cpp:320)
9 discover 0x1012c0bb8 facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, folly::dynamic const&) (JSIExecutor.cpp:236)
10 discover 0x1012ccb24 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1913)
11 discover 0x101300848 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) (RCTCxxUtils.mm:72)
12 discover 0x1013221d0 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) (RCTMessageThread.mm:59)
13 CoreFoundation 0x1849032bc CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 20
14 CoreFoundation 0x184902a7c __CFRunLoopDoBlocks + 264
15 CoreFoundation 0x18490078c __CFRunLoopRun + 1188
16 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
17 discover 0x1012f5ef0 +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:249)
18 Foundation 0x1853a5efc NSThread__start + 1040
19 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
20 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
21 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#13. NetworkLoad
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 GeoServices 0x18abc96cc _runNetworkThread + 468
6 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
7 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
8 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#14. com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 Foundation 0x1852c9be8 -[__NSOperationInternal _waitUntilFinished:] + 780
3 Foundation 0x185316100 -[NSOperationQueue waitUntilAllOperationsAreFinished] + 256
4 discover 0x1015f9c20 -[XYAZEmitter sendEvents] (XYAZEmitter.m:280)
5 discover 0x1015f9e24 -[XYAZEmitter sendEvents] (XYAZEmitter.m:317)
6 discover 0x1015f9e24 -[XYAZEmitter sendEvents] (XYAZEmitter.m:317)
7 libdispatch.dylib 0x18424cb24 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
9 libdispatch.dylib 0x184288528 _dispatch_queue_override_invoke$VARIANT$armv81 + 700
10 libdispatch.dylib 0x18428e3a4 _dispatch_root_queue_drain + 592
11 libdispatch.dylib 0x18428e0f0 _dispatch_worker_thread3 + 112
12 libsystem_pthread.dylib 0x18457ffac _pthread_wqthread + 1176
13 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#15. NSOperationQueue 0x1d042a000 (QOS: UNSPECIFIED)
0 libsystem_kernel.dylib 0x1843bfe5c semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x18427e1a0 _dispatch_sema4_timedwait$VARIANT$armv81 + 60
2 libdispatch.dylib 0x18427ea00 _dispatch_semaphore_wait_slow + 72
3 discover 0x1015fa08c __72-[XYAZEmitter sendEventWithRequest:andIndex:andResultArray:andOversize:]_block_invoke (XYAZEmitter.m:340)
4 Foundation 0x185382e88 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
5 Foundation 0x1852c48d0 -[NSBlockOperation main] + 72
6 Foundation 0x1852c3cac -[__NSOperationInternal _start:] + 848
7 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x184288b0c _dispatch_block_invoke_direct$VARIANT$armv81 + 216
9 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
10 libdispatch.dylib 0x184288b0c _dispatch_block_invoke_direct$VARIANT$armv81 + 216
11 libdispatch.dylib 0x184288a00 dispatch_block_perform$VARIANT$armv81 + 104
12 Foundation 0x185384750 __NSOQSchedule_f + 376
13 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
14 libdispatch.dylib 0x1842897a8 _dispatch_continuation_pop$VARIANT$armv81 + 416
15 libdispatch.dylib 0x184288180 _dispatch_async_redirect_invoke$VARIANT$armv81 + 596
16 libdispatch.dylib 0x18428e3a4 _dispatch_root_queue_drain + 592
17 libdispatch.dylib 0x18428e0f0 _dispatch_worker_thread3 + 112
18 libsystem_pthread.dylib 0x18457ffac _pthread_wqthread + 1176
19 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#16. Crashed: com.facebook.react.HTTPRequestHandlerQueue
0 libobjc.A.dylib 0x183b301a0 objc_retain + 16
1 libobjc.A.dylib 0x183b251e4 objc_getProperty + 144
2 CFNetwork 0x185147a6c -[__NSCFURLSessionTask setPriority:] + 64
3 CFNetwork 0x185146624 -[__NSCFURLSessionTask initWithOriginalRequest:updatedRequest:ident:session:] + 816
4 CFNetwork 0x184f00df8 -[__NSCFLocalSessionTask initWithOriginalRequest:updatedRequest:ident:session:] + 124
5 CFNetwork 0x184ee9948 -[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:] + 172
6 discover 0x10130bf28 __50-[RCTHTTPRequestHandler sendRequest:withDelegate:]_block_invoke (RCTHTTPRequestHandler.mm:81)
7 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x184289eb4 _dispatch_queue_barrier_sync_invoke_and_complete + 56
9 discover 0x10130bd7c -[RCTHTTPRequestHandler sendRequest:withDelegate:] (RCTHTTPRequestHandler.mm:84)
10 discover 0x101337ba8 -[RCTNetworkTask start] (RCTNetworkTask.m:73)
11 discover 0x10130f5b4 __30-[RCTImageLoader dequeueTasks]_block_invoke (RCTImageLoader.m:332)
12 libdispatch.dylib 0x18424cb24 _dispatch_call_block_and_release + 24
13 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
14 libdispatch.dylib 0x18428b1b4 _dispatch_queue_serial_drain$VARIANT$armv81 + 568
15 libdispatch.dylib 0x18428bad8 _dispatch_queue_invoke$VARIANT$armv81 + 328
16 libdispatch.dylib 0x18428c47c _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 + 332
17 libdispatch.dylib 0x18429444c _dispatch_workloop_worker_thread$VARIANT$armv81 + 612
18 libsystem_pthread.dylib 0x18457fe70 _pthread_wqthread + 860
19 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#17. Thread
0 libsystem_kernel.dylib 0x1843e1d84 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x18457feb4 _pthread_wqthread + 928
2 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#18. Thread
0 libsystem_kernel.dylib 0x1843e1d84 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x18457feb4 _pthread_wqthread + 928
2 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#19. GCDAsyncSocket-CFStream
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 Foundation 0x185295674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 discover 0x101551e84 +[WXOMTAGCDAsyncSocket cfstreamThread] + 2724608
7 Foundation 0x1853a5efc NSThread__start + 1040
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#20. AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 AVFAudio 0x18a306424 GenericRunLoopThread::Entry(void*) + 164
6 AVFAudio 0x18a330834 CAPThread::Entry(CAPThread*) + 88
7 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
8 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
9 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#21. com.apple.CFNetwork.CustomProtocols
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 CFNetwork 0x18512e4b0 -[__CoreSchedulingSetRunnable runForever] + 220
6 Foundation 0x1853a5efc NSThread__start + 1040
7 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
8 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
9 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#22. Thread
0 libsystem_kernel.dylib 0x1843e1d84 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1845800a0 _pthread_wqthread + 1420
2 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#23. Thread
0 libsystem_kernel.dylib 0x1843e1d84 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x18457feb4 _pthread_wqthread + 928
2 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

#24. Thread
0 libsystem_pthread.dylib 0x18457fb04 start_wqthread + 122

#25. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#26. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#27. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#28. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#29. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#30. WTF::AutomaticThread
0 libsystem_kernel.dylib 0x1843e10f4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x184587ed8 _pthread_cond_wait$VARIANT$armv81 + 628
2 JavaScriptCore 0x18b4cb310 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 148
3 JavaScriptCore 0x18bf5c73c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2252
4 JavaScriptCore 0x18ba1d24c bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5 JavaScriptCore 0x18bf41d18 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
6 JavaScriptCore 0x18bf6e024 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 224
7 JavaScriptCore 0x18b4c69d4 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
9 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
10 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#31. com.facebook.react.JavaScript
0 libsystem_kernel.dylib 0x1843bfe08 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1843bfc80 mach_msg + 72
2 CoreFoundation 0x184902e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x184900908 __CFRunLoopRun + 1568
4 CoreFoundation 0x184820da8 CFRunLoopRunSpecific + 552
5 discover 0x1012f5ef0 +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:249)
6 Foundation 0x1853a5efc NSThread__start + 1040
7 libsystem_pthread.dylib 0x184581220 _pthread_body + 272
8 libsystem_pthread.dylib 0x184581110 _pthread_body + 290
9 libsystem_pthread.dylib 0x18457fb10 thread_start + 4

#32. Thread
0 libsystem_pthread.dylib 0x18457fb04 start_wqthread + 122

#33. com.facebook.react.NetworkingQueue
0 libsystem_kernel.dylib 0x1843e27c8 kevent_id + 8
1 libdispatch.dylib 0x184296dd0 _dispatch_kq_poll + 208
2 libdispatch.dylib 0x18429777c _dispatch_event_loop_wait_for_ownership$VARIANT$armv81 + 420
3 libdispatch.dylib 0x18428f158 _dispatch_sync_wait + 416
4 discover 0x10130bd7c -[RCTHTTPRequestHandler sendRequest:withDelegate:] (RCTHTTPRequestHandler.mm:84)
5 discover 0x101337ba8 -[RCTNetworkTask start] (RCTNetworkTask.m:73)
6 discover 0x101335da0 -[RCTNetworking sendRequest:responseType:incrementalUpdates:responseSender:] (RCTNetworking.mm:592)
7 discover 0x10133731c __44-[RCTNetworking sendRequest:responseSender:]_block_invoke (RCTNetworking.mm:652)
8 libdispatch.dylib 0x18424cb24 _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x18424cae4 _dispatch_client_callout + 16
10 libdispatch.dylib 0x18428b1b4 _dispatch_queue_serial_drain$VARIANT$armv81 + 568
11 libdispatch.dylib 0x18428bad8 _dispatch_queue_invoke$VARIANT$armv81 + 328
12 libdispatch.dylib 0x18428c47c _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 + 332
13 libdispatch.dylib 0x18429444c _dispatch_workloop_worker_thread$VARIANT$armv81 + 612
14 libsystem_pthread.dylib 0x18457fe70 _pthread_wqthread + 860
15 libsystem_pthread.dylib 0x18457fb08 start_wqthread + 4

React Native version:

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 128.79 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.3 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.59.4

@xutm xutm added the Bug label Jun 5, 2019
@react-native-bot react-native-bot added the 🌐Networking Related to a networking API. label Jun 5, 2019
@xutm
Copy link
Author

xutm commented Jun 5, 2019

Can someone help me out?

@zhongwuzw
Copy link
Contributor

@xutm Hey, what's the exception type for the crash? EXC_BAD_ACCESS // SIGSEGV // SIGBUS?

@xutm
Copy link
Author

xutm commented Jun 6, 2019

The exception type is EXC_BAD_ACCESS.

image

facebook-github-bot pushed a commit that referenced this issue Jun 6, 2019
Summary:
There exists race condition in `sendRequest:withDelegate:` method, it can do the session creation multiple times, because we don't lock that, which would leads `EXC_BAD_ACCESS` because use and deallocated session concurrently, we can refer to how to create a singleton safely.

Related #25152.

## Changelog

[iOS] [Fixed] - Fixes race condition of Network module
Pull Request resolved: #25156

Differential Revision: D15671734

Pulled By: sammy-SC

fbshipit-source-id: 5021e6cf33c2b55e3f7adf573ab5c8e6a8d82e23
@zhongwuzw
Copy link
Contributor

@xutm We fixed it in #25156. Please check that.

@xutm
Copy link
Author

xutm commented Jun 7, 2019

Has no similar crash in test.

Thanks!

@RainesGit
Copy link

@xutm We fixed it in #25156. Please check that.

改来改去又改回去了。完全没有解决这个问题

M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this issue Mar 10, 2020
Summary:
There exists race condition in `sendRequest:withDelegate:` method, it can do the session creation multiple times, because we don't lock that, which would leads `EXC_BAD_ACCESS` because use and deallocated session concurrently, we can refer to how to create a singleton safely.

Related facebook#25152.

## Changelog

[iOS] [Fixed] - Fixes race condition of Network module
Pull Request resolved: facebook#25156

Differential Revision: D15671734

Pulled By: sammy-SC

fbshipit-source-id: 5021e6cf33c2b55e3f7adf573ab5c8e6a8d82e23
@facebook facebook locked as resolved and limited conversation to collaborators Jun 6, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug 🌐Networking Related to a networking API. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants