Signal 11 Sigsegv Crash Android

Android Fatal signal 11 (SIGSEGV) at 0x636f7d89 (code=1). How can it be tracked down?

I found the problem. I don't think this will help a lot of others trying to track down their personal SIGSEGV, but mine (and it was very hard) was entirely related to this:

https://code.google.com/p/android/issues/detail?id=8709

The libcrypto.so in my dump kind of clued me in. I do a MD5 hash of packet data when trying to determine if I've already seen the packet, and skipping it if I had. I thought at one point this was an ugly threading issue related to tracking those hashes, but it turned out it was the java.security.MessageDigest class! It's not thread safe!

I swapped it out with a UID I was stuffing in every packet based on the device UUID and a timestamp. No problems since.

I guess the lesson I can impart to those that were in my situation is, even if you're a 100% Java application, pay attention to the native library and symbol noted in the crash dump for clues. Googling for SIGSEGV + the lib .so name will go a lot farther than the useless code=1, etc... Next think about where your Java app could touch native code, even if it's nothing you're doing. I made the mistake of assuming it was a Service + UI threading issue where the Canvas was drawing something that was null, (the most common case I Googled on SIGSEGV) and ignored the possibility it could have been completely related to code I wrote that was related to the lib .so in the crash dump. Naturally java.security would use a native component in libcrypto.so for speed, so once I clued in, I Googled for Android + SIGSEGV + libcrypto.so and found the documented issue.

Crash on MobileAds.initialize(this) Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

I have the same problem today. a lot of users contacted me saying that my app is crashing on start.
I checked my play console crashes and it have huge number of crashes and lot of users impacted with this issue
The only stack trace is this
/data/app/com.android.chrome-p65-sPd3ac7AycjqzKIQbg==/base.apk

I did not update my app it just happed by it self
I found this
https://groups.google.com/g/google-admob-ads-sdk/c/Q-edauZ27g8
It happed before and still

Not all devices affected by this issue. My app in my phone is working fine. However I have another phone and I open my app then it crash at start. yesterday it wasn't.

I updated google chrome then the problem goes away. make sure it's last update of google chrome 22 Mar 2021

I don't think there is something we can do and I don't know how to announce to my users to update google chrome.

How to solve Android Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid xxxxx (Thread-X)?

After some discussion it became clear that the problem was with interaction with memory:

extern "C" 
jdouble
JNICALL Java_com_foo(JNIEnv *env, jclass type, jlong addrRgba, jlong addrGray) {
Mat &mRgb = *(Mat *) addrRgba;
Mat &mGray = *(Mat *) addrGray;

return (jdouble) toGray(mRgb, mGray);
}

As a quick fix double toGray(Mat& rgb, Mat& gray); had to be changed to double toGray(Mat rgb, Mat gray)

Additional information can be found on topic CvMat deep copy

Mysterious Signal 11 crash when accessing Room database

I changed to a different android API level and the problem has not resurfaced since

Android error: Fatal signal 11 (SIGSEGV) leads to app crash

I recommend to use a debugger and query more information about the crash (e.g. LLDB). Sometimes you do not even need to set up breakpoints, since the debugger can stop when it catches an error and show you the problematic code (It can be on the native side).

According to this question, bad memory access can lead to SIGSEGV.

Watch out for memory leaks in your app, make sure you are not holding any references to killed Context objects and etc.



Related Topics



Leave a reply



Submit