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

[PLAT-6346] Fix deadlock in bsg_recordException() #1082

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

nickdowell
Copy link
Contributor

Goal

Some flakiness in E2E tests was being caused by a deadlock in the NSException crash handler.

When the test(s) failed, Filling out context. was the last log output from the test fixture.

Design

The deadlock occurred because malloc and the objc runtime were being called while other threads were suspended and may be holding a lock.

Changeset

bsg_kscrashsentry_suspendThreads() is now called immediately before calling the main crash handler.

Testing

Was not able to reproduce the deadlock manually, however the E2E tests pass with this fix.

@github-actions
Copy link

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size did not change - 1,125,144 bytes

Generated by 🚫 Danger

@nickdowell nickdowell merged commit e29978b into next Apr 26, 2021
@nickdowell nickdowell deleted the nickdowell/fix-uncaught-exception-deadlock branch April 26, 2021 10:04
@kstenerud kstenerud mentioned this pull request Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants