-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
1.16.x regression: crashes/panics when YAML-stringify a large object #12885
Comments
Thanks for the report, I'm able to reproduce. I'm confident it's a V8 issue because it goes away when disabling the optimizing compiler with The trap happens because the JIT-generated machine code hits an int3:
The code falls through to the int3 because:
Not sure what (3) signifies, hard to trace back, but it's probably some kind of type confusion inside V8. I can actually get the script to complete running |
I've filed an upstream bug report: https://bugs.chromium.org/p/v8/issues/detail?id=12444 |
After updating to Deno 1.16.4 we observed a core dump w/ "Trace/breakpoint trap" after rendering ~ 10 documents in quarto-web. A similar bug was reported for parsing large amounts of YAML here (denoland/deno#12885) and the problem was diagnosed as very likely a V8 optmizing compiler bug (and reported upstream here: https://bugs.chromium.org/p/v8/issues/detail?id=12444). As with the other reported issue, disabling the optimizing compiler with `--v8-flags=--noopt` prevented the crash. I measured and for a render of a simple document this does create a ~ 20% slowdown. We'll take this slowdown for now so that we can sync to the latest version of Deno and assume that it will be resolved upstream soon.
Just wanted to note that we see this crash not just with a large YAML document but also with a process that reads a large number of smaller YAML documents. It looks like the bug has been triaged and assigned (@ Priority 2) upstream so hopefully this will be resolved reasonably soon. |
FWIW, still happens with V8 9.8.177.2. |
Fixed by https://chromium-review.googlesource.com/c/v8/v8/+/3386595. Fix should be available in Deno 1.18. |
@lucacasonato I believe this issue should be closed(?) |
Since
1.16.0
, a deno process will crash/panic when serializing a relatively large object to YAML (viastd@x.x.x/encoding/yaml.ts
)Here's a reproducer:
Which will crash in deno
1.16.x
withTrace/breakpoint trap (core dumped)
output. The same snippet works fine in1.15.x
and below.The text was updated successfully, but these errors were encountered: