Android: prebuilt libexecutorch.so SIGILLs on ARMv8.0 CPUs (unguarded LSE atomics in the JNI layer, one-line fix upstream)
Maintainer thường phản hồi trong vòng 1 ngày
@msluszniak đang làm issue này rồi.
Từ ngày 28/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description
On Android phones with an ARMv8.0 CPU (no atomics in /proc/cpuinfo: Cortex-A53/A73, e.g. Snapdragon 680/685, Helio P22/P35, Exynos 9611), the prebuilt libexecutorch.so from core-android-arm64-v8a kills the app with SIGILL / ILL_ILLOPC when a loaded model is destroyed: explicit unload, hook unmount, or GC of the host object.
The faulting instruction is ldaddal x9, x8, [x8] in executorch::extension::module::Module::~Module(). That is an ARMv8.1 LSE atomic (a shared_ptr refcount decrement) emitted inline, with no runtime check.
Crash on a Redmi Note 11 with 0.10.0 (abridged):
Fatal signal 4 (SIGILL), code 1 (ILL_ILLOPC)
libexecutorch.so executorch::extension::module::Module::~Module()+544
... rnexecutorch ObjectDetection::~ObjectDetection (shared_ptr __on_zero_shared, JS thread)
It happened about a minute after launch, when the JS GC released a YOLO26n detection host object after a memory-pressure trim.
The root cause is already identified upstream in pytorch/executorch#25162: extension/llm/custom_ops/CMakeLists.txt adds -march=armv8.2-a+dotprod and applies it with target_compile_options(custom_ops PUBLIC ...). executorch_jni links custom_ops, so the flag propagates to the JNI sources and the compiler inlines LSE atomics there instead of calling the runtime-checked outline helpers. The fix is one line (PUBLIC → PRIVATE), open as pytorch/executorch#25302.
The branch the libs are built from still has it. In software-mansion-labs/executorch at @ms/separate-backends-1.6.0, extension/llm/custom_ops/CMakeLists.txt has the -march flag on line 25 and target_compile_options(custom_ops PUBLIC ...) on line 161. So the cores published yesterday are still affected.
Shipped cores, scanned 2026-11-28:
| libs release | libexecutorch.so sha256 |
unguarded inline LSE sites | LSE sites inside guarded outline helpers | Module::~Module |
|---|---|---|---|---|
| v0.10.0-libs | 923af7f6919e… |
24 | 18 | ldaddal at +0x220 |
| v0.10.2-libs | 4542dfa9922b… |
24 | 17 | ldaddal at +0x220 |
| v0.11.1-libs (pinned by 0.11.1 and the current nightlies) | 0a9fd93b94c6… |
22 | 17 | ldaddal at +0x264 |
| v0.11.4-libs | d99155aff67d… |
27 | 17 | ldaddal at +0x220 and +0x250 |
A site counts as guarded when it sits in a compiler-rt outline helper (load of __aarch64_have_lse_atomics into w16, cbz w16, the LSE instruction, ret). The unguarded ones in v0.11.4-libs are in Module::~Module, ExecuTorchJni::execute_method, vector<shared_ptr<Tensor>>::__push_back_slow_path / __emplace_back_slow_path, AsrModule_nativeTranscribe, ImageProcessor_nativeProcessBitmap / nativeProcessYuv, SGDHybrid and ExecuTorchTrainingJni, plus 4 in local symbols. That matches the upstream diagnosis: only code compiled as part of the JNI target is affected.
Teardown is the trigger we observed. Because some of the other sites are weak template instantiations, I would not rely on "never unload a model" as a workaround.
Related reports:
- #1055 (SIGILL in
Module::~Moduleduring VAD unload, "a small percentage of sessions") looks like this bug rather than a race. - software-mansion-labs/private-mind#437 (item A2) and software-mansion-labs/private-mind#442 hit it in Private Mind and work around it by refusing to load models when
atomicsis missing. Those notes say the real fix belongs in react-native-executorch. I could not find an issue tracking it here, hence this one.
Request: apply the PUBLIC → PRIVATE change on the libs branch (no need to wait for the upstream PR to merge), publish new core-android-* libs, and bump nativeLibsVersion.
To check a rebuilt core:
gh release download v0.11.4-libs -R software-mansion/react-native-executorch -p 'core-android-arm64-v8a.tar.gz'
tar xzf core-android-arm64-v8a.tar.gz
llvm-nm -D -S executorch/arm64-v8a/libexecutorch.so | grep module6ModuleD2Ev # start address and size
llvm-objdump -d --mattr=+lse --start-address=0x306e50 --stop-address=0x307138 \
executorch/arm64-v8a/libexecutorch.so | grep ldaddal # a fixed build prints nothing
Until then, an app can only protect these users by reading /proc/cpuinfo and skipping ExecuTorch when atomics is absent, which turns off every on-device model on a large class of budget phones.
Steps to reproduce
- Use an Android device whose
/proc/cpuinfoFeaturesline has noatomics(tested: Redmi Note 11, Snapdragon 680). - Load any model, for example
useObjectDetectionwith YOLO26n. - Unmount the hook, call unload, or let the host object be garbage collected.
- The process dies with SIGILL in
Module::~Module().
Snack or a link to a repository
No response
React Native Executorch version
0.10.0 (crash observed on device). Binaries up to 0.11.1 / v0.11.4-libs checked statically, see the table.
React Native version
0.86.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo Dev Client
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Real device
Device model
Xiaomi Redmi Note 11 (2201117TL, Snapdragon 680: 4× Cortex-A73 + 4× Cortex-A53), Android 13 / MIUI 14
AI model
YOLO26n object detection (any model triggers it)
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 102
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của software-mansion/react-native-executorch
-
Require react-native-blob-util >=1.0.0 (Xcode 27 iOS build failure)Có thể đã có người làm @msluszniak đã nhận 23 ngày trước. Đang mởdependencies platform: ios
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
software-mansion/react-native-executorch#1617 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat session: add `session.reset()` for stateless single-turn requestsCó thể đã có người làm @barhanc đã nhận 1 ngày trước. Đang mởfeature request
software-mansion/react-native-executorch#1664 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
software-mansion/react-native-executorch#1663 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
software-mansion/react-native-executorch#1661 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Selfie segmentation: single-channel mask is passed through sigmoid twiceCó thể đã có người làm @barhanc đã nhận 1 ngày trước. Đang mởmodel
software-mansion/react-native-executorch#1660 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của software-mansion/react-native-executorch
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chatCó thể đã có người làm @koeria đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
milind-soni/OpenMausBot#8023 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows microphone listing treats words in a device name as DirectShow labelsCó thể đã có người làm @Sujal-chaudhary đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
clipy-recorder/clipy#447 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement from-app needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nightly-labs/openbot#19162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage:in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Cotal-AI/Cotal#11229 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày