[BUG] instance system.adapter.roborock.0 terminated due to SIGILL
Bug Description
After installation of the adapter on a freshly setup iobroker, the adapter keeps crashing with SIGILL.
Originally I had v0.6.18 running without problems and then decided to upgrade to 0.16.19 from githup and that's when the problem started. Downgrading and a fresh adapter installation did not help (using 0.6.18) and as mentions installation on a fresh iobroker also did not help.
I tried forced it into a coredump and gdb told me this when inspecting the core file:
Core was generated by "/usr/bin/node --inspect-brk=9229 main.js 0".
Program terminated with signal SIGILL, Illegal instruction.
#0 0x0000007f55452a00 in ?? () from /opt/iobroker/node_modules/iobroker.roborock/node_modules/@napi-rs/canvas-linux-arm64-gnu/skia.linux-arm64-gnu.node
[Current thread is 1 (Thread 0x7f80606040 (LWP 15491))]
Steps to Reproduce
- install/update adapter on iobroker on raspberry pi 4
- configure
- start
- check logs
Expected Behavior
should not run into an illegal instruction exception (SIGILL)
Debug Log
`
| host.iobroker | 2025-05-01 09:53:28.810 | info | Restart adapter system.adapter.roborock.0 because enabled |
|---|---|---|---|
| host.iobroker | 2025-05-01 09:53:28.810 | info | instance system.adapter.roborock.0 terminated with code null () |
| host.iobroker | 2025-05-01 09:53:28.809 | warn | instance system.adapter.roborock.0 terminated due to SIGILL |
| host.iobroker | 2025-05-01 09:53:27.426 | info | instance system.adapter.roborock.0 in version "0.6.18" started with pid 1313 |
I tried starting the adapter on the command line trying to debug it: node main.js 0 --debug. but it crashes with a "Illegal instruction"
before any other output is coming back.
Adapter Version
0.6.18 / 0.6.19
JS-Controller Version
7.0.6
Node.js Version
20.19.1
Operating System
Raspi 4 under Debian GNU/Linux 12 (bookworm), Kernel: Linux 6.12.20+rpt-rpi-v8
Additional Context
see also the discussion here which shows that the problem seems to be reproducible.
Do you have map creation enabled?
It doesn't look like it's a problem of my adapter but from napi-rs/canvas on arm64: https://github.com/Brooooooklyn/canvas/issues/1036. The new release with the fix is here: https://github.com/Brooooooklyn/canvas/releases/tag/v0.1.70. Which version of napi-rs/canvas is installed?
Do you have map creation enabled?
NO
$ head /opt/iobroker/node_modules/@napi-rs/canvas/package.json
{
"name": "@napi-rs/canvas",
"version": "0.1.70",
"description": "Canvas for Node.js with skia backend",
...
Try this:
cd /opt/iobroker
npm uninstall @napi-rs/canvas
npm install @napi-rs/[email protected]
and restart the adapter.
I had to go back to 0.1.68 to get the adapter to working again
With or without the commands I posted?
0.1.69 didn't work?
no 0.1.69 did not work, I tried downgrading from 0.1.70 to 0.1.69 as well as upgrading again from 0.1.68 to 0.1.69 and in both cases it did not work
the only thing that does not work anymore is the maps on http://iobroker:6824/map.html. But this is not an issue for me as I have my own little app running under vis-2
SORRY, ignore ... only the link in the admin UI seems broken. If I call the maps via its url directly, it works
What happens when you do this with 0.1.70?
cd /opt/iobroker
node
const canvas = require('@napi-rs/canvas');
Do you get the same as https://github.com/Brooooooklyn/canvas/issues/1036#issue-3006977713?
admin@iobroker2:/opt/iobroker $ npm uninstall @napi-rs/canvas
added 1 package in 7s
145 packages are looking for funding
run `npm fund` for details
admin@iobroker2:/opt/iobroker $ npm install @napi-rs/[email protected]
changed 3 packages in 8s
145 packages are looking for funding
run `npm fund` for details
admin@iobroker2:/opt/iobroker $ cd /opt/iobroker
admin@iobroker2:/opt/iobroker $ node
Welcome to Node.js v20.19.1.
Type ".help" for more information.
> const canvas = require('@napi-rs/canvas');
Illegal instruction
Looks the same to me. It would be best to get in touch with the dev of @napi-rs/canvas as I don't have a raspberry pi to test with.
if I interpret their releases correctly, there should be a fix for the issue in 0.1.70 but apparently it is not ... I opened another issue with them about this: #1050
Closing this. Waiting for fix by the dev of @napi-rs/canvas. Until then manual downgrade via
cd /opt/iobroker
npm install @napi-rs/[email protected]
is needed if the error occurs.