-
Notifications
You must be signed in to change notification settings - Fork 5.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
Panic in NAPI when using pl.format() with expressions in Polars Node.js #23493
Labels
Comments
This should be fixed in #24101, let us know if you encounter more issues. |
You still get the
In 1.44.2, it just gives |
On Linux x64:
|
@devsnek backtrace on macOS arm64:
|
nathanwhit
added a commit
that referenced
this issue
Jun 13, 2024
… crash (#24203) Fixes #23493. What was happening here was that napi-rs was freeing the napi reference ([here](https://github.com/napi-rs/napi-rs/blob/19e3488efcbc601afa1f11a979372eb6c5ea6130/crates/napi/src/bindgen_runtime/mod.rs#L62)) during its finalize callback (which we call [here](https://github.com/denoland/deno/blob/fb31eaa9ca59f6daaee0210d5cd206185c7041b9/cli/napi/js_native_api.rs#L132)). We then were [reading the `ownership` field](https://github.com/denoland/deno/blob/fb31eaa9ca59f6daaee0210d5cd206185c7041b9/cli/napi/js_native_api.rs#L136) of that freed reference. For some reason on arm macs the freed memory gets zeroed, so the value of `ownership` was `0` when we read it (i.e. it was `ReferenceOwnership::Runtime`). We then freed it again (since we thought we owned it), causing the segfault.
bartlomieju
pushed a commit
that referenced
this issue
Jun 18, 2024
… crash (#24203) Fixes #23493. What was happening here was that napi-rs was freeing the napi reference ([here](https://github.com/napi-rs/napi-rs/blob/19e3488efcbc601afa1f11a979372eb6c5ea6130/crates/napi/src/bindgen_runtime/mod.rs#L62)) during its finalize callback (which we call [here](https://github.com/denoland/deno/blob/fb31eaa9ca59f6daaee0210d5cd206185c7041b9/cli/napi/js_native_api.rs#L132)). We then were [reading the `ownership` field](https://github.com/denoland/deno/blob/fb31eaa9ca59f6daaee0210d5cd206185c7041b9/cli/napi/js_native_api.rs#L136) of that freed reference. For some reason on arm macs the freed memory gets zeroed, so the value of `ownership` was `0` when we read it (i.e. it was `ReferenceOwnership::Runtime`). We then freed it again (since we thought we owned it), causing the segfault.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Version: Deno 1.42.4
The Node.js version of the Polars library panics when using pl.format() with expressions inside a select operation. This issue occurs even in a minimal example and prevents the execution of the script. It should just error.
Reproduction
Minimial reproduction with documentation:
Panics with:
Issue that is not being handled
The issue in the code is that
should be something like:
and I would expect the error to be handled.
Other runtimes
Node
bun
The text was updated successfully, but these errors were encountered: