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

EXC_BAD_ACCESS (SIGSEGV) in sentrycrashmc_getThreadAtIndex; SentryCrash Exception Handler (Primary) #1979

Closed
vorporeal opened this issue Jul 15, 2022 · 7 comments

Comments

@vorporeal
Copy link

vorporeal commented Jul 15, 2022

Platform

macOS

Installed

Carthage

Version

7.20.0

Steps to Reproduce

We've had trouble consistently reproducing this issue. A user reported that our app (Warp, a MacOS terminal) crashes when they try to run complex Terraform commands; see warpdotdev/Warp#1619.

They provided a crash log (attached here, but also available from the linked issue) which indicates that the crashing thread is SentryCrash Exception Handler (Primary), with the following stack trace:

Thread 19 Crashed:: SentryCrash Exception Handler (Primary)
0   Sentry                        	       0x1095e33b8 sentrycrashmc_getThreadAtIndex + 4
1   Sentry                        	       0x109596830 writeAllThreads + 184
2   Sentry                        	       0x1095964a4 sentrycrashreport_writeStandardReport + 2088
3   Sentry                        	       0x1095b988c onCrash + 144
4   Sentry                        	       0x1095b6224 sentrycrashcm_handleException + 156
5   Sentry                        	       0x1095ba984 handleExceptions + 724
6   libsystem_pthread.dylib       	       0x18f45026c _pthread_start + 148
7   libsystem_pthread.dylib       	       0x18f44b08c thread_start + 8

We have seen this occur other times in the past (so it's not a 7.20.0 regression), but there hasn't ever been a consistent pattern, and we've never been able to reliably reproduce it.

While the implication here is that sentry is crashing during handling of a crash elsewhere in the stack (and so there would be user impact even with a fix in place), it would be great to fix this so that we get accurate reporting of the initial crash.

I'm not sure whether this would have any relevance, but our application is written primarily in Rust, with some Objective-C code, and we use both the Cocoa and Rust Sentry SDKs in our application simultaneously.

Expected Result

Our application doesn't crash with a stack trace that points to a segfault in Sentry code.

Actual Result

See attached crash log: crash-report.txt

@brustolin
Copy link
Contributor

Thanks @vorporal. We are aware of this and working on a solution.

This is related to #1892

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@brustolin
Copy link
Contributor

This was fixed with #2939

@AbdulmalekAlshugaa
Copy link

Having the same issue aging with the new sentry update : SentryCrash Exception Handler (Secondary)

@AbdulmalekAlshugaa
Copy link

SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib        	       0x102158bb0 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x102169d44 mach_msg2_internal + 76
2   libsystem_kernel.dylib        	       0x102185504 thread_suspend + 108
3   HelloChefTest                 	       0x100a49c74 handleExceptions + 128
4   libsystem_pthread.dylib       	       0x10309b4c0 _pthread_start + 104
5   libsystem_pthread.dylib       	       0x1030966f0 thread_start + 8
Thread 14:: SentryCrash Exception Handler (Primary)
0   libsystem_kernel.dylib        	       0x102158bb0 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x102169d44 mach_msg2_internal + 76
2   libsystem_kernel.dylib        	       0x102160dd4 mach_msg_overwrite + 532
3   libsystem_kernel.dylib        	       0x102158f28 mach_msg + 20
4   HelloChefTest                 	       0x100a49ca0 handleExceptions + 172
5   libsystem_pthread.dylib       	       0x10309b4c0 _pthread_start + 104
6   libsystem_pthread.dylib       	       0x1030966f0 thread_start + 8

@philipphofmann
Copy link
Member

@AbdulmalekAlshugaa, please open a new issue pointing to this issue and put in the required details of the bug template. This helps us to better understand what could cause this. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants