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

Android React Native 64bit support #2366

Merged
merged 6 commits into from
May 21, 2019
Merged

Android React Native 64bit support #2366

merged 6 commits into from
May 21, 2019

Conversation

nhachicha
Copy link
Contributor

Tested on x86_64 emulator using
"react": "16.8.3", "react-native": "0.59.8"

@nhachicha nhachicha requested review from cmelchior and kneth May 9, 2019 17:25
@nhachicha nhachicha self-assigned this May 9, 2019
@realm-probot
Copy link

realm-probot bot commented May 9, 2019

Hey - looks like you forgot to add a T:* label - could you please add one?

@cmelchior
Copy link
Contributor

Have you tried running it on an actual device?
I tried to create a completely new project with

// Build realm-js from scratch
cd realm-js
npm install --build-from-source=realm
cd react-native/android
./gradlew publishAndroid
cd ../../
npm pack

// Create empty project
cd ..
react-native init my-test-project
cd my-test-project
npm install save ../realm-js/realm-2.27.0-rc.2.tgz
npm install
react-native link realm
react-native run-android

Then ran it on my OnePlus. It crashes on startup with:

2019-05-09 20:18:42.662 8962-9047/? A/libc: Fatal signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x72b2302cb0 in tid 9047 (mqt_js), pid 8962 (com.my64bit)
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus5T/OnePlus5T:9/PKQ1.180716.001/1902221914:user/release-keys'
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: Revision: '0'
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: ABI: 'arm64'
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: pid: 8962, tid: 9047, name: mqt_js  >>> com.my64bit <<<
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x72b2302cb0
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x0  0000000000000000  x1  0000000000000000  x2  00000072b148e4c8  x3  00000072b148e558
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x4  00000072b148e548  x5  00000072b148e498  x6  4f48514252405540  x7  7f7f7f7f7f7f7f7f
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x8  2f86aa7fd2da9011  x9  2f86aa7fd2da9011  x10 00000000000000d2  x11 00000000ffffffff
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x12 0000000000000000  x13 0000000000000580  x14 0000000000000050  x15 aaaaaaaaaaaaaaab
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x16 00000072b1fb8ae0  x17 00000072b2302cb0  x18 0000000000000008  x19 00000072c7fe5b50
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x20 00000072c7fe5b50  x21 00000072b148e4d8  x22 00000072b148e548  x23 00000072b1490588
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x24 00000072c7e23d78  x25 00000072b1490588  x26 00000072b49c0ca0  x27 0000000000000001
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     x28 00000072b148e700  x29 00000072b148e380
2019-05-09 20:18:42.752 9051-9051/? A/DEBUG:     sp  00000072b148e360  lr  00000072b1f83418  pc  00000072b2302cb0
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG: backtrace:
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #00 pc 00000000000bdcb0  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libjsc.so (offset 0xbd000) (JSGlobalContextCreateInGroup)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #01 pc 0000000000022414  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libjscexecutor.so (facebook::jsc::JSCRuntime::JSCRuntime()+28)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #02 pc 00000000000254d0  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libjscexecutor.so (facebook::jsc::makeJSCRuntime()+28)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #03 pc 0000000000018b58  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libjscexecutor.so
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #04 pc 00000000000a4468  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so (facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__ndk1::shared_ptr<facebook::react::ModuleRegistry>, std::__ndk1::shared_ptr<facebook::react::MessageQueueThread>, std::__ndk1::shared_ptr<facebook::react::InstanceCallback>)+252)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #05 pc 000000000009c0e0  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #06 pc 0000000000065d7c  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #07 pc 0000000000063cac  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #08 pc 0000000000059288  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #09 pc 0000000000059204  /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #10 pc 000000000055e7e0  /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #11 pc 0000000000555788  /system/lib64/libart.so (art_quick_invoke_stub+584)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #12 pc 00000000000cf6c8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #13 pc 000000000027f2b8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #14 pc 00000000002792c0  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #15 pc 0000000000525d10  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #16 pc 0000000000547f14  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #17 pc 0000000000c83722  /system/framework/boot-framework.vdex (android.os.Handler.handleCallback+4)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #18 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #19 pc 0000000000258ab8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #20 pc 00000000002792a4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #21 pc 0000000000526298  /system/lib64/libart.so (MterpInvokeStatic+204)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #22 pc 0000000000547e94  /system/lib64/libart.so (ExecuteMterpImpl+14612)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #23 pc 0000000000b1abb0  /system/framework/boot-framework.vdex (android.os.Handler.dispatchMessage+8)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #24 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #25 pc 0000000000258ab8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #26 pc 00000000002792a4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #27 pc 000000000052542c  /system/lib64/libart.so (MterpInvokeSuper+1420)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #28 pc 0000000000547d94  /system/lib64/libart.so (ExecuteMterpImpl+14356)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #29 pc 00000000001c1304  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #30 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #31 pc 0000000000258ab8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #32 pc 00000000002792a4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #33 pc 0000000000524d94  /system/lib64/libart.so (MterpInvokeVirtual+588)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #34 pc 0000000000547d14  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #35 pc 0000000000b21d62  /system/framework/boot-framework.vdex (android.os.Looper.loop+406)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #36 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #37 pc 0000000000258ab8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #38 pc 00000000002792a4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #39 pc 0000000000526298  /system/lib64/libart.so (MterpInvokeStatic+204)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #40 pc 0000000000547e94  /system/lib64/libart.so (ExecuteMterpImpl+14612)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #41 pc 00000000001c1492  /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.my64bit-ID2aDxAAssyFM93FbnoxJA==/base.apk (deleted) (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #42 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #43 pc 0000000000258ab8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #44 pc 00000000002792a4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #45 pc 0000000000525d10  /system/lib64/libart.so (MterpInvokeInterface+1392)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #46 pc 0000000000547f14  /system/lib64/libart.so (ExecuteMterpImpl+14740)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #47 pc 00000000000cae9a  /system/framework/boot-core-oj.vdex (java.lang.Thread.run+12)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #48 pc 0000000000252fc4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.1133985933+488)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #49 pc 0000000000515628  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #50 pc 000000000055e8fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #51 pc 0000000000555788  /system/lib64/libart.so (art_quick_invoke_stub+584)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #52 pc 00000000000cf6c8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #53 pc 000000000045cd00  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #54 pc 000000000045ddbc  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #55 pc 0000000000488c64  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #56 pc 000000000008ffc8  /system/lib64/libc.so (__pthread_start(void*)+36)
2019-05-09 20:18:42.770 9051-9051/? A/DEBUG:     #57 pc 0000000000023968  /system/lib64/libc.so (__start_thread+68)

CHANGELOG.md Outdated Show resolved Hide resolved
@kneth
Copy link
Contributor

kneth commented May 10, 2019

@nhachicha @cmelchior We have some ifdefs in https://github.com/realm/realm-js/blob/master/src/android/jsc_override.cpp which can explain the crash.

CHANGELOG.md Outdated Show resolved Hide resolved
@StasDoskalenko
Copy link

Wow! Can't wait for this to be merged.

Copy link
Contributor

@kneth kneth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to go through https://github.com/realm/realm-js/blob/master/src/android/jsc_override.cpp and see if any changes are required.

@cmelchior
Copy link
Contributor

I'm a bit surprised that a class as magical as https://github.com/realm/realm-js/blob/master/src/android/jsc_override.cpp doesn't have more comments, it is completely opaque what is happening in there 🤔

@tgoyne
Copy link
Member

tgoyne commented May 10, 2019

That function patches the beginning of JSGlobalContextCreateInGroup() to instead be a jump to create_context(). create_context() removes the patch, calls the original JSGlobalContextCreateInGroup(), injects Realm into the newly created context, then restores the patch and returns the new context. The end result is that whenever React Native creates a new JSC context we're able to inject our code into the context.

The change needed there is we need an arm64 version of the injected code for the hook.

@kneth
Copy link
Contributor

kneth commented May 13, 2019

@tgoyne Thanks for clarifying.

@trungthanhnt
Copy link

That function patches the beginning of JSGlobalContextCreateInGroup() to instead be a jump to create_context(). create_context() removes the patch, calls the original JSGlobalContextCreateInGroup(), injects Realm into the newly created context, then restores the patch and returns the new context. The end result is that whenever React Native creates a new JSC context we're able to inject our code into the context.

The change needed there is we need an arm64 version of the injected code for the hook.

Do you know how to fix it in arm64?

@nhachicha nhachicha force-pushed the nh/react_native_64 branch from 7106ec5 to 0f7c8b0 Compare May 20, 2019 17:09
Co-Authored-By: Brian Munkholm <bmunkholm@users.noreply.github.com>
@nhachicha
Copy link
Contributor Author

@tgoyne @kneth I updated the assembly for AARCH64 & also added some documentation that should help future maintainer https://github.com/realm/realm-js/pull/2366/files#diff-e61c77a661cd0add924e9a8bf52700bdR31

For the future, we should consider migrating into the new bridge (JSI) which allows invoking synchronous calls & also abstract the underlying VM used. FB can switch to V8 or another Javascript engine & we shouldn't rely upon a low-level internal dependency (JavaScriptCore) for our implementation.

The assembly was tested on x86, x86_64, arm-v7 & arm-v8 (64bit)

@nhachicha nhachicha requested a review from kneth May 20, 2019 17:16
@tgoyne
Copy link
Member

tgoyne commented May 20, 2019

Switching to JSI is probably going to be the way to go long-term, but as of React Native 0.58 it was going to be all downside: it'd require adding a JSI version of all of the JSC/v8 specific code, it'd add a bit of overhead, and it wouldn't be enough to let us create realm-js as a normal RN module without mucking about with implementation details.

If/when that third part changes then the downsides of JSI will be massively outweighed by having something that actually keeps working with new versions of RN.

src/android/jsc_override.cpp Outdated Show resolved Hide resolved
Co-Authored-By: Thomas Goyne <tgoyne@gmail.com>
@nhachicha nhachicha merged commit 9669bfd into master May 21, 2019
@nhachicha nhachicha deleted the nh/react_native_64 branch May 21, 2019 13:46
@duynvt-ibl
Copy link

Hi, @nhachicha, I tested on 2.28 it work for simulator and real devices, but when i build on samsung s6, note 8. It's crashed.
Do you opinion for this case ?
Thanks!
react-native: 0.59.8, Realm: 2.28.0

05-23 11:11:48.201 15882 15925 D ReactNative: Initializing React Xplat Bridge before initializeBridge
05-23 11:11:48.204 15882 15942 F libc    : Fatal signal 7 (SIGBUS), code 1, fault addr 0x37bf3a90253f5 in tid 15942 (mqt_js)
05-23 11:11:48.270  3685  4790 E Watchdog: !@Sync 76 [23_May_11_11_48.270]
05-23 11:11:48.274 15944 15944 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-23 11:11:48.274 15944 15944 F DEBUG   : Build fingerprint: 'samsung/zeroflteusc/zeroflteusc:7.0/NRD90M/G920R4TYU4DRI1:user/release-keys'
05-23 11:11:48.274 15944 15944 F DEBUG   : Revision: '10'
05-23 11:11:48.274 15944 15944 F DEBUG   : ABI: 'arm64'
05-23 11:11:48.274 15944 15944 F DEBUG   : pid: 15882, tid: 15942, name: mqt_js  >>> myapp.io <<<
05-23 11:11:48.274 15944 15944 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x37bf3a90253f5
05-23 11:11:48.274 15944 15944 F DEBUG   :     x0   0000000000000000  x1   0000000000000000  x2   0000000000000005  x3   a9037bf3a90253f5
05-23 11:11:48.275 15944 15944 F DEBUG   :     x4   0000000000000040  x5   0000007342217bd8  x6   0000000000000000  x7   ffffffffffffffff
05-23 11:11:48.275 15944 15944 F DEBUG   :     x8   00000000000000e2  x9   0000000000000006  x10  0000000000000000  x11  0000000000000002
05-23 11:11:48.275 15944 15944 F DEBUG   :     x12  0000007346ec6ac8  x13  0000000000000050  x14  000000000000000c  x15  2e8ba2e8ba2e8ba3
05-23 11:11:48.275 15944 15944 F DEBUG   :     x16  000000734554a710  x17  0000007345d03cb0  x18  000000736a2b40e0  x19  00000073599e44a0
05-23 11:11:48.275 15944 15944 F DEBUG   :     x20  00000073599e44a0  x21  0000007342217c18  x22  0000007342217c88  x23  00000073422194e8
05-23 11:11:48.275 15944 15944 F DEBUG   :     x24  000000735953c0d8  x25  00000073422194e8  x26  000000735f1ae298  x27  69a660a75e75e63b
05-23 11:11:48.275 15944 15944 F DEBUG   :     x28  0000000000000002  x29  0000007342217ac0  x30  0000007344e23e84
05-23 11:11:48.275 15944 15944 F DEBUG   :     sp   0000007342217a60  pc   00037bf3a90253f5  pstate 0000000060000000
05-23 11:11:48.279 15944 15944 F DEBUG   :
05-23 11:11:48.279 15944 15944 F DEBUG   : backtrace:
05-23 11:11:48.279 15944 15944 F DEBUG   :     #00 pc 00037bf3a90253f5  <unknown>
05-23 11:11:48.279 15944 15944 F DEBUG   :     #01 pc 0000000000258e80  /data/app/myapp.io-1/lib/arm64/librealmreact.so
05-23 11:11:48.279 15944 15944 F DEBUG   :     #02 pc 0000000000022414  /data/app/myapp.io-1/lib/arm64/libjscexecutor.so (_ZN8facebook3jsc10JSCRuntimeC2Ev+28)
05-23 11:11:48.279 15944 15944 F DEBUG   :     #03 pc 00000000000254d0  /data/app/myapp.io-1/lib/arm64/libjscexecutor.so (_ZN8facebook3jsc14makeJSCRuntimeEv+28)
05-23 11:11:48.279 15944 15944 F DEBUG   :     #04 pc 0000000000018b58  /data/app/myapp.io-1/lib/arm64/libjscexecutor.so
05-23 11:11:48.279 15944 15944 F DEBUG   :     #05 pc 00000000000a4468  /data/app/myapp.io-1/lib/arm64/libreactnativejni.so (_ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt6__ndk110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE+252)
05-23 11:11:48.279 15944 15944 F DEBUG   :     #06 pc 000000000009c0e0  /data/app/myapp.io/lib/arm64/libreactnativejni.so
05-23 11:11:48.279 15944 15944 F DEBUG   :     #07 pc 0000000000065d7c  /data/app/myapp.io-1/lib/arm64/libreactnativejni.so
05-23 11:11:48.279 15944 15944 F DEBUG   :     #08 pc 0000000000063cac  /data/app/myapp.io-1/lib/arm64/libreactnativejni.so
05-23 11:11:48.279 15944 15944 F DEBUG   :     #09 pc 0000000000059288  /data/app/myapp.io-1/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)
05-23 11:11:48.279 15944 15944 F DEBUG   :     #10 pc 0000000000059204  /data/app/myapp.io-1/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56)
05-23 11:11:48.279 15944 15944 F DEBUG   :     #11 pc 0000000000e3a250  /data/app/myapp.io-1/oat/arm64/base.odex (offset 0xdfd000)```

@kneth
Copy link
Contributor

kneth commented May 23, 2019

It looks like the adding Realm to the global context is failing. We currently don't have access to the two specific devices. You mention "tested on [...] real devices" - which ones?

@duynvt-ibl
Copy link

we tested working on nokia x7, nokia 7 plus, Xiaomi Redmi Note 5A Prime, but it's crash on Samsung s6, samsung note 8 and s8

@kneth
Copy link
Contributor

kneth commented May 23, 2019

@duynvt-ibl Thanks for the update.

Please create a new issue including the stack trace and info on the devices.

@janczizikow
Copy link

janczizikow commented May 23, 2019

@duynvt-ibl I haven't tested it yet, but when browsing through react-native issues I found this: facebook/react-native#24261. It seems like might be an issue with react-native 0.59.x (just my guess though).

@jerson
Copy link

jerson commented May 27, 2019

arm64-v8 dont work, tested on Samsung S7

"react": "16.8.3", "react-native": "0.59.8"

@nirinchev
Copy link
Member

As @kneth mentioned, please open a new issue as discussing on a merged PR is hardly efficient for us to keep track of what's working and what is not.

@diegolmello
Copy link

@jerson Can you open an issue?
I'm having issues as well, but I don't have a device in hands to get more info.
Thanks.

@diegolmello
Copy link

@nirinchev @kneth @nhachicha Here's the issue: #2391

@ouabing
Copy link

ouabing commented May 29, 2019

@janczizikow I'm using Kudo's JSC version for fixing the RN issue, but still getting crash, see detail in #2391

@realm realm locked as resolved and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.