software-mansion / software-mansion/react-native-executorch
Android Emulator Crashes with Custom PTE Model
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 96
- Avg merge
- 20h 51m
- Merged PRs (30d)
- 59
Description
Description
Hi all!
I want to start by saying thank you for this awesome project. We are using a custom PTE model, which may be the entire issue here. This crash only happens on an Android Emulator (I'm using a M4 Mac), it works properly on real devices and on the iOS simulator.
Android Emulator Info:
Android Version: 16
API Level: 36
Device Model: sdk_gphone64_arm64
Device: emu64a
Build Fingerprint: google/sdk_gphone64_arm64/emu64a:16/BE4B.251210.005/14574095:user/release-keys
CPU ABI: arm64-v8a
ADB Logs:
06-15 15:26:52.395 6132 6209 F libc : Fatal signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x6caa3a1ad0 in tid 6209 (RN_ET_Worker1), pid 6132 (linician.mobile)
06-15 15:26:52.444 6317 6317 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
06-15 15:26:52.444 330 330 I tombstoned: received crash request for pid 6209
06-15 15:26:52.444 6317 6317 I crash_dump64: performing dump of process 6132 (target tid = 6209)
06-15 15:26:52.592 6317 6317 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-15 15:26:52.592 6317 6317 F DEBUG : Build fingerprint: 'google/sdk_gphone64_arm64/emu64a:16/BE4B.251210.005/14574095:user/release-keys'
06-15 15:26:52.592 6317 6317 F DEBUG : Kernel Release: '6.12.38-android16-5-gbb9513914902-ab13996879-4k'
06-15 15:26:52.592 6317 6317 F DEBUG : Revision: '0'
06-15 15:26:52.592 6317 6317 F DEBUG : ABI: 'arm64'
06-15 15:26:52.592 6317 6317 F DEBUG : Timestamp: 2026-06-15 15:26:52.448627331-0400
06-15 15:26:52.592 6317 6317 F DEBUG : Process uptime: 25s
06-15 15:26:52.592 6317 6317 F DEBUG : Executable: /system/bin/app_process64
06-15 15:26:52.592 6317 6317 F DEBUG : Cmdline: com.company.mobile
06-15 15:26:52.592 6317 6317 F DEBUG : pid: 6132, tid: 6209, name: RN_ET_Worker1 >>> com.company.mobile <<<
06-15 15:26:52.592 6317 6317 F DEBUG : uid: 10224
06-15 15:26:52.592 6317 6317 F DEBUG : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
06-15 15:26:52.592 6317 6317 F DEBUG : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
06-15 15:26:52.592 6317 6317 F DEBUG : signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x0000006caa3a1ad0 (read)
06-15 15:26:52.592 6317 6317 F DEBUG : x0 0000006caab1f390 x1 0000006caa2aff50 x2 0000006caab222a8 x3 0000000000000000
06-15 15:26:52.592 6317 6317 F DEBUG : x4 000000000000000e x5 000000000000000e x6 b40000705d8ccda0 x7 b40000705d8cd188
06-15 15:26:52.592 6317 6317 F DEBUG : x8 00000000000087fc x9 0000000000000001 x10 0000000000000001 x11 0000000000000001
06-15 15:26:52.592 6317 6317 F DEBUG : x12 0000000000082a84 x13 0000000000000006 x14 00000000ffffffff x15 00000000ffffffff
06-15 15:26:52.592 6317 6317 F DEBUG : x16 0000006caab10e88 x17 0000006caa3a1ad0 x18 0000006ca29b4000 x19 0000006caab222a8
06-15 15:26:52.592 6317 6317 F DEBUG : x20 0000006caab222a8 x21 0000006caa2c7d18 x22 0000000000000001 x23 b40000705d8ccda0
06-15 15:26:52.592 6317 6317 F DEBUG : x24 0000000000000000 x25 0000000000000000 x26 0000000000000001 x27 00000000000000c8
06-15 15:26:52.592 6317 6317 F DEBUG : x28 b40000707d4d3350 x29 0000006ca59f5510
06-15 15:26:52.592 6317 6317 F DEBUG : lr 0000006caa3ab590 sp 0000006ca59f5510 pc 0000006caa3a1ad0 pst 0000000060000400
06-15 15:26:52.592 6317 6317 F DEBUG : esr 0000000000000000
06-15 15:26:52.592 6317 6317 F DEBUG : 23 total frames
06-15 15:26:52.592 6317 6317 F DEBUG : backtrace:
06-15 15:26:52.592 6317 6317 F DEBUG : #00 pc 00000000004e5ad0 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (kai_get_sme_vector_length_u8+0) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #01 pc 00000000004ef58c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (kai_get_mr_matmul_clamp_f32_f32p2vlx1_f32p2vlx1biasf32_sme2_mopa+12) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #02 pc 000000000040bd78 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #03 pc 0000000000088834 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_once+148) (BuildId: f2ee009c5f1631f9819057446c9d2fa3)
06-15 15:26:52.592 6317 6317 F DEBUG : #04 pc 000000000040bcf4 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #05 pc 000000000040531c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (xnn_subgraph_optimize_packed_lhs+504) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #06 pc 00000000003f55d4 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #07 pc 0000000000385e28 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::backends::xnnpack::delegate::XNNCompiler::compileModel(void const*, unsigned long, executorch::backends::xnnpack::delegate::XNNExecutor*, executorch::backends::xnnpack::delegate::XNNWeightsCache*, xnn_workspace*, executorch::runtime::NamedDataMap const*)+1168) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #08 pc 0000000000387c2c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::backends::XnnpackBackend::init(executorch::runtime::BackendInitContext&, executorch::runtime::FreeableBuffer*, executorch::runtime::ArrayRef<executorch::runtime::CompileSpec>) const+340) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #09 pc 00000000009f4ebc /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::runtime::BackendDelegate::Init(executorch_flatbuffer::BackendDelegate const&, executorch::runtime::Program const*, executorch::runtime::BackendInitContext&, executorch::runtime::BackendDelegate*)+780) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #10 pc 00000000009f429c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::runtime::Method::init(executorch_flatbuffer::ExecutionPlan*, executorch::runtime::NamedDataMap const*)+680) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #11 pc 00000000009f3ea4 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::runtime::Method::load(executorch_flatbuffer::ExecutionPlan*, executorch::runtime::Program const*, executorch::runtime::MemoryManager*, executorch::runtime::EventTracer*, executorch::runtime::NamedDataMap const*)+204) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #12 pc 00000000003b3620 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::extension::module::Module::load_method(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, executorch::runtime::HierarchicalAllocator*, executorch::runtime::EventTracer*)+828) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #13 pc 00000000003b3c14 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libexecutorch_jni.so (offset 0x3348000) (executorch::extension::module::Module::execute(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::vector<executorch::runtime::EValue, std::__ndk1::allocator<executorch::runtime::EValue>> const&)+60) (BuildId: 31c3f9a16a083f05949d1aad20aa02feb9a37796)
06-15 15:26:52.592 6317 6317 F DEBUG : #14 pc 00000000006cef80 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (rnexecutorch::models::BaseModel::forwardJS(std::__ndk1::vector<rnexecutorch::JSTensorViewIn, std::__ndk1::allocator<rnexecutorch::JSTensorViewIn>>) const+604) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #15 pc 00000000005f6504 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #16 pc 00000000005f581c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (facebook::jsi::Value rnexecutorch::ModelHostObject<rnexecutorch::models::BaseModel>::promiseHostFunction<&rnexecutorch::models::BaseModel::forwardJS(std::__ndk1::vector<rnexecutorch::JSTensorViewIn, std::__ndk1::allocator<rnexecutorch::JSTensorViewIn>>) const>(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)::'lambda'(std::__ndk1::shared_ptr<rnexecutorch::Promise>)::operator()(std::__ndk1::shared_ptr<rnexecutorch::Promise>) const::'lambda'()::operator()() const+100) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #17 pc 00000000005f5734 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (rnexecutorch::threads::HighPerformanceThreadPool::Task<std::__ndk1::__bind<facebook::jsi::Value rnexecutorch::ModelHostObject<rnexecutorch::models::BaseModel>::promiseHostFunction<&rnexecutorch::models::BaseModel::forwardJS(std::__ndk1::vector<rnexecutorch::JSTensorViewIn, std::__ndk1::allocator<rnexecutorch::JSTensorViewIn>>) const>(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)::'lambda'(std::__ndk1::shared_ptr<rnexecutorch::Promise>)::operator()(std::__ndk1::shared_ptr<rnexecutorch::Promise>) const::'lambda'()>, void>::execute()+36) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #18 pc 0000000000563cc0 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (rnexecutorch::threads::HighPerformanceThreadPool::processTask(rnexecutorch::threads::HighPerformanceThreadPool::WorkItem const&)+64) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #19 pc 0000000000560c9c /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (rnexecutorch::threads::HighPerformanceThreadPool::workerThread(int)+344) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #20 pc 00000000005637a0 /data/app/~~BwNc7rGIzmgIECxOwd2YWg==/com.company.mobile-qxVGWy9rGGKWcYQ3eHUTLw==/base.apk!libreact-native-executorch.so (offset 0x479c000) (BuildId: fb29492d90ef0e4d636dd0c38b31693b9e0f47f9)
06-15 15:26:52.592 6317 6317 F DEBUG : #21 pc 0000000000086580 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*) (.__uniq.67847048707805468364044055584648682506)+232) (BuildId: f2ee009c5f1631f9819057446c9d2fa3)
06-15 15:26:52.592 6317 6317 F DEBUG : #22 pc 0000000000078d64 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f2ee009c5f1631f9819057446c9d2fa3)
06-15 15:26:52.603 330 330 E tombstoned: Tombstone written to: tombstone_08
Steps to reproduce
const modelPath = "./models/model.pte"
const modelModule = new ExecutorchModule();
await modelModule.load(modelPath);
const outputs = await modelModule.forward([
{
dataPtr: imageData,
sizes: [3, 3, 384, 384],
scalarType: ScalarType.FLOAT,
}
]);
Snack or a link to a repository
No response
React Native Executorch version
0.8.4
React Native version
0.85.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo Dev Client
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Android Emulator
AI model
Custom PTE Model
Performance logs
No response
Acknowledgements
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash with the custom PTE model on the listed Android 16 emulator and compare it with a real Android device or iOS simulator. Trace the ADB backtrace from libexecutorch_jni.so through XNNPACK and the SME2 entry points; done means identifying the emulator-specific cause and defining a verified fix or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, pytorch, react-native
- Domain
- machine-learning, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100