-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
segfault in ada::url_aggregator #49960
Comments
cc @lemire @nodejs/url |
It appears that the bug is caused with this trace:
I've talked to @isaacs and appears that they're using M1 (NEON). We might have a bug in our SIMD solution @lemire Ref: https://github.com/ada-url/ada/blob/main/src/unicode.cpp#L49 |
If it's a segfault that would have to do with invalid memory access, not running out of memory. |
If you try to allocate memory and it fails, and you have disabled exceptions in C++, you get back a null pointer. Dereferencing a null pointer is a segmentation fault. I am not claiming that's the mechanism at play here, but we don't have a reproducible test case so one can only speculate. The only information that we have is that it only occurs if the system is highly stressed. Other possibilities include data races (outside of |
Fixed upstream in ada-url/ada#519 Thanks @isaacs for the report. |
Both node.js and ada need to get ARM-based sanitized testing. For ada, I opened an issue at ada-url/ada#520 For node.js, someone should check. I know it runs sanitizers, but possibly only on x64 builds. |
cc @nodejs/build |
Thanks! |
Version
v20.7.0
Platform
Darwin moxy.lan 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000 arm64
Subsystem
url
What steps will reproduce the bug?
It's unclear, unfortunately. I'm finding this only when running quite a lot of node processes at one time, when testing all the packages in the tapjs monorepo. It is very sporadic, and only happens on node 20.
How often does it reproduce? Is there a required condition?
Sporadically
What is the expected behavior? Why is that the expected behavior?
Expect that a segfault will not happen.
This is expected because programs that don't segfault tend to be more useful 😅
What do you see instead?
Occasional segfaults.
Additional information
Here's the stack trace where the segv happens:
Stack is always the same when the fault occurs.
Full macOS ips report: https://gist.github.com/isaacs/4f313a514b3a95e6268381e957fb32fe
Happy to capture a proper core dump and share it with y'all if that's useful, but I'd rather not put the contents of my computer's memory buffer on the internet in a gist, just in to be on the safe side. Could be some sensitive stuff in process.env or something.
The text was updated successfully, but these errors were encountered: