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

SIGSEGV errors on old Android devices when Sentry is enabled. #1591

Closed
rodolfoBee opened this issue Mar 19, 2024 · 17 comments · Fixed by #1652
Closed

SIGSEGV errors on old Android devices when Sentry is enabled. #1591

rodolfoBee opened this issue Mar 19, 2024 · 17 comments · Fixed by #1652
Assignees
Labels
Android Bug Something isn't working Sync: Jira apply to auto-create a Jira shadow ticket

Comments

@rodolfoBee
Copy link
Member

rodolfoBee commented Mar 19, 2024

Environment

How do you use Sentry?
Sentry SaaS

Which version of the SDK?

=1.7.0

Which version of Unity?
2022.3.13f1

Steps to Reproduce

Reproduction app is available in the internal issue.

Expected Result

The application runs with no errors on all devices.

Actual Result

Android 5 and older devices experience a SIGSEGV error. Link to event also in the internal ticket.

┆Issue is synchronized with this Jira Improvement by Unito

@rodolfoBee rodolfoBee added the Sync: Jira apply to auto-create a Jira shadow ticket label Mar 19, 2024
@rodolfoBee
Copy link
Member Author

@bitsandfoxes @kahest the affected user is asking for an update, is there any?

@kahest
Copy link
Member

kahest commented Mar 26, 2024

@rodolfoBee I don't have any updates, I'm not working on this currently

@bitsandfoxes
Copy link
Contributor

I think we're a bit lost here without a proper way to reproduce this.
It is possible that the changes that have been made to get rid of our custom sigaltstacks in sentry-native could cause an increase in reported SIGSEGV. But for that to happen there needs to be a signal first. So basically: Sentry is crashing while capturing a crash.

@bitsandfoxes
Copy link
Contributor

It's possible that the fix we ran out in #1469 causes friction with the limited memory available on old devices.
I could try to build a version of the SDK with the "old" approach and see if that works on Android 5 and 6? Would you be able to run that hand-made SDK on one of those devices?

@Talibt
Copy link

Talibt commented Apr 10, 2024

Hey @bitsandfoxes
Thank you!
Yeah sure, that would be easy to do.

@bitsandfoxes
Copy link
Contributor

Hi @Talibt,
I've created an "experimental" package with the rollback on the sentry-native here.
This is strictly intended to work on and for those old Android devices. If you could give that a try and see if it has any effect on the crashes you're seeing, that'd be hugely appreciated.

@Talibt
Copy link

Talibt commented Apr 16, 2024

Hey @bitsandfoxes,
sorry to inform you that the hand-made package didn't work as expected. The lower-end devices are still crashing.
However, we also tested your Unity Lite EPK, available here: https://github.com/getsentry/sentry-unity-lite,
and it worked smoothly.
What do you think is needed to move forward with fixing this issue?

@bitsandfoxes
Copy link
Contributor

One thing you could do immediately to unblock yourself from those issues on low-end devices is to disable android-native support. That way you get all of the offerings the Unity SDK has without having to rely on the Lite package.
Could you provide us with a build that keeps crashing?

@Talibt
Copy link

Talibt commented May 1, 2024

Yeah I'm pretty sure that we won't like to skip over the native support,
which pretty sucks.
However you can find the build that keeps crashing using the "experimental" package that you supplied,
here.

@bitsandfoxes
Copy link
Contributor

Thanks! We'll take a look!

@WeiLingQiang
Copy link

Is there a solution? I also encountered the same problem, my version is 2.0.1

@bitsandfoxes
Copy link
Contributor

bitsandfoxes commented May 6, 2024

Hey, I really need some help here.
Did this break with an upgrade to >1.7.0? Are there older versions of the SDK that worked fine?

However you can find the build that keeps crashing using the "experimental" package that you supplied,

Are there any events getting sent to Sentry from the build? Could you confirm the reporting SDKs version number (that can be found all the way at the bottom of the issue page)

Are there any logs at all you can provide us?

@WeiLingQiang
Copy link

After the SDK is initialized, it will crash for about 1 minute
https://sausage-client-sentry.sausage.xd.com/share/issue/41938710432c4d498b0c5aca5ba97f1c/

This is captured by AndroidStudio Logcat
image

@bitsandfoxes
Copy link
Contributor

Could you help me out here? Could you give that a try with an "empty" Unity project with Sentry added? As a minimal repro? Does that crash as well?

@bitsandfoxes bitsandfoxes added Bug Something isn't working Android labels May 13, 2024
@WeiLingQiang
Copy link

Could you help me out here? Could you give that a try with an "empty" Unity project with Sentry added? As a minimal repro? Does that crash as well?

Yes, I did this, and will crash

@bitsandfoxes
Copy link
Contributor

Thanks for confirming. We've got a lead.

@bitsandfoxes
Copy link
Contributor

Found the issue. Fixed the issue. PR is in the works. The crashes will stop with the next release. Sorry this took some time, and thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Bug Something isn't working Sync: Jira apply to auto-create a Jira shadow ticket
Projects
Archived in project
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants