Skip to content

Illegal Instruction when running pipeline on Raspberry Pi 3 Model B (64-bit) #1640

@sammorrisdesign

Description

@sammorrisdesign

System Info

Transformers.js: 3.8.1 (although have tested on 3.7 and 4.0 and get the same error).
Node: 22.22.2
Operating System: Debian GNU/Linux 13 (trixie)
Kernel: Linux 6.12.47+rpt-rpi-v8
Architecture: arm64

Environment/Platform

  • Website/web-app
  • Browser extension
  • Server-side (e.g., Node.js, Deno, Bun)
  • Desktop app (e.g., Electron)
  • Other (e.g., VSCode extension)

Description

When I run on macOS everything is fine. However, when I run on my Raspberry Pi, I get the error Illegal Instruction. The weird thing is that this was working a few weeks ago until I installed another npm dependency. Now I can't figure it out. I've tried deleting the package-lock.json and node_modules folders on the Pi, but no avail.

Here's the output of the strace. It looks like an issue with onnx. However, I'm not familiar with strace output to really know what I'm looking at here...

4098  openat(AT_FDCWD, "/home/sam/Repos/dj-lights/node_modules/onnxruntime-node/bin/napi-v3/linux/arm64/libonnxruntime.so.1", O_RDONLY|>
4098  read(22, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
4098  fstat(22, {st_mode=S_IFREG|0664, st_size=17446360, ...}) = 0
4098  mmap(NULL, 17534216, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f755d7000
4098  mmap(0x7f755e0000, 17468680, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0) = 0x7f755e0000
4098  munmap(0x7f755d7000, 36864)       = 0
4098  munmap(0x7f76689000, 27912)       = 0
4098  mprotect(0x7f75678000, 16588800, PROT_NONE) = 0
4098  mmap(0x7f75680000, 13176832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0xa0000) = 0x7f75680000
4098  mmap(0x7f76320000, 3264512, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0xd40000) = 0x7f76320000
4098  mmap(0x7f7664a000, 233472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0x106a000) = 0x7f7664a000
4098  mmap(0x7f76683000, 23816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f76683000
4098  close(22)                         = 0
4098  openat(AT_FDCWD, "/home/sam/Repos/dj-lights/node_modules/onnxruntime-node/bin/napi-v3/linux/arm64/librt.so.1", O_RDONLY|O_CLOEXEC>
4098  openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 22
4098  fstat(22, {st_mode=S_IFREG|0644, st_size=73152, ...}) = 0
4098  mmap(NULL, 73152, PROT_READ, MAP_PRIVATE, 22, 0) = 0x7f9530d000
4098  close(22)                         = 0
4098  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 22
4098  read(22, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
4098  fstat(22, {st_mode=S_IFREG|0644, st_size=67664, ...}) = 0
4098  mmap(NULL, 196624, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f94b0f000
4098  mmap(0x7f94b10000, 131088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0) = 0x7f94b10000
4098  munmap(0x7f94b0f000, 4096)        = 0
4098  munmap(0x7f94b31000, 57360)       = 0
4098  mprotect(0x7f94b11000, 122880, PROT_NONE) = 0
4098  mmap(0x7f94b2f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 22, 0xf000) = 0x7f94b2f000
4098  close(22)                         = 0
4098  mprotect(0x7f94b2f000, 4096, PROT_READ) = 0
4098  mprotect(0x7f7664a000, 221184, PROT_READ) = 0
4098  mprotect(0x7f766ef000, 4096, PROT_READ) = 0
4098  --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x7f75690a34} ---
4104  <... futex resumed>)              = ?
4103  <... futex resumed>)              = ?
4102  <... futex resumed>)              = ?
4101  <... futex resumed>)              = ?
4100  <... futex resumed>)              = ?
4099  <... epoll_pwait resumed> <unfinished ...>) = ?
4103  +++ killed by SIGILL +++
4101  +++ killed by SIGILL +++
4102  +++ killed by SIGILL +++
4100  +++ killed by SIGILL +++
4104  +++ killed by SIGILL +++
4099  +++ killed by SIGILL +++
4098  +++ killed by SIGILL +++

Reproduction

You can see the full project here.

The error happens when I try to import and use pipeline

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions