bugsnag/bugsnag-android

Bugsnag Android Plugin crashes the app with SIGSEGV - Segmentation violation (invalid memory reference)

cdarau opened this issue · 4 comments

Hello to all.

I'm working on an Android project and I incorporated Bugsnag in it a few months ago. The problem is that I keep encountering a strange situation since performing the integration and I didn't find support about it anywhere, so I'm writing this issue here.

So far, in the last 2 months alone, I got 72 occasional crashes (which even got reported in the Bugsnag dashboard!) with a reason of SIGSEGV - Segmentation violation (invalid memory reference), crashes that are almost identical in their stacktrace as it follows:

  • 4 such errors on 2 devices with the following stacktrace:
SIGSEGV · Segmentation violation (invalid memory reference)
/system/lib/libc.so:103148 strlen    
/system/lib/libart.so:906835 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)    
/system/lib/libart.so:3356307 art::Thread::Attach(char const*, bool, _jobject*, bool)    
/system/lib/libart.so:3208937 art::Runtime::AttachCurrentThread(char const*, bool, _jobject*, bool)    
/system/lib/libart.so:2355503 0xf52bd12f    
/data/app/com.activaire.music-2/lib/arm/libbugsnag-plugin-android-anr.so:4973 0xef48136d    
/system/lib/libc.so:261517 0xf7494d8d    
/system/lib/libc.so:107335 0xf746f347
  • 52 such errors on 5 devices with the following stacktrace:
SIGSEGV · Segmentation violation (invalid memory reference)
libc.so:82944 strlen    
libart.so:670084 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)    
libart.so:2276607 art::Thread::Attach(char const*, bool, _jobject*, bool)    
libart.so:2185313 art::Runtime::AttachCurrentThread(char const*, bool, _jobject*, bool)    
libart.so:1807695 0xf555f54f    
libbugsnag-plugin-android-anr.so:4973 0xefa0336d    
libc.so:92469 0xf7264935    
libc.so:84065 0xf7262861
  • 16 such errors on 6 devices with the following stacktrace:
SIGSEGV · Segmentation violation (invalid memory reference)
/system/lib/libc.so:103148 strlen    
/system/lib/libart.so:906835 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)    
/system/lib/libart.so:3356307 art::Thread::Attach(char const*, bool, _jobject*, bool)    
/system/lib/libart.so:3208937 art::Runtime::AttachCurrentThread(char const*, bool, _jobject*, bool)    
/system/lib/libart.so:2355503 0xf4e7d12f    
/data/app/com.activaire.music-1/lib/arm/libbugsnag-plugin-android-anr.so:4809 0xeb7112c9    
/system/lib/libc.so:261517 0xf7076d8d    
/system/lib/libc.so:107335 0xf7051347

All of them seem to have been from the Bugsnag Android Plugin, if I'm understanding right. Also, one thing notable is that I didn't have such crashes before integrating the Bugsnag library on Android. I followed the guide correctly and I added everything it needed. I can't reproduce it, it just happens occasionally.

I already read the FAQ added at the end of this integration doc (I mean this), but I don't think it's that, since that error it's an NoSuchMethodError one, not a SIGSEGV crash.

Any help is appreciated. Thank you all in advance.

Hi @cdarau - thanks for reporting this, I think this issue belongs in the bugsnag-android repo, so I've moved it over.

This is actually a crash we were already aware of, and seems to only affect a small number of users running older Android versions (v5/v6). We've been working on a fix already, which should be released soon. We'll update you as soon as it's available 👍

@luke-belton thank you very much for your feedback! Will wait to get updated then.

Hi @cdarau - just to let you know a fix for this was released in v5.20.0 of bugsnag-android 🎉

@luke-belton will integrate it in my apps ASAP! Kudos to the dev team for fixing this so quickly!