jsc-android-buildscripts: Native Crash with RN - SIGSEGV - 245459.0.0

Bug

After upgrading some dependencies (and most importantly compile sdk from 28 to 29), I’m starting to get random SIGSEGV crashes from various android devices

The following is the stack trace of one of them:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
JSC::AccessCase::propagateTransitions(JSC::SlotVisitor&) const

Samsung Galaxy Note9 (crownqltesq), Android 9
Report 1 of 1
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.zinspector3 <<<

backtrace:
  #00  pc 00000000000f7748  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::AccessCase::propagateTransitions(JSC::SlotVisitor&) const+16)
  #01  pc 0000000000143fe8  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::PolymorphicAccess::propagateTransitions(JSC::SlotVisitor&) const+48)
  #02  pc 000000000012f0a8  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::CodeBlock::propagateTransitions(JSC::ConcurrentJSLocker const&, JSC::SlotVisitor&)+556)
  #03  pc 0000000000139484  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::ExecutableToCodeBlockEdge::runConstraint(JSC::ConcurrentJSLocker const&, JSC::VM&, JSC::SlotVisitor&)+40)
  #04  pc 000000000013900c  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::ExecutableToCodeBlockEdge::visitChildren(JSC::JSCell*, JSC::SlotVisitor&)+1044)
  #05  pc 00000000001fb9c4  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::SlotVisitor::drain(WTF::MonotonicTime)::$_3::operator()(JSC::MarkStackArray&) const+324)
  #06  pc 00000000001f8e90  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::SlotVisitor::drain(WTF::MonotonicTime)+132)
  #07  pc 00000000001f96bc  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, WTF::MonotonicTime)+580)
  #08  pc 00000000001e41a0  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::SharedTaskFunctor<void (), JSC::Heap::runBeginPhase(JSC::GCConductor)::$_17>::run()+580)
  #09  pc 00000000006171ec  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::ParallelHelperClient::runTask(WTF::RefPtr<WTF::SharedTask<void ()>, WTF::DumbPtrTraits<WTF::DumbPtrTraits>> const&)+40)
  #10  pc 0000000000617950  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::ParallelHelperPool::Thread::work()+16)
  #11  pc 000000000060de7c  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()+376)
  #12  pc 000000000061b084  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*)+212)
  #13  pc 0000000000646dc8  /data/data/com.zinspector3/lib-0/libjsc.so (offset 0xbf000) (WTF::wtfThreadEntryPoint(void*)+4)
  #14  pc 0000000000083840  /system/lib64/libc.so (__pthread_start(void*)+36)
  #15  pc 0000000000023d80  /system/lib64/libc.so (__start_thread+68)

Environment info

React native info output:

System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
    Memory: 53.99 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.12.0 => 16.12.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    create-react-native-app: 2.0.2
    create-react-native-module: 0.10.2
    react-native-cli: 2.0.1

Using the following build.gradle:

ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
        supportLibVersion = "28.+"

        googlePlayServicesVisionVersion = "17.+"
        googlePlayServicesVersion = "17.+"
        firebaseVersion = "17.+"
    }

Library version: RN 0.61.5 default (“jsc-android”: “^245459.0.0”)

Steps To Reproduce

Unknown. Regular use, not related to any specific use case.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 8
  • Comments: 29

Most upvoted comments

As we are experiencing the same issue and this is the most common error we are getting in our app, I am going to post our info so far, hopefully, it’ll help.

RAW exception:

SIGSEGV Segmentation violation (invalid memory reference) 
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1013576 0x72b9a81748
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1327084 0x72b9acdfec
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1241260 0x72b9ab90ac
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1283208 0x72b9ac3488
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1282064 0x72b9ac3010
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:2079176 0x72b9b859c8
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:2068116 0x72b9b82e94
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:2070208 0x72b9b836c0
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:1982884 0x72b9b6e1a4
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:6386160 0x72b9fa11f0
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:6388052 0x72b9fa1954
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:6348416 0x72b9f97e80
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:6402184 0x72b9fa5088
    /data/app/com.ovo.energy-KYjjbWqYwwKpCyT0GtYhew==/lib/arm64/libjsc.so:6581708 0x72b9fd0dcc
    /apex/com.android.runtime/lib64/bionic/libc.so:844180 0x73bd79d194
    /apex/com.android.runtime/lib64/bionic/libc.so:461740 0x73bd73fbac
    unknown 0x0

Additional info: Android versions:

OS versions OS Events % Events
10 android 123 43.2%
9 android 101 35.4%
8.0.0 android 33 11.6%
7.0 android 20 7%
8.1.0 android 5 1.8%
6.0.1 android 2 0.7%
7.1.1 android 1 0.4%

Brands (only above 1%)

Manufacturers Events % Events
Samsung 162 56.8%
HUAWEI 55 19.3%
Google 17 6%
OnePlus 16 5.6%
Sony 16 5.6%
Motorola 5 1.8%
Xiaomi 4 1.4%
LGE 3 1.1%

Models (only above 1%)

Models Manufacturer Events % Events
SM-G960F samsung 22 7.7%
SM-G973F samsung 18 6.3%
SM-G950F samsung 16 5.6%
SM-G930F samsung 11 3.9%
SM-G975F samsung 11 3.9%
SM-G935F samsung 10 3.5%
SM-G955F samsung 8 2.8%
SM-G965F samsung 8 2.8%
SM-A405FN samsung 7 2.5%
SM-A705FN samsung 7 2.5%
CLT-L09 HUAWEI 6 2.1%
MAR-LX1A HUAWEI 5 1.8%
SM-G970F samsung 5 1.8%
ONEPLUS A5010 OnePlus 4 1.4%
Pixel 2 Google 4 1.4%
Pixel 3a XL Google 4 1.4%
SM-A505FN samsung 4 1.4%
SM-G920F samsung 4 1.4%
VOG-L29 HUAWEI 4 1.4%
H3113 Sony 3 1.1%
HRY-LX1 HUAWEI 3 1.1%
LG-H850 LGE 3 1.1%
LYA-L09 HUAWEI 3 1.1%
ONEPLUS A6013 OnePlus 3 1.1%
POT-LX1 HUAWEI 3 1.1%
Pixel 2 XL Google 3 1.1%
Pixel 3 Google 3 1.1%
SM-A530F samsung 3 1.1%
SM-A750FN samsung 3 1.1%
SM-N960F samsung 3 1.1%
VOG-L09 HUAWEI 3 1.1%

We’re still testing https://github.com/Kudo/jsc-android-buildscripts/releases/tag/v250230.2.1 in our app. So far, we’ve had enough user sessions to show that it’s better than 245459.0.0 [in terms of crash numbers], with no crashes attributable to libjsc.

Good day! I have the same crash on react-native: 0.63.2, jsc-android: ^245459.0.0:

Crashed: Thread :  SIGSEGV  0x0000000000000010
#00 pc 0x73121a9748 libjsc.so 
#01 pc 0x73121f5fe8 libjsc.so 
#02 pc 0x7407046ba8 libc.so 

Any ideas how to solve it?

@neoassyrian I don’t think this project is being actively maintained anymore. It looks like Hermes is getting all the attention now.

You’ll need a yarn/npm version that’s new enough to support version aliases.

To expand on that, here’s how I installed @kudo-ci/jsc-android with yarn:

yarn add jsc-android@npm:@kudo-ci/jsc-android@250230.2.1

Confirmed by D/JavaScriptCore.Version: 250230.2.1 in logcat output.

Seeing this on SDK 28 too.

This seems to propose a viable fix:

https://bugs.webkit.org/show_bug.cgi?id=200983

This mentions the problem too:

https://bugs.webkit.org/show_bug.cgi?id=202150

I’m getting the exact same crashes and stacktraces on an arm64 build on Samsung SM-T830 but with API 28. Have you found anything else about this?

SIGSEGV Segmentation violation (invalid memory reference) 
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1013576 0x758f36e748
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1327084 0x758f3bafec
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1241260 0x758f3a60ac
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1283208 0x758f3b0488
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1282064 0x758f3b0010
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:2079176 0x758f4729c8
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:2068116 0x758f46fe94
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:2070208 0x758f4706c0
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:1982884 0x758f45b1a4
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:6386160 0x758f88e1f0
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:6388052 0x758f88e954
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:6348416 0x758f884e80
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:6402184 0x758f892088
    /data/app/com.package.dev-QxLIBvGN9PztEl6jdpvMzA==/lib/arm64/libjsc.so:6581708 0x758f8bddcc
    /system/lib64/libc.so:596460 0x7632dae9ec
    /system/lib64/libc.so:147380 0x7632d40fb4
    unknown 0x0