★ wanayoo — archive 1999 https://github.com/NativeScript/android-runtime/pull/1545Nouvelle recherche | Portail wanayoo
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

fix: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) crashes #1545

Merged
merged 1 commit into from Dec 3, 2019

Conversation

@DickSmith
Copy link
Contributor

@DickSmith DickSmith commented Nov 29, 2019 •

Description

Various signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) crashes reported in Google Play. Occur at a ~0.4-0.5% crash rate. Usually Android 9 (sometimes 7/8/10). I see there is a similar handler for SIGABRT on those versions, so I just expanded that to include SIGSEGV.

Does your commit message include the wording below to reference a specific issue in this repo?

Fixes #1413

Does your pull request have unit tests?

No idea how to test this from the JS like SIGABRT. However, prior to this change I was getting hundreds of these a day, and now almost 0 (the very few still are those < API 25).

@cla-bot cla-bot bot added the cla: yes label Nov 29, 2019
sigaction(SIGABRT, &SIGABRT_action, NULL);

struct sigaction SIGSEGV_action;
SIGSEGV_action.sa_handler = SIGSEGV_handler;

This comment has been minimized.

@darind

darind Dec 2, 2019
Member

We can reuse the same signal handler for both signals, since the behaviour is quite similar (throw a NativeScriptException).

@DickSmith DickSmith force-pushed the DickSmith:release branch from aea1ec7 to fc576c1 Dec 2, 2019
@DickSmith
Copy link
Contributor Author

@DickSmith DickSmith commented Dec 2, 2019

@darind
I've updated the PR to handle both signals in the same method.
I've also expanded to include > API 20 since there were still a a large number of crashes for tgkill (SIGABRT) and SIGSEGV on those older versions.
Verified by internal QA and against 310K+ users in production, with no crashes of either type present on any Android versions on Google Play, and instead I see them being reported as non-fatals in Crashlytics (which is how I handle Uncaught and Discarded errors).
(In fact, the Google Play Pre-launch report did not crash with the Huawai P8 on Android 5.0 for the first time ever, which was never reported in Prod/Release, but still a good sign.)
The app only supports API 21+, so did not validate below that.

@darind
darind approved these changes Dec 3, 2019
@darind darind merged commit 92b90a1 into NativeScript:master Dec 3, 2019
3 checks passed
3 checks passed
ci/jenkins/android-runtime PASSed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
verification/cla-signed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.