-
-
Notifications
You must be signed in to change notification settings - Fork 435
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 when user interaction instrumentation is enabled #3653
Comments
I am facing the same issue, any update on this? Sentry version:
here's the stack trace
|
Hey everyone, thanks for reaching out! This looks like another issue with Androids built-in profiler. Similar to #2604 and #3561 Disabling user interaction instrumentation just hides the real culprit, as user interaction instrumentation creates transactions which in turn creates profiles, which itself uses the built-in Android profiler. Could you try to disable profiling instead? SentryAndroid.init(context) { options ->
options.profilesSampleRate = 0.0
} On top of that: Is your app using any native (C/C++) code in combination with some custom threading? |
We actually had tried this when debugging the issue and found that it seemed to prevent crashes from happening as well. Would you advise disabling profiling instead of user interaction instrumentation?
Our app doesn't use native code "directly", but some libraries we depend on do. The code is not open source though and is not shared with us, so I can't tell exactly how it deals with threading. |
For reference:
|
@OlivierGenez Yes, we would advise disabling profiling in the meantime instead. |
Let's try to reproduce this issue in a minimal environment (Android 14, as seen in the attached tombstone). |
Update from Google on the issue tracker:
|
Is there any configuration change you did in the "latest update" of your app? E.g. did you change the sampling rate, enable a specific feature, bumped an SDK version tc? |
Hi @markushi , just a heads up that this will occur even with options.profilesSampleRate = 0.0. |
I can confirm with the latest update to disable profiling, we are still observing crashes. As @OlivierGenez mentioned, turning off profiling and disabling
|
@empowerDan @ashwin-coles could you share the backtrace of these crashes (after disabling profiling)? Is it the same as the other ones in this thread? |
Yep, same - also can confirm that @ashwin-coles snippet brings all art::Thread::DumpState errors down to 0, however this silences quite a lot of other things too so it's not a very viable long term solution as a paying customer. options.isEnableActivityLifecycleTracingAutoFinish = false Do we know if the issue occurs on previous versions of Sentry too? |
Hey guys, we've seen the same crash happening very often in our prod apps that also uses Sentry, we don't use instrumentation. The specific crash we have is this:
and the backtrace is this:
Hope we can hear of a solution soon 👍 |
@markdrake-dev thank you for the report and the backtrace. Does "we don't use instrumentation" mean you have the options below all deactivated? Do you have an
|
@kahest Sorry for not checking those values first. I found out we were configuring it via manifest and here are the values we are using:
|
We also experience the same crash which went under our radar because, for some reason, Firebase Crashlytics didn't catch this crash until we got an email from Google that our crash rate exceeds the device bad behavior threshold of 8.0% on 8 device models affecting 8.46% of installs. Around 2K of our users are affected by this crash and many of them are paid users. This is pretty bad guys, I hope this will be solved soon, meantime we will have to de-integrate Sentry from our Android project.
|
@AdnanYupi do you have any more information on if there's specific devices, OS versions, etc. affected? |
@kahest Hey, thanks for reaching out. Yeah, I can share the list of affected devices. The majority, around 90%, are Pixel devices and one Samsung device. Pixels are from Pixel 6 to Pixel 8 Pro. For now that Samsung device is kinda irrelevant because we don't have many users using that specific device. Here is the screenshot from the Play Console: Judging by the rate percentage most of the time Android 13 was affected but, the case might be that these devices are mostly on Android 13. Not sure. |
Same issue with us.
We had to roll back Sentry Integration. Initialization was done like this -
I'm willing to discuss this further over a call. Pinged @kahest over twitter DM. |
Our hunch is that there's no user impact, as there were no escalations on two of our apps. Android SDKs affected - Device Distribution Issue was not caught by Firebase but Sentry was able to catch it. Most likely we need Firebase NDK for firebase to be able to catch it. |
@aakashchoubey thanks for the report. Please note that the first crash in your previous post is already tracked in a separate issue: #2604 Also based on the init snippets you shared, both User Interaction Tracing and Profiling are disabled in your app - can you double-check this please? About "Disabling Sentry's init behind a flag helped bring a flatline" - where do you see this flatline? |
Hey @kahest, thanks for the reply.
So as we can see, the flag is on natively.
Sure, adding a screenshot. Few additional observations that I have -
So, is it possible that adding the environment flag triggered this? Or maybe it could just be that the numbers were low. There are two different stacktraces for this crash.
Also there's another similar crash
Hope this helps. Let me know if you need any further info on these. |
@aakashchoubey thanks for the details - let me answer one-by-one.
#2604 looks similar in many respects, but is a different root cause most likely, so we're trying not to conflate the two. If you have new info for the crash with
Environment should not affect this in any way, we can rule this out.
These are almost identical, a difference in the 13th/14th frame is most likely not relevant, but thanks for pointing it out 👍 |
@kahest can you please share plan for release this bug. |
@sagarbhojaviya please see the updates at the top. There is currently no way for us to fix this on the SDK side, it will most likely require a fix inside of the Android Tracer. We will keep this issue updated. |
@kahest can you please help me in this i have below meta-data inside android manifest file, i want to know which tag i want to new add or update current meta-data value for stop this issue temporary.
|
@sagarbhojaviya it's this: <meta-data
android:name="io.sentry.traces.profiling.sample-rate"
android:value="0.0" /> |
❗ EDIT by the maintainers:
Integration
sentry-android
Build System
Gradle
AGP Version
8.3.2
Proguard
Disabled
Version
7.12.1
Steps to Reproduce
My team has observed an increase in this type of crashes in Sentry/Android vitals with the latest update of our app:
This is not a new issue (we've seen reports as far back as a year ago) but there has been a significant increase in crash reports.
Our app's sentry config has user interaction instrumentation enabled:
After some investigation, we've been able to replicate the issue in the debug version of our app (i.e., R8 is disabled) on Pixel 6a and Pixel 7a devices with Android 14 by:
Based on Sentry/Android vitals crash reports this definitely occurs on a wide variety of devices with standard app usage, but this is one way we've been able to replicate the issue somewhat consistently.
Expected Result
The application proceeds as normal and doesn't crash.
Actual Result
After a while, the interactions slow down a bit, then the application crashes:
Attached is a full crash dump: tombstone.txt.
The issue cannot be replicated when user interaction instrumentation is disabled:
The text was updated successfully, but these errors were encountered: