-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
WASM usage causes Node 16.1+ crash on ARMv6 #41402
Comments
Is there any chance you could see what V8 does without Node.js when loading WebAssembly on the same CPU? Maybe in a recent version of Chrome that includes the same version of V8 as an affected Node.js version? As a workaround, consider using |
@tniessen - you are right that this is (ultimately) a V8 issue. I have looked at the V8 source - the problem seems to be here (crash happens on line 322) and it's because the check for supported architectures (line 308) for Liftoff doesn't actually match the reality, e.g. ARMV6 isn't supported, but isn't excluded by the check - there may be others. I will file a V8 bug report. However given V8's lifecycle we should consider also implementing a workaround for this in Node. The typical Node user will not like the hard crash and does not care so much about where the blame lies under the hood. Regarding your Update: V8 bug report filed here - https://bugs.chromium.org/p/v8/issues/detail?id=12527 |
@tniessen - the V8 guys confirm this is a bug and are getting it fixed, see this CL: https://chromium-review.googlesource.com/c/v8/v8/+/3372915/ Google suggests we fix this in Node's V8 sources as well so we do not need to wait for the upstream change. Can you handle? |
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402
@adriancable This is addressed by #41457. |
@tniessen - perfect, I will close this now. |
Reopening since #41457 still references this and will close it automatically once it is merged :) |
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: #41402 PR-URL: #41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: #41402 PR-URL: #41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: #41402 PR-URL: #41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: #41402 PR-URL: #41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: #41402 PR-URL: #41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Original commit message: [liftoff] Allow bailout for missing ARMv7 The bailout is there explicitly in the code, so we should allow it in {CheckBailoutAllowed}. R=ahaas@chromium.org Bug: v8:12527 Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78515} Refs: v8/v8@3b6b21f Fixes: nodejs#41402 PR-URL: nodejs#41457 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Version
16.1 and above, including 17.x
Platform
Linux
Subsystem
No response
What steps will reproduce the bug?
Lots of packages do something like this: (extract from
long
)I understand WASM support for ARMv6 has been removed in Node 16.1+ which is fine. But unfortunately the above code causes a hard crash in Node 16.1+ on ARMv6.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Do not crash - instead throw an exception, so the code can fall back to non-WASM usage. (like
long
tries to do, but fails because node just crashes.)What do you see instead?
Hard crash.
Additional information
No response
The text was updated successfully, but these errors were encountered: