New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beta v1.4.0-beta.1 crashes on Pi Zero #919
Comments
Introduced via #918 |
Was someone able to verify that this is indeed caused by the CC: @adriancable, @oznu, @donavanbecker |
@Supereg - unfortunately I don't have an ARMv6 platform to test on. But what I have verified is this: as an experiment I deleted package-lock.json (otherwise npm ignores --no-optional), then I run Having a little look through dbus-native, it seems that abstract-socket is only used for the unit tests, hence it's safe to skip it in production. |
Happy to do some testing, but I'm using Homebridge, and HAP-NodeJS installs through that. Haven't found any package-lock.json in the Homerbridge nor HAP-NodeJS installation directories. |
If this is the case, perhaps the upstream project would accept a PR to move |
@oznu - I'd be happy to suggest it but first I think we need to be sure there is actually a problem with |
@ebaauw - if you haven't already seen it, look at this Github issue posted for homebridge: homebridge/homebridge#3005 Isn't that exactly the same as your issue? Only thing is, that issue predates the PR by a long time (nearly 2 months), which suggests to me that the PR (or |
@ebaauw / @oznu - one other thing. The error @ebaauw is seeing is related to liftoff, which is (one of) the WASM compiler in V8. So what dependencies in hap-nodejs use WASM? They are: jest, typedoc, and source-map. These are all devDependencies. So @ebaauw maybe you might want to try |
Yeah, saw that searching for no-wasm. Apparently that was related to “the nest plugin”. Not sure which one nor if that includes (dependencies with) C modules. See homebridge/homebridge#3002 (comment)
Same message, different issue. Note that Homebridge v1.3.9 is running fine on my Pi Zero. |
@ebaauw - as coincidence would have it, I also happen to be the author of "the nest plugin" (if they are referring to homebridge-nest). I don't knowingly use dependencies with C modules, but in your case while I don't know for sure, since your error message references liftoff - and the error goes away when wasm in node is disabled - my money would be it is due to a dependency with WASM modules / the liftoff WASM compiler and not related to C modules. So the source of this is still a mystery but I don't think it's related to |
I don't know, hence the quotation.
Ah, so "Liftoff" is the name of the WASM compiler. I learn something new every day; couldn't make head nor tails of the error message. It is related to
I have the
|
Haven't looked at the core dump but the other tests were helpful, thanks @ebaauw. Just pushed |
Unfortunately, it's not fixed.
|
It's the |
@ebaauw - yup, I was just about to guess the same thing, as long is the only thing that uses WASM. @Supereg - can you fork
It won't affect the functionality of the dependency, but I am 99% sure this will fix @ebaauw 's issue. |
Patching the file, commenting out these lines causes it to load just fine. |
seems like their wasm check isn't really working. Might we just raise an PR and disable wasm on armv6? I think this would be the better solution instead of forking another level deeper.
Can we check if we are running armv6 from inside node? Disabling avahi responder for those platforms might also be a short term workaround to unblock the beta. |
Can confirm that Homebridge is now also working.
On the Pi 4B:
And on the Zero 2:
|
Hm. the model doesn't make sensse on the Pi 4B. It seems to match the CPU listed in |
I can confirm: Homebridge still working after re-installing 1.4.0-beta.1, and patching However, I think we would still want to skip the |
@ebaauw et al. - so it sounds like we have a plan. Short term we use @homebridge/dbus-native (to get rid of abstract-socket) but only Alternatively: we also fork Longer term we aim to get |
@adriancable thanks for escalating the issue to |
@Supereg - I've now escalated it to V8 itself: https://bugs.chromium.org/p/v8/issues/detail?id=12527 Of course since the chain of blame has now got so long, it also makes the expected time-to-resolution long as well. I am now thinking we should also do a @homebridge/long and use that in @homebridge/dbus-native, and then as things get fixed upstream we can move back to the unforked dependencies. What do you think? Another reason for doing a @homebridge/long - it gives Homebridge plug-in developers the ability to use long without breaking ARMv6. Actually, I think my homebridge-nest plug-in uses long, so this may well be useful for me. |
Published HAP-NodeJS @ebaauw Could you please verify. EDIT: not sure where my message went or if I forgot to send it. But "again": Saw your issue von V8. Thanks for that 👍. I decided to work around the issue by creating yet another fork of |
Looking good, also with Avahi advertiser selected; I see the advertisement in Discovery. |
I would propose to close the issue for now. The issue is mitigated for hap-nodejs users. |
@Supereg et al. - wow, the Google guys are responsive. They confirmed this is an issue and have already posted a CL to get this fixed in V8. Now I am pushing to get it fixed on Node's V8 fork so we don't need to wait for the upstream fix. If you are interested, the fix for V8 is here: https://chromium-review.googlesource.com/c/v8/v8/+/3372915/ |
- of note: - hap-nodejs 0.9.8 -> 0.10.0 - homebridge 1.3.9 -> 1.4.0 as they fix homebridge/homebridge#3005 / homebridge/HAP-NodeJS#919 which hit us in #88 Signed-off-by: António Meireles <antonio.meireles@reformi.st>
Analysis
Homebridge beta v1.4.0-beta.1 crashes on startup on a Raspberry Pi Zero. Not sure if related, but
npm
invokesnode-gyp
when installing the beta.See the Homebridge log below. Attached the
npm
log: 2021-12-31T07_15_18_070Z-debug-0.logExpected Behavior
No crash, obviously.
Steps To Reproduce
Standard Homebridge installation as per the Wiki on the Pi Zero. Install Homebridge beta through the UI.
Logs
Configuration
Crash happens before config.json is read.
Environment
Process Supervisor
hb-service
Additional Context
Starting Homebrigde manually:
Running node with
--no-expose-wasm
:The text was updated successfully, but these errors were encountered: