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

Native crash SIGSEGV: Segfault __kernel_rt_sigreturn #34745

Open
ToniNikolaev23 opened this issue Sep 21, 2022 · 44 comments
Open

Native crash SIGSEGV: Segfault __kernel_rt_sigreturn #34745

ToniNikolaev23 opened this issue Sep 21, 2022 · 44 comments

Comments

@ToniNikolaev23
Copy link

Description

Hello everyone, today i saw in our Sentry that we have some unhandled issues. I will post screenshot from Sentry.

Sentry

Version

0.64.3

Output of npx react-native info

System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Max
Memory: 3.62 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.6.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.13.2 - /opt/homebrew/bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

I dont know how to reproduce.When i test with android studio, sometimes after launch app emulator just crash and 2nd launch is good. Maybe in real device is the same.

Snack, code example, screenshot, or link to a repository

Sentry

@nnabinh
Copy link
Contributor

nnabinh commented Sep 30, 2022

Same problem

Screen Shot 2022-09-30 at 12 27 08
Screen Shot 2022-09-30 at 12 27 23

@cortinico
Copy link
Contributor

There is nothing we can without a reproducer sadly.
Are you able to reproduce locally in any form?

@jaygeoguy
Copy link

I also have been noticing these __kernel_rt_sigreturn Sentry errors for a few months now but not sure what's the issue at the moment.

Screen Shot 2022-10-03 at 4 16 02 PM

Screen Shot 2022-10-03 at 4 15 35 PM

@BatDroid
Copy link

BatDroid commented Oct 4, 2022

(after trying a lot, I removed the expo-sentry (Sentry.init) and I couldn't reproduce it on my Samsung device (as this happens there) any more. so seeing this issue on a react-native channel, I suppose this issue should be related to react-native-sentry rather than expo-sentry)

@cortinico
Copy link
Contributor

I suppose this issue should be related to react-native-sentry rather than expo-sentry

Don't you mind opening an issue here https://github.com/getsentry/sentry-react-native/issues and link against this one?

@BatDroid
Copy link

@cortinico I'm sorry for the wrong information I gave (didn't do it intentionally). As a matter of the fact, it wasn't expo-sentry, I just removed my yarn.lock and installed packages again.
I know how crazy this can be, but that was the only way for my project :)

@kumarparth380
Copy link

Facing the same native crash on some Samsung devices running on android 12.

@yadigarbz
Copy link

I also facing this issue with my project, I'm not sure which kind of details might relate. Basic most native libs of my project are:
I'm using wix/RNN v7.30.0-alpha.1
react-i18next: "^11.18.6"
@giphy/react-native-sdk

And so far very common properties of my crashes are: They're always the first or second screen of my app(LandingPage, WelcomePage) and all the error origin phones are using Android12

@kumarparth380
Copy link

I got this issue fixed by enabling Hermes. Earlier, hermes in my project was disabled because of some reason so had to turn it on to avoid these crashes. Now the app works fine on Android 12.

@trungls1706
Copy link

i got same problem, in samsung device

@bebe84
Copy link

bebe84 commented Dec 7, 2022

I am also seeing those issues with latest Expo SDK 47, didn't happen before so it is connected to React Native 0.70.5+ 🤔

@ys-sherzad
Copy link

ys-sherzad commented Dec 22, 2022

I'm also noticing quite a number of this error. But don't have Hermes enabled and I'm wondering if the issue was resolved for you after enabling Hermes @kumarparth380 !

@nlarif
Copy link

nlarif commented Dec 23, 2022

Did not see this error again since I switched to Hermes on Android: https://docs.expo.dev/guides/using-hermes/#switch-javascript-engine-on-a-specific-platform

@mitchiemt11
Copy link

I'm still having this issue on Android 13 RN v0.67.5. Is there a possible solution @ToniNikolaev23 ?? I have enabled Hermes but nothing works.

@ys-sherzad
Copy link

I'm receiving this crash a lot. Any insights would be much appreciated:

backtrace:
  #00  pc 0x00000000006703bc  /data/app/[[I omitted this part]]==/lib/arm64/libjsc.so
  #01  pc 0x00000000000005d0  [vdso] (__kernel_rt_sigreturn)
  #02  pc 0x00000000000a6b78  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #03  pc 0x0000000000017cc0  /system/lib64/libutils.so (android::Looper::pollInner(int)+192)
  #04  pc 0x0000000000017b9c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+116)
  #05  pc 0x00000000001687b0  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+48)
  #06  pc 0x00000000001c3964  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+116)
  #07  pc 0x000000000058cdd0  /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+288)
  #08  pc 0x000000000058a0d8  /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+104)
  #09  pc 0x0000000000589fd0  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+560)
  #10  pc 0x00000000002ee384  /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+1316)
  #11  pc 0x0000000000434600  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576)
  #12  pc 0x0000000000466d34  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1960)
  #13  pc 0x0000000000466564  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+48)
  #14  pc 0x0000000000099148  /system/framework/arm64/boot.oat (art_jni_trampoline+120)
  #15  pc 0x00000000005041d0  /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+144)
  #16  pc 0x000000000050d4ec  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3404)
  #17  pc 0x0000000000434600  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576)
  #18  pc 0x000000000057e378  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+900)
  #19  pc 0x00000000005f1d7c  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+160)
  #20  pc 0x00000000000c1c04  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124)
  #21  pc 0x00000000000ce470  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+856)
  #22  pc 0x0000000000002570  /system/bin/app_process64 (main+1304)
  #23  pc 0x000000000004a7d4  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+100)

@Joshandrews43
Copy link

Also getting this crash as well

@RalissonMattias
Copy link

Here it also started showing up heavily in sentry and crashlytics, my app crashes sometimes randomly. It started to appear after RN 0.71.*

@MianSaad705
Copy link

@RalissonMattias Are you using react-native-screens, if yes then which version secondly you are able to reproduce this crash locally?

@RalissonMattias
Copy link

RalissonMattias commented Feb 9, 2023

@RalissonMattias Are you using react-native-screens, if yes then which version secondly you are able to reproduce this crash locally?

@MianSaad705 Yes, I'm using react-native-screens: 3.19.0 and the crash doesn't happen locally

@MianSaad705
Copy link

@RalissonMattias according to my understanding it's a crash on a fresh install and occur only one time, facing the same issue.

@RalissonMattias
Copy link

@MianSaad705 Yes, the same thing happens here. In your application hermes is true or false?

@MianSaad705
Copy link

@RalissonMattias hermes is false in my app.

@RalissonMattias
Copy link

@MianSaad705 That must be it then, in my tests with hermes turned off, the app always closes the first time I download and enter the app. With enabled hermes this is not happening. I used to leave hermes enabled in my app, but it caused a performance drop in some situations, with it disabled the app works better

@Carl-MONNERA
Copy link

Same here but only on samsung devices, first time the app start after booting the device, it crashes, after the crash, I relaunch the app and then it works fine. Hermes is false.

@ys-sherzad
Copy link

I can confirm that after enabling Hermes on Android, we're no longer getting this crash.

@jefflewis
Copy link

I've commented on what appears to be linked issues:

expo/expo#18083
#33896

I see this same behavior with samsung devices on first launch with JSC. I saw this when migrating to RN 0.70.6 (and persisted when trying to go to latest 0.71.3).

adb logcat | ~/Android/sdk/ndk/23.1.7779620/ndk-stack -sym jni/arm64-v8a/libjsc.so
********** Crash dump: **********
Build fingerprint: 'samsung/z3quew/z3q:12/SP1A.210812.016/G988U1UES3FVK1:user/release-keys'
#00 0x00000000005032e4 /data/app/~~VtVNBRifuJ04N56RIsWoRQ==/my.app.bundle.id--LnOREf5niSbPh06Kw3gXw==/base.apk!libjsc.so (BuildId: 9cb83e4124e3ee1471bc717c722b4109614385ba)
#01 0x0000000000000678 [vdso] (__kernel_rt_sigreturn+0)
#02 0x00000000000a30b8 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) (BuildId: b5d187ac75fe4580e13ab2ec624bf7f1)
#03 0x0000000000017ea8 /system/lib64/libutils.so (android::Looper::pollInner(int)+184) (BuildId: 748948a5650ad93d18b12eb1d9a51a89)
#04 0x0000000000017d84 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+116) (BuildId: 748948a5650ad93d18b12eb1d9a51a89)
#05 0x0000000000159170 /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+48) (BuildId: 33b6cccb8cb818db0b8648d93b8de614)
#06 0x00000000003fe504 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+116)
Crash dump is completed

@navarrofracisco
Copy link

navarrofracisco commented Feb 24, 2023

Any updates on this, this is still happening as reported by our Sentry logs.

-We are using hermes in Expo SDK 47
-User simply starts the app and it crashes on the Splash screen.

image

@dhavalsulhuf
Copy link

I'm facing the same issue, any luck?

@kkureli
Copy link

kkureli commented Mar 6, 2023

I'm facing the same issue, any luck?

enabling hermes is solving issue

@MacrosorcH
Copy link

Any solution in sight for this issue?

@Lakston
Copy link

Lakston commented Apr 28, 2023

We are having the same sentry reports, I haven't tried enabling Hermes yet, I'll test that soon

@ccdwyer
Copy link

ccdwyer commented May 2, 2023

I'm facing the same issue, any luck?

enabling hermes is solving issue

Enabling Hermes isn't an option for many of us, so long as it doesn't support Intl (and thus breaks dayjs-timezone and several other packages).

See: iamkun/dayjs#1377

@cw-sanjeev
Copy link

Disabling minification is solving the issue

@raoufmadani
Copy link

Disabling minification is solving the issue

Would you please clarify that ?

@ArthurJahn
Copy link

I'm facing the same issue. Any updates on this one?

@jefflewis
Copy link

This crash report/issue for jsc-android matches my earlier comment and the description of this bug. I commented on this issue that I managed to create a JS bundle that does and does not exhibit the crash. I'm at a loss for how to set up a test harness to actually begin debugging JSC to begin to patch the actual issue.

I'm open to suggestions!

react-native-community/jsc-android-buildscripts#180

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 12, 2024
@ShepSims
Copy link

ShepSims commented Jan 16, 2024

Bump because this is still happening to me regularly... seeing about .1% of users crash on the first app load with this issue - Possibly worth noting that all of the device that I've seen have tis issue are android 12 or below, but not sure if that is a necessary condition or just circumstantial

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 18, 2024
@sergeushenecz
Copy link

Hi. I have the same issue on samsung devices.

@NawazKhanMd
Copy link

Same, this is giving me a headache.

@adityatamhane
Copy link

We are getting the same issue in crashanalytics

@miallo
Copy link
Contributor

miallo commented Sep 17, 2024

We definitley get this error on all Android versions including 14. We see it a lot Samsung, but also on all others (e.g. many different Pixels or Redmi).
Because we need to support old Android/iOS versions we are still on [email protected] and since there is a performance issue in hermes (that was only recently solved) we can't enable hermes...

@omkarKiranaClub
Copy link

omkarKiranaClub commented Sep 27, 2024

Screenshot 2024-09-27 at 1 17 20 PM
Screenshot 2024-09-26 at 2 57 33 PM

I'm encountering same crashes in my React Native app (version 0.72.7) with Hermes enabled. I've analyzed the memory graph for a video component in my app, which has raised concerns about potential memory leaks. I'm seeking guidance on the following:

What is considered ideal or normal memory consumption for a React Native app?
Could the memory usage I'm observing be causing these crashes, possibly due to memory leaks?
Are there recommended tools or strategies for diagnosing and resolving memory-related issues in React Native apps?

I'd appreciate insights from the community on how to approach these performance issues and optimize my app's memory management. If additional information is needed, such as specific crash logs or detailed memory usage data, please let me know, and I'll provide them promptly.

@talaikis
Copy link

  • 1 RN 0.,75.5 new arch + hermes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests