react-native: Native crash SIGSEGV: Segfault __kernel_rt_sigreturn

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

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 17
  • Comments: 39 (3 by maintainers)

Most upvoted comments

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: https://github.com/iamkun/dayjs/issues/1377

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

@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

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.

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

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

https://github.com/expo/expo/issues/18083 https://github.com/facebook/react-native/issues/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

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