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

AwesomeProject is crashing with Hermes #2

Closed
prmis opened this issue Feb 21, 2019 · 8 comments
Closed

AwesomeProject is crashing with Hermes #2

prmis opened this issue Feb 21, 2019 · 8 comments

Comments

@prmis
Copy link

prmis commented Feb 21, 2019

Normal Awesomeproject is working fine without Hermes
Platform Android
Device Pixel XL
NDK:- 16B
SDK 28.2

02-21 16:23:22.415 27682 27722 D SoLoader: About to load: libreactnativejni.so
02-21 16:23:22.416 27682 27722 D SoLoader: libreactnativejni.so not found on /data/data/com.awesomeproject/lib-main
02-21 16:23:22.416 27682 27722 D SoLoader: libreactnativejni.so found on /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64
02-21 16:23:22.416 27682 27722 D SoLoader: Not resolving dependencies for libreactnativejni.so
02-21 16:23:22.421 27682 27722 D SoLoader: Loaded: libreactnativejni.so
02-21 16:23:22.422 27682 27722 D ReactNative: Initializing React Xplat Bridge.
02-21 16:23:22.429 27682 27722 D ReactNative: Initializing React Xplat Bridge before initializeBridge
02-21 16:23:22.521 27682 27725 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5265766974616e in tid 27725 (mqt_js), pid 27682 (.awesomeproject)
02-21 16:23:22.620 27729 27729 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-21 16:23:22.621 828 828 I /system/bin/tombstoned: received crash request for pid 27725
02-21 16:23:22.622 27729 27729 I crash_dump64: performing dump of process 27682 (target tid = 27725)
02-21 16:23:22.635 27729 27729 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-21 16:23:22.636 27729 27729 F DEBUG : Build fingerprint: 'google/marlin/marlin:9/PQ2A.190205.003/5180536:user/release-keys'
02-21 16:23:22.636 27729 27729 F DEBUG : Revision: '0'
02-21 16:23:22.636 27729 27729 F DEBUG : ABI: 'arm64'
02-21 16:23:22.636 27729 27729 F DEBUG : pid: 27682, tid: 27725, name: mqt_js >>> com.awesomeproject <<<
02-21 16:23:22.636 27729 27729 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5265766974616e
02-21 16:23:22.636 27729 27729 F DEBUG : x0 655265766974616e x1 000000704020a070 x2 000000704020a0a0 x3 0000000000000000
02-21 16:23:22.636 27729 27729 F DEBUG : x4 000000703ebfabc8 x5 000000703ebfade8 x6 000000703ebfad48 x7 000000703ebfad48
02-21 16:23:22.636 27729 27729 F DEBUG : x8 655265766974616e x9 f2a6936fa0f32568 x10 000000704020a0a0 x11 000000704001a3a5
02-21 16:23:22.636 27729 27729 F DEBUG : x12 000000704001b7d1 x13 000000704001b855 x14 0000000000000000 x15 000000703ebfabc8
02-21 16:23:22.636 27729 27729 F DEBUG : x16 000000704021d6d0 x17 0000007040014f88 x18 000000703ebfa6ed x19 0000007050e3a2a0
02-21 16:23:22.636 27729 27729 F DEBUG : x20 000000703ebfd588 x21 000000703ebfaef0 x22 000000704001ef22 x23 000000703ebfd588
02-21 16:23:22.636 27729 27729 F DEBUG : x24 000000703ebfb4b8 x25 000000703ebfd588 x26 000000703ebfd588 x27 0000000000000001
02-21 16:23:22.636 27729 27729 F DEBUG : x28 000000703ebfb6f0 x29 000000703ebfab70
02-21 16:23:22.636 27729 27729 F DEBUG : sp 000000703ebfab00 lr 000000703fb17eb0 pc 0000007040014fa8
02-21 16:23:22.668 27729 27729 F DEBUG :
02-21 16:23:22.668 27729 27729 F DEBUG : backtrace:
02-21 16:23:22.668 27729 27729 F DEBUG : #00 pc 000000000060ffa8 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so (__dynamic_cast+32)
02-21 16:23:22.668 27729 27729 F DEBUG : #01 pc 0000000000112eac /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #2 pc 00000000001040b4 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #3 pc 0000000000026134 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes-executor.so (void facebook::jsi::Object::setPropertyfacebook::jsi::Function(facebook::jsi::Runtime&, char const*, facebook::jsi::Function&&)+84)
02-21 16:23:22.668 27729 27729 F DEBUG : #4 pc 00000000000fd454 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so
02-21 16:23:22.668 27729 27729 F DEBUG : #5 pc 00000000000fce40 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes.so (facebook::hermes::makeHermesRuntime(hermes::vm::RuntimeConfig const&, bool)+284)
02-21 16:23:22.668 27729 27729 F DEBUG : #06 pc 000000000001c2d0 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libhermes-executor.so (facebook::react::HermesExecutorFactory::createJSExecutor(std::__ndk1::shared_ptrfacebook::react::ExecutorDelegate, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread)+68)
02-21 16:23:22.668 27729 27729 F DEBUG : #07 pc 00000000000a3bdc /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__ndk1::shared_ptrfacebook::react::ModuleRegistry, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread, std::__ndk1::shared_ptrfacebook::react::InstanceCallback)+252)
02-21 16:23:22.668 27729 27729 F DEBUG : #08 pc 000000000009b8f8 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #9 pc 0000000000065b38 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #10 pc 0000000000063a9c /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so
02-21 16:23:22.668 27729 27729 F DEBUG : #11 pc 0000000000059198 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
02-21 16:23:22.668 27729 27729 F DEBUG : #12 pc 0000000000059114 /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
02-21 16:23:22.668 27729 27729 F DEBUG : #13 pc 00000000005693e0 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
02-21 16:23:22.669 27729 27729 F DEBUG : #14 pc 0000000000560388 /system/lib64/libart.so (art_quick_invoke_stub+584)
02-21 16:23:22.669 27729 27729 F DEBUG : #15 pc 00000000000cf6b8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #16 pc 0000000000282afc /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
02-21 16:23:22.669 27729 27729 F DEBUG : #17 pc 000000000027cbac /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
02-21 16:23:22.669 27729 27729 F DEBUG : #18 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-21 16:23:22.669 27729 27729 F DEBUG : #19 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-21 16:23:22.669 27729 27729 F DEBUG : #20 pc 0000000000c47dda /system/framework/boot-framework.vdex (android.os.Handler.handleCallback+4)
02-21 16:23:22.669 27729 27729 F DEBUG : #21 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #22 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #23 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #24 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #25 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-21 16:23:22.669 27729 27729 F DEBUG : #26 pc 0000000000ae5538 /system/framework/boot-framework.vdex (android.os.Handler.dispatchMessage+8)
02-21 16:23:22.669 27729 27729 F DEBUG : #27 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #28 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #29 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #30 pc 000000000053017c /system/lib64/libart.so (MterpInvokeSuper+1396)
02-21 16:23:22.669 27729 27729 F DEBUG : #31 pc 0000000000552a14 /system/lib64/libart.so (ExecuteMterpImpl+14356)
02-21 16:23:22.669 27729 27729 F DEBUG : #32 pc 00000000001b9320 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
02-21 16:23:22.669 27729 27729 F DEBUG : #33 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #34 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #35 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #36 pc 000000000052fafc /system/lib64/libart.so (MterpInvokeVirtual+576)
02-21 16:23:22.669 27729 27729 F DEBUG : #37 pc 0000000000552994 /system/lib64/libart.so (ExecuteMterpImpl+14228)
02-21 16:23:22.669 27729 27729 F DEBUG : #38 pc 0000000000aec648 /system/framework/boot-framework.vdex (android.os.Looper.loop+404)
02-21 16:23:22.669 27729 27729 F DEBUG : #39 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.669 27729 27729 F DEBUG : #40 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.669 27729 27729 F DEBUG : #41 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.669 27729 27729 F DEBUG : #42 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-21 16:23:22.669 27729 27729 F DEBUG : #43 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-21 16:23:22.669 27729 27729 F DEBUG : #44 pc 00000000001b94ae /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-eEXjC5XLlBXk7aqLoOv8Qw==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
02-21 16:23:22.669 27729 27729 F DEBUG : #45 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.670 27729 27729 F DEBUG : #46 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-21 16:23:22.670 27729 27729 F DEBUG : #47 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-21 16:23:22.670 27729 27729 F DEBUG : #48 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-21 16:23:22.670 27729 27729 F DEBUG : #49 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-21 16:23:22.670 27729 27729 F DEBUG : #50 pc 00000000000ca806 /system/framework/boot.vdex (java.lang.Thread.run+12)
02-21 16:23:22.670 27729 27729 F DEBUG : #51 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-21 16:23:22.670 27729 27729 F DEBUG : #52 pc 00000000005202c4 /system/lib64/libart.so (artQuickToInterpreterBridge+944)
02-21 16:23:22.670 27729 27729 F DEBUG : #53 pc 00000000005694fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
02-21 16:23:22.670 27729 27729 F DEBUG : #54 pc 0000000000560388 /system/lib64/libart.so (art_quick_invoke_stub+584)
02-21 16:23:22.670 27729 27729 F DEBUG : #55 pc 00000000000cf6b8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
02-21 16:23:22.670 27729 27729 F DEBUG : #56 pc 00000000004661e4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
02-21 16:23:22.670 27729 27729 F DEBUG : #57 pc 00000000004672e8 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
02-21 16:23:22.670 27729 27729 F DEBUG : #58 pc 00000000004926a0 /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1116)
02-21 16:23:22.670 27729 27729 F DEBUG : #59 pc 0000000000084840 /system/lib64/libc.so (__pthread_start(void*)+36)
02-21 16:23:22.670 27729 27729 F DEBUG : #60 pc 0000000000023574 /system/lib64/libc.so (__start_thread+68)
02-21 16:23:23.349 828 828 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_02
02-21 16:23:23.362 920 27732 W ActivityManager: Force finishing activity com.awesomeproject/.MainActivity
02-21 16:23:23.364 920 981 I BootReceiver: Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
02-21 16:23:23.373 920 27732 W ActivityManager: Exception thrown during pause
02-21 16:23:23.373 920 27732 W ActivityManager: android.os.DeadObjectException
02-21 16:23:23.373 920 27732 W ActivityManager: at android.os.BinderProxy.transactNative(Native Method)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.os.BinderProxy.transact(Binder.java:1127)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:1777)
02-21 16:23:23.373 920 27732 W ActivityManager: at android.app.servertransaction.ClientTransaction.schedule(ClientTransaction.java:129)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:47)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:69)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1460)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3745)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3687)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStack.finishTopCrashedActivityLocked(ActivityStack.java:3570)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityStackSupervisor.finishTopCrashedActivitiesLocked(ActivityStackSupervisor.java:2259)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.handleAppCrashLocked(AppErrors.java:748)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.makeAppCrashingLocked(AppErrors.java:580)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:447)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.AppErrors.crashApplication(AppErrors.java:392)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:15480)
02-21 16:23:23.373 920 27732 W ActivityManager: at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:85)
02-21 16:23:23.374 920 1408 W InputDispatcher: channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
02-21 16:23:23.374 920 1408 E InputDispatcher: channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-21 16:23:23.374 920 5547 I WindowManager: WIN DEATH: Window{dd5ea3e u0 com.awesomeproject/com.awesomeproject.MainActivity}
02-21 16:23:23.374 920 5547 W InputDispatcher: Attempted to unregister already unregistered input channel 'dd5ea3e com.awesomeproject/com.awesomeproject.MainActivity (server)'
02-21 16:23:23.375 664 664 I Zygote : Process 27682 exited due to signal (11)
02-21 16:23:23.384 694 694 E lowmemorykiller: Error opening /proc/27682/oom_score_adj; errno=2
02-21 16:23:23.399 920 1680 I ActivityManager: Process com.awesomeproject (pid 27682) has died: vis +99TOP
02-21 16:23:23.400 920 958 W libprocessgroup: kill(-27682, 9) failed: No such process
02-21 16:23:23.412 494 854 W SurfaceFlinger: Attempting to set client state on removed layer: com.awesomeproject/com.awesomeproject.MainActivity#0
02-21 16:23:23.412 494 854 W SurfaceFlinger: Attempting to destroy on removed layer: com.awesomeproject/com.awesomeproject.MainActivity#0
02-21 16:23:23.414 494 854 W SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{79c358d token=Token{b263624 ActivityRecord{e420eb7 u0 com.awesomeproject/.MainActivity t412}}}#0
02-21 16:23:23.428 920 989 W ActivityManager: setHasOverlayUi called on unknown pid: 27682
02-21 16:23:23.429 920 955 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
02-21 16:23:23.429 920 955 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
02-21 16:23:23.437 494 854 D SurfaceFlinger: duplicate layer name: changing com.google.android.apps.nexuslauncher/c

@prmis prmis changed the title AwesomeProject crashing with Hermes ninja check-hermes Feb 21, 2019
@prmis prmis changed the title ninja check-hermes AwesomeProject is crashing with Hermes Feb 21, 2019
@prmis
Copy link
Author

prmis commented Feb 21, 2019

ninja check-hermes gives below error
******************** TEST 'Hermes :: hermes/date-locale.js' FAILED ********************
Script:

TZ=EST+5 LC_ALL=en_US _HERMES_TEST_LOCALE=en_US /Users/pradeepmishra/workspace/build/bin/hermes -O -target=HBC /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js | /Users/pradeepmishra/workspace/build/../llvm_build/bin/FileCheck --match-full-lines -check-prefix US /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js
TZ=EST+5 LC_ALL=tr_TR _HERMES_TEST_LOCALE=tr_TR /Users/pradeepmishra/workspace/build/bin/hermes -O -target=HBC /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js | /Users/pradeepmishra/workspace/build/../llvm_build/bin/FileCheck --match-full-lines -check-prefix TR /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js
TZ=EST+5 /Users/pradeepmishra/workspace/build/bin/hermes -O -target=HBC /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js | /Users/pradeepmishra/workspace/build/../llvm_build/bin/FileCheck --match-full-lines -check-prefix NO /Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js

Exit Code: 1

Command Output (stderr):

/Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js:18:13: error: expected string not found in input
// NO-NEXT: Dec 31, 1969{{.+}}7:00:00 PM
^
:2:1: note: scanning from here
31-Dec-1969 at 7:00:00 PM
^
/Users/pradeepmishra/workspace/hermes/test/hermes/date-locale.js:27:13: error: expected string not found in input
// NO-NEXT: Dec 31, 1969
^
:4:1: note: scanning from here
31-Dec-1969
^

--


Testing Time: 57.73s


Failing Tests (1):
Hermes :: hermes/date-locale.js

Expected Passes : 838
Unsupported Tests : 12
Unexpected Failures: 1
FAILED: CMakeFiles/check-hermes
cd /Users/pradeepmishra/workspace/build && /Users/pradeepmishra/workspace/build/../llvm/utils/lit/lit.py -sv --param test_exec_root=/Users/pradeepmishra/workspace/build/test --param unittests_dir=/Users/pradeepmishra/workspace/build/unittests --param debugger_enabled=1 --param use_flowparser=OFF --param jit_enabled=OFF --param jit_disassembler_enabled=OFF --param hbc_deltaprep=/Users/pradeepmishra/workspace/build/bin/hbc-deltaprep --param FileCheck=/Users/pradeepmishra/workspace/build/../llvm_build/bin/FileCheck --param hermes=/Users/pradeepmishra/workspace/build/bin/hermes --param hermesc=/Users/pradeepmishra/workspace/build/bin/hermesc --param hdb=/Users/pradeepmishra/workspace/build/bin/hdb --param repl=/Users/pradeepmishra/workspace/build/bin/hermes-repl --param hbc-deltaprep=/Users/pradeepmishra/workspace/build/bin/hbc-deltaprep --param build_mode=dbg /Users/pradeepmishra/workspace/hermes/test /Users/pradeepmishra/workspace/hermes/unittests
ninja: build stopped: subcommand failed.

@willholen
Copy link
Contributor

This was due to a linking incompatibility in the JSI api between a previous version of react-native and the latest version of hermes. 0a3feb7 accounts for it by backporting the required changes in react-native.

@prmis
Copy link
Author

prmis commented Feb 25, 2019

Normal Awesomeproject is working fine without Hermes
Platform Android
Device Pixel XL
NDK:- 16B
SDK 28.2
NDK:16b
I verified with master as well as 0a3feb7
On branch master
Your branch is up to date with 'origin/master'.

2-25 16:28:05.583 21156 21187 D ReactNative: Initializing React Xplat Bridge.
02-25 16:28:05.588 21156 21187 D ReactNative: Initializing React Xplat Bridge before initializeBridge
--------- beginning of crash
02-25 16:28:05.592 21156 21194 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x73656d72654812 in tid 21194 (mqt_js), pid 21156 (.awesomeproject)
02-25 16:28:05.638 21198 21198 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-25 16:28:05.638 797 797 I /system/bin/tombstoned: received crash request for pid 21194
02-25 16:28:05.639 21198 21198 I crash_dump64: performing dump of process 21156 (target tid = 21194)
02-25 16:28:05.646 21198 21198 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-25 16:28:05.647 21198 21198 F DEBUG : Build fingerprint: 'google/marlin/marlin:9/PQ2A.190205.003/5180536:user/release-keys'
02-25 16:28:05.647 21198 21198 F DEBUG : Revision: '0'
02-25 16:28:05.647 21198 21198 F DEBUG : ABI: 'arm64'
02-25 16:28:05.647 21198 21198 F DEBUG : pid: 21156, tid: 21194, name: mqt_js >>> com.awesomeproject <<<
02-25 16:28:05.647 21198 21198 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x73656d72654812
02-25 16:28:05.647 21198 21198 F DEBUG : x0 5273656d72654802 x1 5273656d7265481a x2 0000007b6cdf91b8 x3 0000000000000001
02-25 16:28:05.647 21198 21198 F DEBUG : x4 0000007b6fbad780 x5 0000000000000000 x6 4f48514252405540 x7 7f7f7f7f7f7f7f7f
02-25 16:28:05.647 21198 21198 F DEBUG : x8 0000007b6cdf91b8 x9 0000007b7ee6fcc0 x10 0000000000000000 x11 0000000000000000
02-25 16:28:05.647 21198 21198 F DEBUG : x12 000000000000008b x13 0000000000000000 x14 0000000000000010 x15 0000000000000000
02-25 16:28:05.647 21198 21198 F DEBUG : x16 0000007b6e030db0 x17 0000007c05e60ff0 x18 000000000000001a x19 0000007b6cdf91b8
02-25 16:28:05.647 21198 21198 F DEBUG : x20 0000007b6cdf9538 x21 0000007b7ee6fc00 x22 0000007b7ee6fc00 x23 0000007b6cdf94a8
02-25 16:28:05.647 21198 21198 F DEBUG : x24 0000007b6cdf94b8 x25 0000007b6cdfb588 x26 0000007b6cdfb588 x27 0000000000000001
02-25 16:28:05.647 21198 21198 F DEBUG : x28 0000007b6cdf96f0 x29 0000007b6cdf9010
02-25 16:28:05.647 21198 21198 F DEBUG : sp 0000007b6cdf9010 lr 0000007b6d94b188 pc 0000007b6ddacbf8
02-25 16:28:05.666 21198 21198 F DEBUG :
02-25 16:28:05.666 21198 21198 F DEBUG : backtrace:
02-25 16:28:05.666 21198 21198 F DEBUG : #00 pc 00000000005a3bf8 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #01 pc 0000000000142184 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #2 pc 0000000000142100 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #3 pc 00000000001420a0 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #4 pc 000000000013c468 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #5 pc 000000000013c118 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #06 pc 0000000000138a88 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so
02-25 16:28:05.666 21198 21198 F DEBUG : #07 pc 00000000001388d8 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes.so (facebook::hermes::makeHermesRuntime(hermes::vm::RuntimeConfig const&, bool)+52)
02-25 16:28:05.666 21198 21198 F DEBUG : #08 pc 000000000001cf30 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libhermes-executor.so (facebook::react::HermesExecutorFactory::createJSExecutor(std::__ndk1::shared_ptrfacebook::react::ExecutorDelegate, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread)+68)
02-25 16:28:05.666 21198 21198 F DEBUG : #9 pc 00000000000a3bdc /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so (facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__ndk1::shared_ptrfacebook::react::ModuleRegistry, std::__ndk1::shared_ptrfacebook::react::MessageQueueThread, std::__ndk1::shared_ptrfacebook::react::InstanceCallback)+252)
02-25 16:28:05.666 21198 21198 F DEBUG : #10 pc 000000000009b8f8 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so
02-25 16:28:05.666 21198 21198 F DEBUG : #11 pc 0000000000065b38 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so
02-25 16:28:05.666 21198 21198 F DEBUG : #12 pc 0000000000063a9c /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so
02-25 16:28:05.666 21198 21198 F DEBUG : #13 pc 0000000000059198 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
02-25 16:28:05.666 21198 21198 F DEBUG : #14 pc 0000000000059114 /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
02-25 16:28:05.666 21198 21198 F DEBUG : #15 pc 00000000005693e0 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
02-25 16:28:05.666 21198 21198 F DEBUG : #16 pc 0000000000560388 /system/lib64/libart.so (art_quick_invoke_stub+584)
02-25 16:28:05.666 21198 21198 F DEBUG : #17 pc 00000000000cf6b8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
02-25 16:28:05.666 21198 21198 F DEBUG : #18 pc 0000000000282afc /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
02-25 16:28:05.666 21198 21198 F DEBUG : #19 pc 000000000027cbac /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+960)
02-25 16:28:05.666 21198 21198 F DEBUG : #20 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-25 16:28:05.666 21198 21198 F DEBUG : #21 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-25 16:28:05.666 21198 21198 F DEBUG : #22 pc 0000000000c47dda /system/framework/boot-framework.vdex (android.os.Handler.handleCallback+4)
02-25 16:28:05.666 21198 21198 F DEBUG : #23 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.666 21198 21198 F DEBUG : #24 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-25 16:28:05.666 21198 21198 F DEBUG : #25 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-25 16:28:05.666 21198 21198 F DEBUG : #26 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-25 16:28:05.666 21198 21198 F DEBUG : #27 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-25 16:28:05.666 21198 21198 F DEBUG : #28 pc 0000000000ae5538 /system/framework/boot-framework.vdex (android.os.Handler.dispatchMessage+8)
02-25 16:28:05.666 21198 21198 F DEBUG : #29 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.666 21198 21198 F DEBUG : #30 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-25 16:28:05.666 21198 21198 F DEBUG : #31 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-25 16:28:05.667 21198 21198 F DEBUG : #32 pc 000000000053017c /system/lib64/libart.so (MterpInvokeSuper+1396)
02-25 16:28:05.667 21198 21198 F DEBUG : #33 pc 0000000000552a14 /system/lib64/libart.so (ExecuteMterpImpl+14356)
02-25 16:28:05.667 21198 21198 F DEBUG : #34 pc 00000000001b9320 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
02-25 16:28:05.667 21198 21198 F DEBUG : #35 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.667 21198 21198 F DEBUG : #36 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-25 16:28:05.667 21198 21198 F DEBUG : #37 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-25 16:28:05.667 21198 21198 F DEBUG : #38 pc 000000000052fafc /system/lib64/libart.so (MterpInvokeVirtual+576)
02-25 16:28:05.667 21198 21198 F DEBUG : #39 pc 0000000000552994 /system/lib64/libart.so (ExecuteMterpImpl+14228)
02-25 16:28:05.667 21198 21198 F DEBUG : #40 pc 0000000000aec648 /system/framework/boot-framework.vdex (android.os.Looper.loop+404)
02-25 16:28:05.667 21198 21198 F DEBUG : #41 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.667 21198 21198 F DEBUG : #42 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-25 16:28:05.667 21198 21198 F DEBUG : #43 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-25 16:28:05.667 21198 21198 F DEBUG : #44 pc 0000000000530fc4 /system/lib64/libart.so (MterpInvokeStatic+200)
02-25 16:28:05.667 21198 21198 F DEBUG : #45 pc 0000000000552b14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
02-25 16:28:05.667 21198 21198 F DEBUG : #46 pc 00000000001b94ae /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.awesomeproject-wY0QYvB8Ufu08BIUfGTOJg==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
02-25 16:28:05.667 21198 21198 F DEBUG : #47 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.667 21198 21198 F DEBUG : #48 pc 000000000025c8bc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
02-25 16:28:05.667 21198 21198 F DEBUG : #49 pc 000000000027cb90 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+932)
02-25 16:28:05.667 21198 21198 F DEBUG : #50 pc 0000000000530a50 /system/lib64/libart.so (MterpInvokeInterface+1376)
02-25 16:28:05.667 21198 21198 F DEBUG : #51 pc 0000000000552b94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
02-25 16:28:05.667 21198 21198 F DEBUG : #52 pc 00000000000ca806 /system/framework/boot.vdex (java.lang.Thread.run+12)
02-25 16:28:05.667 21198 21198 F DEBUG : #53 pc 0000000000256d0c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.3628751809+488)
02-25 16:28:05.667 21198 21198 F DEBUG : #54 pc 00000000005202c4 /system/lib64/libart.so (artQuickToInterpreterBridge+944)
02-25 16:28:05.667 21198 21198 F DEBUG : #55 pc 00000000005694fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)

@willholen willholen reopened this Feb 25, 2019
@willholen
Copy link
Contributor

@prmis Can you let me know how to reproduce this? This is what I tried:

  1. Created a new, clean directory and entered it

  2. export HERMES_WS_DIR="$PWD"

  3. Cloned and updated Hermes to revision 0a3feb7

  4. Followed the rest of the steps from the README:

    (set -e; hermes/utils/build_llvm.sh; hermes/utils/crosscompile_llvm.sh; ( cd hermes/android && gradle build ); react-native init AwesomeProject; ( cd AwesomeProject && "$HERMES_WS_DIR/hermes/first-party/setup-rn-app.sh" ); )

  5. Started the RN server with react-native start

  6. Connected a Pixel XL and authorize it for USB debugging

  7. Ran react-native run-android

  8. Waited for ~15 seconds

The Pixel XL then correctly showed the React Native app, and I verified that it was running Hermes.

This was with react-native-cli 2.0.1 and android-ndk-r15c

@prmis
Copy link
Author

prmis commented Feb 26, 2019

Thanks for quick response.

  1. In case, I use Hermes master (6be25c7) with NDK19 then it is working fine. I am able to run awesome project with Hermes.

I will update my detail experiment by tomorrow.

@prmis
Copy link
Author

prmis commented Feb 26, 2019

Experiment 2.
Take fresh Hermes code and checkout master
export NDK_HOME=/usr/local/android_ndk/android-ndk-r15c
export ANDROID_NDK=/usr/local/android_ndk/android-ndk-r15c

I am facing compilation error on stage 4. (cd hermes/android && gradle build ). In crosscompile_llvm.sh file, CMAKE_TOOLCHAIN_FILE path set to "$ANDROID_SDK/ndk-build/build/cmake/android.toolchain.cmake". As I understand, we need to use android.toolchain.cmake from ndk folder. $ANDROID_NDK version and $ANDROID_SDK/ndk-build are different. I updated the crosscompile_llvm.sh file CMAKE_TOOLCHAIN_FILE path from $ANDROID_SDK/ndk-build to ANDOID_NDK and follow rest of the steps. I am able to compile the code.

crosscompile_llvm.sh
Original
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_SDK/ndk-build/build/cmake/android.toolchain.cmake"
Updated One
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake"

Please let me know in case i misunderstood.

@prmis
Copy link
Author

prmis commented Mar 1, 2019

Thanks for fixing the above issue.
In case I run crosscompile_llvm.sh file from the latest master, I saw the below error.
b2698d4 (HEAD -> master, origin/master, origin/HEAD) HEAD@{0}

Pradeeps-Pro:workspace pradeepmishra$ hermes/utils/crosscompile_llvm.sh
error: patch failed: CMakeLists.txt:784
error: CMakeLists.txt: patch does not apply
error: patch failed: cmake/modules/HandleLLVMOptions.cmake:236
error: cmake/modules/HandleLLVMOptions.cmake: patch does not apply
error: patch failed: tools/llvm-config/CMakeLists.txt:62
error: tools/llvm-config/CMakeLists.txt: patch does not apply
Pradeeps-Pro:workspace pradeepmishra$ patch failed

@prmis
Copy link
Author

prmis commented Mar 6, 2019

RNTester and AwsomProject are working fine with @3711ceff7b.

@prmis prmis closed this as completed Mar 6, 2019
facebook-github-bot pushed a commit that referenced this issue Sep 4, 2019
Summary:
Pull Request resolved: facebookincubator/fbjni#2

Want these to be included in Open Source fbjni.

Reviewed By: passy

Differential Revision: D17139151

fbshipit-source-id: 18d549fa4cbcc6860e9804abe2b8acdeb405d082
mganandraj pushed a commit to mganandraj/hermes that referenced this issue Oct 15, 2019
Summary:
Pull Request resolved: facebookincubator/fbjni#2

Want these to be included in Open Source fbjni.

Reviewed By: passy

Differential Revision: D17139151

fbshipit-source-id: 18d549fa4cbcc6860e9804abe2b8acdeb405d082
facebook-github-bot pushed a commit that referenced this issue Apr 3, 2020
Summary:
With the `__cxa_throw` hook attached for gnustl, apps will crash if an object without a destructor is thrown:

```
try { throw 0; } catch(...) {}

// or

class SimpleException {};
try { throw SimpleException{}; } catch(...) {}
```

The issue is that the `__cxa_throw` abi has a destructor function pointer parameter, which may be null according to the documentation. In the gnustl region of the code, Lyra doesn't do a null check before invoking it at the following stack:

```
[???] 0X0 [unknown] + 0x0
+libfbjni.so  facebook::lyra::(anonymous namespace)::HijackedExceptionTypeInfo::destructor(void*) (./fbandroid/libraries/fbjni/cxx/lyra/cxa_throw.cpp:213)
libgnustl_shared.so 0X759F86716C [unknown] + 0x6116c
libgnustl_shared.so 0X759F8DD2E0 _Unwind_DeleteException + 0x18
```

I wrote a test which repros the issue, and without the fix it crashes  with a similar stack:

```
backtrace:
      #00 pc 00000000  <unknown>
      #01 pc 00022e01  /data/app/com.facebook.builds.fb4a-vhhkGO4NTAZmUTmfS5wpfw==/lib/arm/libfbjni.so (BuildId: 7a0f9db0801e4f451162c28a392cd35d4ba46b9a)
      #2 pc 0004fb2d  /data/app/com.facebook.lyra.tests-MJNqCBmU7StfOjPoAyfEgg==/lib/arm/libgnustl_shared.so!libgnustl_shared.so (offset 0x4f000) (BuildId: 059ab3ea3d764339fe3ceea2904f54637c89594e)
      #3 pc 0009b8e3  /data/app/com.facebook.lyra.tests-MJNqCBmU7StfOjPoAyfEgg==/lib/arm/libgnustl_shared.so!libgnustl_shared.so (offset 0x50000) (_Unwind_DeleteException+12) (BuildId: 059ab3ea3d764339fe3ceea2904f54637c89594e)
      #4 pc 0000aeb9  /data/app/com.facebook.lyra.tests-MJNqCBmU7StfOjPoAyfEgg==/lib/arm/liblyra-tests.so (testThatCxaThrowHookThrowsAndSetsTraceTrivialException(facebook::jni::alias_ref<_jclass*>)+220) (BuildId: 31cc0552d685f1ce9e896d1628656cd97096678d)
```

To fix, add a null check before invoking `mutable_info->orig_dest_`, which originates from the destructor parameter.

Reviewed By: smeenai

Differential Revision: D20841003

fbshipit-source-id: 907a13ebf994c5bad511b13ab9684efcbc2ce474
@mganandraj mganandraj mentioned this issue Sep 30, 2020
facebook-github-bot pushed a commit that referenced this issue Jan 16, 2024
Summary:
Adding a new class AsyncDebuggerAPI that wraps the existing
DebuggerAPI. This class extracts some core concepts from the existing
CDPHandler so that we have a class that's not tied to CDP.

The main things that this class enables are:
1) Exposes an interrupt API and guarantees those interrupt callbacks
will be called exactly once.
2) Turns the didPause interaction into an asynchronous one. Consumers
of this class will register DebuggerEventCallback but isn't expected to
decide on a next debugger::Command while handling that callback.
3) Adds an API for unpausing the JavaScript program after a
DebuggerEventCallback has been invoked. Together with #2, this allows
someone to implement a debugging solution like CDP that's asynchronous
in nature.

The reason to introduce this class is so that we can contain most of
the multithread complexity in one place. Rather than having every
function in CDPHandler having to think about multithreading, CDPHandler
can be simplified.

Reviewed By: mattbfb

Differential Revision: D51595285

fbshipit-source-id: f4bfaa9daf13339016e2ee0ac347272eb67e3c54
facebook-github-bot pushed a commit that referenced this issue Apr 25, 2024
Summary:
Original Author: dsc@meta.com
Original Git: 38593e4
Original Reviewed By: mattbfb
Original Revision: D51595285

Adding a new class AsyncDebuggerAPI that wraps the existing
DebuggerAPI. This class extracts some core concepts from the existing
CDPHandler so that we have a class that's not tied to CDP.

The main things that this class enables are:
1) Exposes an interrupt API and guarantees those interrupt callbacks
will be called exactly once.
2) Turns the didPause interaction into an asynchronous one. Consumers
of this class will register DebuggerEventCallback but isn't expected to
decide on a next debugger::Command while handling that callback.
3) Adds an API for unpausing the JavaScript program after a
DebuggerEventCallback has been invoked. Together with #2, this allows
someone to implement a debugging solution like CDP that's asynchronous
in nature.

The reason to introduce this class is so that we can contain most of
the multithread complexity in one place. Rather than having every
function in CDPHandler having to think about multithreading, CDPHandler
can be simplified.

Reviewed By: mattbfb

Differential Revision: D56482827

fbshipit-source-id: f51a77e36c5715df7541e3d13ac709b8a47052bb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants