ioBroker.roborock icon indicating copy to clipboard operation
ioBroker.roborock copied to clipboard

[BUG] instance system.adapter.roborock.0 terminated due to SIGILL

Open fonebone42 opened this issue 9 months ago • 15 comments

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.

fonebone42 avatar May 03 '25 15:05 fonebone42

Do you have map creation enabled?

copystring avatar May 04 '25 19:05 copystring

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?

copystring avatar May 04 '25 19:05 copystring

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",
  ...

fonebone42 avatar May 05 '25 04:05 fonebone42

Try this:

cd /opt/iobroker
npm uninstall @napi-rs/canvas
npm install @napi-rs/[email protected]

and restart the adapter.

copystring avatar May 05 '25 16:05 copystring

I had to go back to 0.1.68 to get the adapter to working again

fonebone42 avatar May 05 '25 16:05 fonebone42

With or without the commands I posted?

copystring avatar May 05 '25 16:05 copystring

yes, with

cd /opt/iobroker
npm uninstall @napi-rs/canvas
npm install @napi-rs/[email protected]

fonebone42 avatar May 05 '25 17:05 fonebone42

0.1.69 didn't work?

copystring avatar May 05 '25 17:05 copystring

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

fonebone42 avatar May 05 '25 17:05 fonebone42

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

fonebone42 avatar May 05 '25 17:05 fonebone42

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?

copystring avatar May 05 '25 19:05 copystring

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

fonebone42 avatar May 06 '25 18:05 fonebone42

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.

copystring avatar May 06 '25 22:05 copystring

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

fonebone42 avatar May 07 '25 04:05 fonebone42

I can confirm: I needed to go back to [email protected] as well, for solving this issue.

Thank you!

danifri avatar May 16 '25 17:05 danifri

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.

copystring avatar May 25 '25 21:05 copystring