Load Llava model error: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)
Open
Nobody has claimed this yet.
module: examples
module: llm
triaged
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
Hello,
Issue
I'm experiencing the following error when trying to Load Llava model into both an Android emulator (12GB RAM, Android 13 running on Mac M1 Max) and into Pixel 7a (8GB RAM, Android 15) using Demo App.
2024-11-15 12:18:06.528 28737-28810 ETLogging com.example.executorchllamademo D Llava start prefill prompt
2024-11-15 12:18:06.547 28737-28819 libc com.example.executorchllamademo A Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400007343057000 in tid 28819 (Thread-2), pid 28737 (utorchllamademo)
---------------------------- PROCESS STARTED (28875) for package com.example.executorchllamademo ----------------------------
---------------------------- PROCESS STARTED (28876) for package com.example.executorchllamademo ----------------------------
---------------------------- PROCESS ENDED (28875) for package com.example.executorchllamademo ----------------------------
2024-11-15 12:18:08.356 28870-28870 DEBUG crash_dump64 A Cmdline: com.example.executorchllamademo
2024-11-15 12:18:08.356 28870-28870 DEBUG crash_dump64 A pid: 28737, tid: 28819, name: Thread-2 >>> com.example.executorchllamademo <<<
2024-11-15 12:18:08.356 28870-28870 DEBUG crash_dump64 A #00 pc 0000000001558d48 /data/app/~~yQe-6Zgipnmmmlxz5HeRiw==/com.example.executorchllamademo-obV0nJJreRlPESguaWBahA==/lib/arm64/libexecutorch.so (BuildId: 87abca08e486390fd661b9f8676b8b0c40ba5d04)
2024-11-15 12:18:08.356 28870-28870 DEBUG crash_dump64 A #01 pc 0000000001529050 /data/app/~~yQe-6Zgipnmmmlxz5HeRiw==/com.example.executorchllamademo-obV0nJJreRlPESguaWBahA==/lib/arm64/libexecutorch.so (BuildId: 87abca08e486390fd661b9f8676b8b0c40ba5d04)
2024-11-15 12:18:08.356 28870-28870 DEBUG crash_dump64 A #02 pc 000000000153277c /data/app/~~yQe-6Zgipnmmmlxz5HeRiw==/com.example.executorchllamademo-obV0nJJreRlPESguaWBahA==/lib/arm64/libexecutorch.so (BuildId: 87abca08e486390fd661b9f8676b8b0c40ba5d04)
---------------------------- PROCESS ENDED (28737) for package com.example.executorchllamademo ----------------------------
---------------------------- PROCESS ENDED (28876) for package com.example.executorchllamademo ----------------------------
The same model file and tokenizer are working in iOS simulator using the Demo App.
What I tried
I followed the steps from XNNPack page at the v0.4.0 commit and from main branch as of this commit. I tried to run with prebuilt executorch AAR and a one built locally (ndkVersion = "26.3.11579264" and ndkVersion = "27.1.12297006").
Could someone help to resolve the error?
Versions
PyTorch version: 2.6.0.dev20241112
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.6.1 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.31.0
Libc version: N/A
Python version: 3.10.0 (default, Mar 3 2022, 03:54:28) [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-14.6.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M1 Max
Versions of relevant libraries:
[pip3] executorch==0.5.0a0+ecdc007
[pip3] numpy==1.26.4
[pip3] torch==2.6.0.dev20241112
[pip3] torchao==0.7.0+git75d06933
[pip3] torchaudio==2.5.0.dev20241112
[pip3] torchsr==1.0.4
[pip3] torchvision==0.20.0.dev20241112
[conda] executorch 0.5.0a0+ecdc007 pypi_0 pypi
[conda] numpy 1.26.4 pypi_0 pypi
[conda] torch 2.6.0.dev20241112 pypi_0 pypi
[conda] torchao 0.7.0+git75d06933 pypi_0 pypi
[conda] torchaudio 2.5.0.dev20241112 pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchvision 0.20.0.dev20241112 pypi_0 pypi
cc @mergennachin @cccclai @helunwencser @dvorjackz
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.
Assessment
This issue has not been assessed yet.