Sentry-react-native: iOS SIGPIPE issue

Created on 26 May 2021  路  11Comments  路  Source: getsentry/sentry-react-native

Environment

How do you use Sentry?
sentry.io

  1. error tracking
  2. performance monitoring

please note that the crash start appearing after apply point 2 above using the below code :

Sentry.init({
  dsn: 'https://....',
  tracesSampleRate: 0.2, //  if it is 0.20 -> approximately 20% of the transactions will get recorded and sent.
  environment: Config.USE_DEV == 'true' ? 'SENTRY_ENV' : 'production',
  integrations: [
    new Sentry.ReactNativeTracing({
      routingInstrumentation,
      // ... other options
    }),
  ],
});

and the below code inside the interceptor.js class (axios)

  transaction = Sentry.startTransaction({
      name: 'request : ' + config.url,
      sampled: true,
    });
    transaction.sampled = true;
    span = transaction.startChild({op: 'functionX'}); // This function returns a Span
    span.sampled = true;
    return config;

  if (span) {
      span.finish(); // Remember that only finished spans will be sent with the transaction
    }
    if (transaction) {
      transaction.finish();
    }

Which SDK and version?
@sentry/react-native": "^2.2.1"
react-native : "0.63.4"

Steps to Reproduce

the issue happened on iOS production version

Expected Result

no crash issue

Actual Result

Logs from sentry :
Screen Shot 2021-05-26 at 9 23 01 AM

OS Version: iOS 14.4.2 (18D70)
Report Version: 104

Exception Type: Unknown (SIGPIPE)
Crashed Thread: 0

Application Specific Information:
XTUM > xWidth:

Thread 0 Crashed:
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   QuartzCore                      0x331a7bb8c         CA::Display::Display::update
3   QuartzCore                      0x331a81d40         ensure_displays
4   libsystem_notify.dylib          0x36135a758         notify_set_options
5   libdispatch.dylib               0x32acddfb4         _dispatch_block_async_invoke2
6   libdispatch.dylib               0x32accfdac         _dispatch_client_callout
7   libdispatch.dylib               0x32acdd7a8         _dispatch_main_queue_callback_4CF
8   CoreFoundation                  0x32b341118         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
9   CoreFoundation                  0x32b33b11c         __CFRunLoopRun
10  CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
11  GraphicsServices                0x35ab65780         GSEventRunModal
12  UIKitCore                       0x32fc8cee4         -[UIApplication _run]
13  UIKitCore                       0x32fc92758         UIApplicationMain
14  mappo                           0x2023a0184         <redacted>
15  libdyld.dylib                   0x32ad536ac         start

Thread 0 Crashed:
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   QuartzCore                      0x331a7bb8c         CA::Display::Display::update
3   QuartzCore                      0x331a81d40         ensure_displays
4   libsystem_notify.dylib          0x36135a758         notify_set_options
5   libdispatch.dylib               0x32acddfb4         _dispatch_block_async_invoke2
6   libdispatch.dylib               0x32accfdac         _dispatch_client_callout
7   libdispatch.dylib               0x32acdd7a8         _dispatch_main_queue_callback_4CF
8   CoreFoundation                  0x32b341118         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
9   CoreFoundation                  0x32b33b11c         __CFRunLoopRun
10  CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
11  GraphicsServices                0x35ab65780         GSEventRunModal
12  UIKitCore                       0x32fc8cee4         -[UIApplication _run]
13  UIKitCore                       0x32fc92758         UIApplicationMain
14  mappo                           0x2023a0184         <redacted>
15  libdyld.dylib                   0x32ad536ac         start

Thread 1 name: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   Foundation                      0x32d92adec         -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
6   Foundation                      0x32d92acb8         -[NSRunLoop(NSRunLoop) runUntilDate:]
7   UIKitCore                       0x32fd40c44         -[UIEventFetcher threadMain]
8   Foundation                      0x32da9ca30         __NSThread__start__
9   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 2 name: com.facebook.react.JavaScript
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   mappo                           0x2027f0824         facebook::react::JSIExecutor::defaultTimeoutInvoker
6   Foundation                      0x32da9ca30         __NSThread__start__
7   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 3 name: JavaScriptCore bmalloc scavenger
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x3556513c0         std::__1::condition_variable::__do_timed_wait
3   JavaScriptCore                  0x33ecc8cfc         bmalloc::Scavenger::threadRunLoop
4   JavaScriptCore                  0x33ecc87b0         bmalloc::Scavenger::threadEntryPoint
5   JavaScriptCore                  0x33ecc9cc8         std::__1::__thread_proxy<T>
6   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 4 name: AVAudioSession Notify Thread
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   AudioSession                    0x33aa590c0         GenericRunLoopThread::Entry
6   AudioSession                    0x33aa5b258         CAPThread::Entry
7   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 5 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   CFNetwork                       0x32c3341bc         _CFURLStorageSessionCopyCache
6   Foundation                      0x32da9ca30         __NSThread__start__
7   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 6 name: com.mapbox.mbgl.AssetFileSource
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   CoreFoundation                  0x32b33b2f8         CFRunLoopRun
6   Mapbox                          0x103529cd0         mbgl::resourceURL
7   Mapbox                          0x103529b14         mbgl::resourceURL
8   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 7 name: com.mapbox.mbgl.OnlineFileSource
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   libc++.1.dylib                  0x355651ea4         std::__1::__assoc_sub_state::__sub_wait
4   libc++.1.dylib                  0x355651df0         std::__1::__assoc_sub_state::copy
5   libc++.1.dylib                  0x35565212c         std::__1::future<T>::get
6   Mapbox                          0x103556dd8         mbgl::resourceURL
7   Mapbox                          0x10351ed98         mbgl::resourceURL
8   CoreFoundation                  0x32b341768         __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
9   CoreFoundation                  0x32b341664         __CFRunLoopDoSource0
10  CoreFoundation                  0x32b34095c         __CFRunLoopDoSources0
11  CoreFoundation                  0x32b33aa88         __CFRunLoopRun
12  CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
13  CoreFoundation                  0x32b33b2f8         CFRunLoopRun
14  Mapbox                          0x103558774         mbgl::resourceURL
15  Mapbox                          0x103558634         mbgl::resourceURL
16  libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 8 name: com.mapbox.mbgl.DatabaseFileSource
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   libc++.1.dylib                  0x355651ea4         std::__1::__assoc_sub_state::__sub_wait
4   libc++.1.dylib                  0x355651df0         std::__1::__assoc_sub_state::copy
5   libc++.1.dylib                  0x35565212c         std::__1::future<T>::get
6   Mapbox                          0x10352f4d0         mbgl::resourceURL
7   Mapbox                          0x10351ed98         mbgl::resourceURL
8   CoreFoundation                  0x32b341768         __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
9   CoreFoundation                  0x32b341664         __CFRunLoopDoSource0
10  CoreFoundation                  0x32b34095c         __CFRunLoopDoSources0
11  CoreFoundation                  0x32b33aa88         __CFRunLoopRun
12  CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
13  CoreFoundation                  0x32b33b2f8         CFRunLoopRun
14  Mapbox                          0x1035300c8         mbgl::resourceURL
15  Mapbox                          0x103530004         mbgl::resourceURL
16  libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 9 name: com.mapbox.mbgl.LocalFileSource
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   CoreFoundation                  0x32b33b2f8         CFRunLoopRun
6   Mapbox                          0x103536e24         mbgl::resourceURL
7   Mapbox                          0x103536ccc         mbgl::resourceURL
8   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 10 name: com.mapbox.mbgl.ResourceLoaderThread
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   CoreFoundation                  0x32b340c2c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32b33ac10         __CFRunLoopRun
4   CoreFoundation                  0x32b33a218         CFRunLoopRunSpecific
5   CoreFoundation                  0x32b33b2f8         CFRunLoopRun
6   Mapbox                          0x10353c650         mbgl::resourceURL
7   Mapbox                          0x10353c52c         mbgl::resourceURL
8   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 11
0   libsystem_kernel.dylib          0x387362814         __semwait_signal
1   libsystem_c.dylib               0x33dccd70c         nanosleep
2   libsystem_c.dylib               0x33dccd4f0         sleep
3   mappo                           0x20290ad44         facebook::react::JSIExecutor::defaultTimeoutInvoker
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 12 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   libsystem_kernel.dylib          0x38735bdd0         thread_suspend
3   mappo                           0x202917120         __cxa_throw
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 13 name: SentryCrash Exception Handler (Primary)
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   mappo                           0x20291714c         __cxa_throw
3   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 14 name: com.apple.CFSocket.private
0   libsystem_kernel.dylib          0x38736270c         __select
1   CoreFoundation                  0x32b34d8a4         __CFSocketManager
2   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 15 name: com.mapbox.mbgl.Worker 1
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   Mapbox                          0x103808b40         mbgl::resourceURL
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 16 name: com.mapbox.mbgl.Worker 2
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   Mapbox                          0x103808b40         mbgl::resourceURL
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 17 name: com.mapbox.mbgl.Worker 3
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   Mapbox                          0x103808b40         mbgl::resourceURL
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 18 name: com.mapbox.mbgl.Worker 4
0   libsystem_kernel.dylib          0x3873621ac         __psynch_cvwait
1   libsystem_pthread.dylib         0x3c2a41464         _pthread_cond_wait
2   libc++.1.dylib                  0x355651324         std::__1::condition_variable::wait
3   Mapbox                          0x103808b40         mbgl::resourceURL
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 19
0   libsystem_pthread.dylib         0x3c2a46764         start_wqthread

Thread 20
0   libsystem_pthread.dylib         0x3c2a46764         start_wqthread

Thread 21
0   libsystem_pthread.dylib         0x3c2a46764         start_wqthread

Thread 22 name: com.smartdevicelink.iostream
0   CoreFoundation                  0x32b3d20bc         _CFAutoreleasePoolPop
1   Foundation                      0x32d92adf4         -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
2   mappo                           0x202985fbc         __cxa_throw
3   Foundation                      0x32da9ca30         __NSThread__start__
4   libsystem_pthread.dylib         0x3c2a3dcac         _pthread_start

Thread 23
0   libsystem_kernel.dylib          0x38733e2d0         mach_msg_trap
1   libsystem_kernel.dylib          0x38733d65c         mach_msg
2   libdispatch.dylib               0x32ace8884         _dispatch_mach_send_and_wait_for_reply
3   libdispatch.dylib               0x32ace8c20         dispatch_mach_send_with_result_and_wait_for_reply
4   libxpc.dylib                    0x3c2a7fe64         xpc_connection_send_message_with_reply_sync
5   RunningBoardServices            0x33dd90244         -[RBSXPCMessage sendToConnection:error:]
6   RunningBoardServices            0x33dd909a0         -[RBSXPCMessage invokeOnConnection:withReturnCollectionClass:entryClass:error:]
7   RunningBoardServices            0x33dd73468         -[RBSConnection acquireAssertion:error:]
8   RunningBoardServices            0x33dd70220         -[RBSAssertion acquireWithError:]
9   AssertionServices               0x3582edf90         -[BKSAssertion acquire]
10  AssertionServices               0x3582f2f88         -[BKSProcessAssertion acquire]
11  libdispatch.dylib               0x32acce248         _dispatch_call_block_and_release
12  libdispatch.dylib               0x32accfdac         _dispatch_client_callout
13  libdispatch.dylib               0x32acd8f8c         _dispatch_workloop_invoke
14  libdispatch.dylib               0x32ace1d74         _dispatch_workloop_worker_thread
15  libsystem_pthread.dylib         0x3c2a3f810         _pthread_wqthread



EOF
iOMac Needs Triage

All 11 comments

any updates on this ?

Updated the original post for formatting so it's able to be read.

cc @philipphofmann, I'm not experienced in reading this stack trace, not sure it is related to our SDK?

I don't understand why you get a SIGPIPE when you initialize the SDK and send a transaction. If this were the case, multiple users would have that problem. @jennmueng, can you reproduce this? If not, can you @ghadeeraqraa1992 please give us more context so we can reproduce this?

More details from sentry :
https://sentry.io/share/issue/190bc5b117fb4679951091d815a60ab4/

The stack trace doesn't contain a single frame from our SDKs. Are you sure we are causing this crash @ghadeeraqraa1992? Can you give us a sample project somewhere so we can reproduce the issue?

More details from sentry :
https://sentry.io/share/issue/190bc5b117fb4679951091d815a60ab4/

The stack trace doesn't contain a single frame from our SDKs. Are you sure we are causing this crash @ghadeeraqraa1992? Can you give us a sample project somewhere so we can reproduce the issue?

@philipphofmann
to be sincere, I'm not sure if the issue related to Sentry SDK or not , but I notice the below :

  1. the issue start appearing after adding performance monitoring custom transitions.

I can't provide you with a sample project , but if you need more details please let me know.

Thank you

I don't understand why you get a SIGPIPE when you initialize the SDK and send a transaction. If this were the case, multiple users would have that problem. @jennmueng, can you reproduce this? If not, can you @ghadeeraqraa1992 please give us more context so we can reproduce this?

@philipphofmann I have not been able to reproduce this, plus the e2e tests also sends transactions as it has the react navigation integration set up, and it does not crash.

@ghadeeraqraa1992 It might not be due to our SDK but maybe some other issue when trying to integrate our SDK, or an incorrect installation?

I don't understand why you get a SIGPIPE when you initialize the SDK and send a transaction. If this were the case, multiple users would have that problem. @jennmueng, can you reproduce this? If not, can you @ghadeeraqraa1992 please give us more context so we can reproduce this?

@philipphofmann I have not been able to reproduce this, plus the e2e tests also sends transactions as it has the react navigation integration set up, and it does not crash.

@ghadeeraqraa1992 It might not be due to our SDK but maybe some other issue when trying to integrate our SDK, or an incorrect installation?

@jennmueng
could you please provide me with a react native monitoring performance example , then I will double check my code.

@ghadeeraqraa1992, do you have any updates on this issue? Is your problem solved?

@ghadeeraqraa1992, do you have any updates on this issue? Is your problem solved?

no updates , still I have the issue.
Will update ...

Was this page helpful?
0 / 5 - 0 ratings