hermes: Crash in RN debug mode

Appreciate this report probably isn’t too helpful as I don’t have a repro I can share, but I wanted to ask what’s the best way to debug an issue like this?

Crash happens in debug mode, React Native 0.60.3, Samsung Galaxy S9+. Context-wise, I suspect this is happening when loading ‘db’ files for react-native-local-mongodb (~15 files, tens to hundreds of lines per file, each containing a stringified JSON object).

Aside from that, Hermes seems significantly slower than JSC in debug mode (maybe 3 or 4x slower, stuff like switching routes with react-navigation takes a few seconds), is that expected at this stage? Could that be to do with the amount of console.log-ing we do, I know that’s a big issue with JSC on slower devices.

In release mode, the app startup is significantly faster with Hermes and general performance seems similar to JSC so it would definitely be nice to make the switch in future 👌

07-12 14:10:30.354 19220 21012 F libc    : /Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed
07-12 14:10:30.357 19220 21012 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 21012 (mqt_js), pid 19220 ((APP).debug)
07-12 14:10:30.596 21060 21060 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-12 14:10:30.597 21060 21060 F DEBUG   : Build fingerprint: 'samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU5CSF2:user/release-keys'
07-12 14:10:30.597 21060 21060 F DEBUG   : Revision: '26'
07-12 14:10:30.597 21060 21060 F DEBUG   : ABI: 'arm64'
07-12 14:10:30.597 21060 21060 F DEBUG   : pid: 19220, tid: 21012, name: mqt_js  >>> (APP).debug <<<
07-12 14:10:30.597 21060 21060 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-12 14:10:30.597 21060 21060 F DEBUG   : Abort message: '/Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed'
07-12 14:10:30.597 21060 21060 F DEBUG   :     x0  0000000000000000  x1  0000000000005214  x2  0000000000000006  x3  0000000000000008
07-12 14:10:30.597 21060 21060 F DEBUG   :     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  0000000000000010
07-12 14:10:30.597 21060 21060 F DEBUG   :     x8  0000000000000083  x9  0000007238ff9890  x10 fffffff87ffffbdf  x11 0000000000000001
07-12 14:10:30.597 21060 21060 F DEBUG   :     x12 0000000000000008  x13 000000005d2886c6  x14 0014e1bd43837d80  x15 000043807fb06bb6
07-12 14:10:30.597 21060 21060 F DEBUG   :     x16 00000072390302b0  x17 0000007238f6f958  x18 0000000000000000  x19 0000000000004b14
07-12 14:10:30.597 21060 21060 F DEBUG   :     x20 0000000000005214  x21 0000000000000083  x22 000000718998e588  x23 000000716f942800
07-12 14:10:30.597 21060 21060 F DEBUG   :     x24 00000071899885e8  x25 0000000000000200  x26 00000071899885e8  x27 fffb800000000000
07-12 14:10:30.597 21060 21060 F DEBUG   :     x28 0000007189988628  x29 0000007189988400
07-12 14:10:30.597 21060 21060 F DEBUG   :     sp  00000071899883c0  lr  0000007238f62da0  pc  0000007238f62dcc
07-12 14:10:30.899 21060 21060 F DEBUG   : 
07-12 14:10:30.899 21060 21060 F DEBUG   : backtrace:
07-12 14:10:30.899 21060 21060 F DEBUG   :     #00 pc 0000000000021dcc  /system/lib64/libc.so (abort+124)
07-12 14:10:30.899 21060 21060 F DEBUG   :     #01 pc 0000000000022544  /system/lib64/libc.so (__assert2+52)
07-12 14:10:30.899 21060 21060 F DEBUG   :     #02 pc 00000000000a4bb8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #03 pc 00000000000a43c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #04 pc 00000000000a1524  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #05 pc 00000000000a10a8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #06 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #07 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #08 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #09 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #10 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #11 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #12 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #13 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #14 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #15 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #16 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #17 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #18 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #19 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #20 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #21 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #22 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #23 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.899 21060 21060 F DEBUG   :     #24 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #25 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #26 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #27 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #28 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #29 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #30 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #31 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #32 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #33 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #34 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #35 pc 000000000002b5c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #36 pc 00000000000291f0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (_ZNK8facebook3jsi8Function4callIJRKdNS0_5ValueEEEES5_RNS0_7RuntimeEDpOT_+120)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #37 pc 0000000000029030  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&)+164)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #38 pc 00000000000a7dc0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #39 pc 00000000000a8de0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #40 pc 000000000006b8bc  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:10:30.900 21060 21060 F DEBUG   :     #41 pc 000000000005ac74  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #42 pc 000000000005abf0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #43 pc 000000000056a9e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #44 pc 00000000000267e0  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Handler.handleCallback+64)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #45 pc 0000000000027dcc  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Handler.dispatchMessage+60)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #46 pc 000000000003f3d4  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage+52)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #47 pc 0000000000105d80  /dev/ashmem/dalvik-jit-code-cache_19220_19220 (deleted) (android.os.Looper.loop+1200)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #48 pc 0000000000561c4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #49 pc 00000000000cff60  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #50 pc 00000000002862f8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #51 pc 00000000002802b4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #52 pc 0000000000532154  /system/lib64/libart.so (MterpInvokeStatic+204)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #53 pc 0000000000554194  /system/lib64/libart.so (ExecuteMterpImpl+14612)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #54 pc 000000000033d836  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_19220_19220 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #55 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #56 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #57 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #58 pc 0000000000531bc8  /system/lib64/libart.so (MterpInvokeInterface+1392)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #59 pc 0000000000554214  /system/lib64/libart.so (ExecuteMterpImpl+14740)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #60 pc 00000000000ca90a  /system/framework/boot.vdex (java.lang.Thread.run+12)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #61 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #62 pc 0000000000521390  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #63 pc 000000000056aafc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #64 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:10:30.900 21060 21060 F DEBUG   :     #65 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #66 pc 0000000000467d60  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #67 pc 0000000000468e28  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #68 pc 00000000004946b0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #69 pc 0000000000084df8  /system/lib64/libc.so (__pthread_start(void*)+208)
07-12 14:10:30.901 21060 21060 F DEBUG   :     #70 pc 0000000000023ac4  /system/lib64/libc.so (__start_thread+68)
07-12 14:11:00.293 21179 21284 F libc    : /Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed
07-12 14:11:00.293 21179 21284 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 21284 (mqt_js), pid 21179 ((APP).debug)
07-12 14:11:00.498 21352 21352 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-12 14:11:00.498 21352 21352 F DEBUG   : Build fingerprint: 'samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU5CSF2:user/release-keys'
07-12 14:11:00.498 21352 21352 F DEBUG   : Revision: '26'
07-12 14:11:00.499 21352 21352 F DEBUG   : ABI: 'arm64'
07-12 14:11:00.499 21352 21352 F DEBUG   : pid: 21179, tid: 21284, name: mqt_js  >>> (APP).debug <<<
07-12 14:11:00.499 21352 21352 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-12 14:11:00.499 21352 21352 F DEBUG   : Abort message: '/Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed'
07-12 14:11:00.499 21352 21352 F DEBUG   :     x0  0000000000000000  x1  0000000000005324  x2  0000000000000006  x3  0000000000000008
07-12 14:11:00.499 21352 21352 F DEBUG   :     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  0000000000000010
07-12 14:11:00.499 21352 21352 F DEBUG   :     x8  0000000000000083  x9  0000007238ff9890  x10 fffffff87ffffbdf  x11 0000000000000001
07-12 14:11:00.499 21352 21352 F DEBUG   :     x12 0000000000000008  x13 000000005d2886e4  x14 00114e362e195000  x15 00002af6f2c46852
07-12 14:11:00.499 21352 21352 F DEBUG   :     x16 00000072390302b0  x17 0000007238f6f958  x18 0000000000000000  x19 00000000000052bb
07-12 14:11:00.499 21352 21352 F DEBUG   :     x20 0000000000005324  x21 0000000000000083  x22 0000007199217588  x23 00000071a009a800
07-12 14:11:00.499 21352 21352 F DEBUG   :     x24 0000007199210f18  x25 0000000000000200  x26 0000007199210f18  x27 fffb800000000000
07-12 14:11:00.499 21352 21352 F DEBUG   :     x28 0000007199210f58  x29 0000007199210d30
07-12 14:11:00.499 21352 21352 F DEBUG   :     sp  0000007199210cf0  lr  0000007238f62da0  pc  0000007238f62dcc
07-12 14:11:00.549 21352 21352 F DEBUG   : 
07-12 14:11:00.549 21352 21352 F DEBUG   : backtrace:
07-12 14:11:00.549 21352 21352 F DEBUG   :     #00 pc 0000000000021dcc  /system/lib64/libc.so (abort+124)
07-12 14:11:00.549 21352 21352 F DEBUG   :     #01 pc 0000000000022544  /system/lib64/libc.so (__assert2+52)
07-12 14:11:00.549 21352 21352 F DEBUG   :     #02 pc 00000000000a4bb8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #03 pc 00000000000a43c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #04 pc 00000000000a1524  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #05 pc 00000000000a10a8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #06 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #07 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #08 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #09 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #10 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #11 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #12 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #13 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #14 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #15 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #16 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #17 pc 00000000000c406c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #18 pc 000000000010be6c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #19 pc 00000000001220e8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #20 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #21 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #22 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #23 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #24 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #25 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.549 21352 21352 F DEBUG   :     #26 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #27 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #28 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #29 pc 000000000012203c  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #30 pc 0000000000128858  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #31 pc 000000000012d428  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #32 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #33 pc 000000000010b3d8  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #34 pc 0000000000032f88  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #35 pc 000000000002b5c0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+496)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #36 pc 00000000000291f0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (_ZNK8facebook3jsi8Function4callIJRKdNS0_5ValueEEEES5_RNS0_7RuntimeEDpOT_+120)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #37 pc 0000000000029030  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libhermes-executor-debug.so (facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&)+164)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #38 pc 00000000000a7dc0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #39 pc 00000000000a8de0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #40 pc 000000000006b8bc  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so
07-12 14:11:00.550 21352 21352 F DEBUG   :     #41 pc 000000000005ac74  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #42 pc 000000000005abf0  /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #43 pc 000000000056a9e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #44 pc 000000000001f210  /dev/ashmem/dalvik-jit-code-cache_21179_21179 (deleted) (android.os.Handler.handleCallback+64)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #45 pc 000000000000f61c  /dev/ashmem/dalvik-jit-code-cache_21179_21179 (deleted) (android.os.Handler.dispatchMessage+60)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #46 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #47 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #48 pc 00000000002862f8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #49 pc 00000000002802b4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #50 pc 00000000005312e0  /system/lib64/libart.so (MterpInvokeSuper+1408)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #51 pc 0000000000554094  /system/lib64/libart.so (ExecuteMterpImpl+14356)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #52 pc 000000000033d6a8  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_21179_21179 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #53 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #54 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #55 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #56 pc 0000000000530c50  /system/lib64/libart.so (MterpInvokeVirtual+584)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #57 pc 0000000000554014  /system/lib64/libart.so (ExecuteMterpImpl+14228)
07-12 14:11:00.550 21352 21352 F DEBUG   :     #58 pc 0000000000c5f2f6  /system/framework/boot-framework.vdex (android.os.Looper.loop+406)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #59 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #60 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #61 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #62 pc 0000000000532154  /system/lib64/libart.so (MterpInvokeStatic+204)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #63 pc 0000000000554194  /system/lib64/libart.so (ExecuteMterpImpl+14612)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #64 pc 000000000033d836  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/(APP).debug-_iu49LarkMpr76n1YzfR7w==/base.apk_21179_21179 (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #65 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #66 pc 000000000025f930  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #67 pc 0000000000280298  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #68 pc 0000000000531bc8  /system/lib64/libart.so (MterpInvokeInterface+1392)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #69 pc 0000000000554214  /system/lib64/libart.so (ExecuteMterpImpl+14740)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #70 pc 00000000000ca90a  /system/framework/boot.vdex (java.lang.Thread.run+12)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #71 pc 0000000000259db0  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3150795007+496)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #72 pc 0000000000521390  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #73 pc 000000000056aafc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #74 pc 0000000000561988  /system/lib64/libart.so (art_quick_invoke_stub+584)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #75 pc 00000000000cff40  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #76 pc 0000000000467d60  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #77 pc 0000000000468e28  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #78 pc 00000000004946b0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #79 pc 0000000000084df8  /system/lib64/libc.so (__pthread_start(void*)+208)
07-12 14:11:00.551 21352 21352 F DEBUG   :     #80 pc 0000000000023ac4  /system/lib64/libc.so (__start_thread+68)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 22 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@HeribertoAlves that’s actually a different crash (due to a non-ASCII character in a string that says it should be ASCII). Can you file a separate issue for that and include that stack trace?

#47 done!

This crash (“Too many handles allocated in GCScope”) is an assert we have enabled in the native code of Hermes, and its purpose is to find problems where Handles are allocated in loops:

for (int i = 0; i < something; i++) {
  runtime->makeHandle(HermesValue::encodeNumberValue(i));
}

Native code is supposed to either make a new GCScope, or use a “marker” and flush it every loop iteration, like so:

for (int i = 0; i < something; i++) {
  GCScopeMarkerRAII marker{gcScope};
  runtime->makeHandle(HermesValue::encodeNumberValue(i));
}

In order to fix this, we need to know what the native stack looks like. It should be possible to attach a native debugger (gdb or lldb) to Hermes running on Android and get the backtrace. It is usually a trivial fix for these types of crashes, once we know what native function it is happening in.