react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Getting SIGABRT Crash on release build. libc.so

Open afkcodes opened this issue 4 years ago • 97 comments

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Did looked for related issues did not find any solution for this, the crash is prominent for almost most of the user on my end on my device im unable to reproduce it if someone has faced the crash please help me get away with this. I have hermes enabled for my app.

React Native version:

System:
    OS: Linux 5.8 Manjaro Linux
    CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
    Memory: 14.79 GB / 19.40 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    Yarn: Not Found
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 11.0.8 - /usr/lib/jvm/default/bin/javac
    Python: 3.8.5 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: ^3.0.5-alpha.1 => 3.2.1 
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Unable to produce on my devices but i am able to see this crash on users in production. Probably happening happening while the app starts as i can see in the logs,

Expected Results

This crash is too prominent more than 20% users are facing the crash need a fix

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

Crashed: Thread :  SIGABRT  0x000027b900000bf9
#00 pc 0x72c8ba5b3c libc.so 
#01 pc 0x72c8ba5b0c libc.so 
#02 pc 0x722553f124 libc++_shared.so 
#03 pc 0x722553b3d4 libc++_shared.so 
#04 pc 0x7224ec43b4 libhermes-executor-release.so 
#05 pc 0x7224ec48bc libhermes-executor-release.so 
#06 pc 0x7224ebcffc libhermes-executor-release.so 
#07 pc 0x7224eae4e8 libhermes-executor-release.so 
#08 pc 0x7224eb0c74 libhermes-executor-release.so 
#09 pc 0x7224ea84c8 libhermes-executor-release.so 
#10 pc 0x7224876264 libhermes.so 
#11 pc 0x7224875be4 libhermes.so 
#12 pc 0x722487ffac libhermes.so 
#13 pc 0x722488e9f0 libhermes.so 
#14 pc 0x7224891e34 libhermes.so 
#15 pc 0x722488f93c libhermes.so 
#16 pc 0x722487fb0c libhermes.so 
#17 pc 0x722488ea08 libhermes.so 
#18 pc 0x7224891e34 libhermes.so 
#19 pc 0x722488f93c libhermes.so 
#20 pc 0x722487fb0c libhermes.so 
#21 pc 0x722488ea08 libhermes.so 
#22 pc 0x7224891e34 libhermes.so 
#23 pc 0x722488f93c libhermes.so 
#24 pc 0x722487fb0c libhermes.so 
#25 pc 0x722488ea08 libhermes.so 
#26 pc 0x7224891e34 libhermes.so 
#27 pc 0x722488f93c libhermes.so 
#28 pc 0x7224900dc0 libhermes.so 
#29 pc 0x722487ffac libhermes.so 
#30 pc 0x722488e9f0 libhermes.so 
#31 pc 0x7224891e34 libhermes.so 
#32 pc 0x722488f93c libhermes.so 
#33 pc 0x7224900dc0 libhermes.so 
#34 pc 0x722487ffac libhermes.so 
#35 pc 0x722488e9f0 libhermes.so 
#36 pc 0x7224891e34 libhermes.so 
#37 pc 0x722488f93c libhermes.so 
#38 pc 0x722487ee28 libhermes.so 
#39 pc 0x7224900b70 libhermes.so 
#40 pc 0x722487ffac libhermes.so 
#41 pc 0x722488e9f0 libhermes.so 
#42 pc 0x7224891e34 libhermes.so 
#43 pc 0x722488f93c libhermes.so 
#44 pc 0x722487fb0c libhermes.so 
#45 pc 0x722488ea08 libhermes.so 
#46 pc 0x7224891e34 libhermes.so 
#47 pc 0x722488f93c libhermes.so 
#48 pc 0x722487fb0c libhermes.so 
#49 pc 0x7224870108 libhermes.so 
#50 pc 0x7224eb1334 libhermes-executor-release.so 
#51 pc 0x7224eb1190 libhermes-executor-release.so 
#52 pc 0x7224eab5e4 libhermes-executor-release.so 
#53 pc 0x7224eae034 libhermes-executor-release.so 
#54 pc 0x7224fa0d58 libreactnativejni.so 
#55 pc 0x7224fa2350 libreactnativejni.so 
#56 pc 0x7224f68d48 libreactnativejni.so 
#57 pc 0x7224f59a70 libreactnativejni.so 
#58 pc 0x7224f599ec libreactnativejni.so 
#59 pc 0x724331e9e0 libart.so 
#60 pc 0x3ffffffc  
#61 pc 0x136412ec  
#62 pc 0x19d5213c  
#63 pc 0x136412ec  

afkcodes avatar Sep 18 '20 19:09 afkcodes

Are you running this on Android or on linux?

Side note: you may want to upgrade your installation of @react-native-community/cli, as seen here.

SConaway avatar Sep 20 '20 00:09 SConaway

@SConaway Its on Android and the crash happens on an Android device.

afkcodes avatar Sep 20 '20 09:09 afkcodes

Are there other any details of the crash logs?

Try upgrading the cli

SConaway avatar Sep 20 '20 17:09 SConaway

@SConaway i am not seeing any thing more abou the crash, i will surely update the cli and put a new build and see how it goes thanks for help.

afkcodes avatar Sep 20 '20 17:09 afkcodes

No problem. I'm a bit better with the iOS side of things but still tried to help.

SConaway avatar Sep 20 '20 17:09 SConaway

@ashishfeels Hi, did you manage to solve the problem? We have something similar happening on devices of users in production

JerakRus avatar Oct 01 '20 10:10 JerakRus

@JerakRus i havent gave an update so cant tell much about it.will let you know when i do

afkcodes avatar Oct 03 '20 06:10 afkcodes

Do you have any information to indicate this is a React Native core issue? Have you looked at the Hermes repo to see if there's anything there? Does it repro without Hermes?

chrisglein avatar Oct 06 '20 18:10 chrisglein

@chrisglein this actually happened twice when i was not using hermes.

afkcodes avatar Oct 07 '20 04:10 afkcodes

Hi. We've started to get the same crash in crashlytics after releasing new version with target sdk set to 29 (before it was 28). Effecting mainly Android 10 (80% of all crashes) and Android 9 (15% of all crashes) devices. From the logs it seems like a lot of them are happening on the startup. But quite few at random time.

We've tried to reproduce it on different devices and emulators - no luck.

Hermes is disabled, running [email protected].

nikDemyankov avatar Oct 15 '20 17:10 nikDemyankov

What i have found out that almost all of the crashes in my case is happening in Redmi/Mi Devices.

afkcodes avatar Oct 15 '20 18:10 afkcodes

Hi @nikDemyankov thanks for a bit more context. It is hard to pinpoint the specific issue, is there more information you could provide? Which components? Which user interaction lead to this? etc?

safaiyeh avatar Oct 20 '20 03:10 safaiyeh

Same issue on react-native: 0.63.3

Crashed: Thread :  SIGSEGV  0x0000000000000010
#00 pc 0x7de39e0748 libjsc.so 
#01 pc 0x7de3a2cfe8 libjsc.so 
#02 pc 0x7ef3e8b0c8 libc.so 

RodolfoGS avatar Oct 31 '20 22:10 RodolfoGS

@RodolfoGS

Just a shot in the dark, but what is your Android SDK setup? Meaning, what is the output of react-native info in your project? What SDK tools are specified in either android/build.gradle or android/app/build.gradle?

SConaway avatar Oct 31 '20 22:10 SConaway

@SConaway react-native info

System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
    Memory: 31.79 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.13.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      Android NDK: 21.3.6528147
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
  Languages:
    Java: 12.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: ~0.63.3 => 0.63.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

RodolfoGS avatar Oct 31 '20 22:10 RodolfoGS

@RodolfoGS What is your android/build.gradle (this matters since it says how you're building the app)?

SConaway avatar Oct 31 '20 22:10 SConaway

@SConaway This?

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29

        // react-native-iap required
        androidXAnnotation = "1.1.0"
        androidXBrowser = "1.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.3'
        classpath("com.android.tools.build:gradle:3.5.3")

        // Crashlytics required (Doc: https://rnfirebase.io/crashlytics/android-setup#2-add-the-firebase-crashlytics-plugin-dependency)
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven {
            // react-native-background-fetch
            url("${project(':react-native-background-fetch').projectDir}/libs")
        }

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

RodolfoGS avatar Oct 31 '20 22:10 RodolfoGS

Yep, that's what I meant. I don't see anything that sticks out to me there, so sorry.

SConaway avatar Oct 31 '20 22:10 SConaway

@SConaway I just updated my comment adding all content of android/build.gradle

RodolfoGS avatar Oct 31 '20 22:10 RodolfoGS

FWIW, you can upgrade these:

  1. 'com.google.gms:google-services:4.3.3' --> 'com.google.gms:google-services:4.3.4'
  2. "com.android.tools.build:gradle:3.5.3" --> 'com.android.tools.build:gradle:4.2.0-alpha15' [NOTE: this one may require you to bump your gradle version in android/gradle/gradlew.properties to 6.7 — follow instructions given if it errors] 3. 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' --> 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'

SConaway avatar Oct 31 '20 22:10 SConaway

I'll test that, thanks!

RodolfoGS avatar Oct 31 '20 22:10 RodolfoGS

@RodolfoGS I'm seeing the same error, did upgrading those help?

cmds4410 avatar Nov 04 '20 18:11 cmds4410

I was using JSC and now I'm switching to Hermes engine and works good so far. I didn't make those updates for now.

RodolfoGS avatar Nov 04 '20 19:11 RodolfoGS

Same issue on react-native: 0.59.10 I got the error after We set targetSdk to 29, it was 28. Any help?

wangchongwei avatar Nov 05 '20 07:11 wangchongwei

I got the same problem.

React Native environment:

System: OS: macOS 10.15.6 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz Memory: 1.09 GB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.14.1 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6858069 Xcode: 12.0/12A7209 - /usr/bin/xcodebuild Languages: Java: 13.0.2 - /usr/bin/javac Python: 2.7.15 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 npmGlobalPackages: *react-native*: Not Found

This is information from Firebase Crashlytics for my project.

image

image

Did someone fix this problem?

ArturTimoxin avatar Nov 10 '20 14:11 ArturTimoxin

This bug is happening to some of my users, 100% HUAWEI phones, and android 9-10

libc abort
libc pthread_once
libc <unknown>
libc pthread_mutex_lock
libc++ std::__1::mutex::lock
libandroid AAssetManager_open
libreactnativejni facebook::react::JniJSModulesUnbundle::getModule
libjscexecutor facebook::react::RAMBundleRegistry::getModule
libjscexecutor facebook::react::JSIExecutor::nativeRequire

Titozzz avatar Nov 13 '20 11:11 Titozzz

我遇到的问题是这样的: My problem is this:

OS Version: Android 9 (COR-AL10 9.1.0.346(C00E336R1P1)) Report Version: 104

Exception Type: Unknown (SIGSEGV)

Application Specific Information: Segfault

Thread 0 Crashed: 0 libjsc.so 0x7136863748 + 486246070088 1 libjsc.so 0x71368affec + 486246383596 2 libjsc.so 0x713689b0ac + 486246297772 3 libjsc.so 0x71368a5488 + 486246339720 4 libjsc.so 0x71368a5010 + 486246338576 5 libjsc.so 0x71369679c8 + 486247135688 6 libjsc.so 0x7136964e94 + 486247124628 7 libjsc.so 0x71369656c0 + 486247126720 8 libjsc.so 0x713694afe8 + 486247018472 9 libjsc.so 0x7136949a48 + 486247012936 10 libjsc.so 0x713694e840 + 486247032896 11 libjsc.so 0x7136d79e80 + 486251404928 12 libjsc.so 0x7136d87088 + 486251458696 13 libjsc.so 0x7136db2dcc + 486251638220 14 libc.so 0x71d97c6588 __pthread_start 15 libc.so 0x71d97671dc __start_thread 16 0x0

EOF

wutiange avatar Nov 17 '20 04:11 wutiange

We experienced the same crash after upgrade targetSdk from 28 to 29.

We are on RN 0.59.10 and currently have difficulties to upgrade RN version.

Most crashes happened on app start. Our crash stack is:

Crashed: Thread : SIGSEGV 0x0000000000000010 #00 pc 0x75c6647748 libjsc.so #01 pc 0x75c6693fe8 libjsc.so #02 pc 0x76cd285314 libc.so

Anyone know how to solve this? @wangchongwei did you find a solution?

howg0924 avatar Nov 18 '20 04:11 howg0924

@RodolfoGS hey is switching to Hermes engine removed this crashes ? I'm facing same crashes Crashed: Thread : SIGSEGV 0x0000000000000040 #00 pc 0x7d801ea9bc libjsc.so #01 pc 0x7d801ea9c4 libjsc.so #02 pc 0x7e8f5e6af0 libc.so

aamir-ans avatar Dec 14 '20 08:12 aamir-ans

switching to hermes will not solve the issue i have hermes enabled but still i see this crash, hope this gets addressed in next update.

afkcodes avatar Dec 14 '20 10:12 afkcodes