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
fix: crash on WebWorker destruction #35422
Conversation
0868b4c
to
e4feec4
Compare
@codebytere which call ends up with nullptr ? The fix in this PR seems to more likely avoid the |
It seems that it is abort crash instead of nullptr crash. From the crash report:
|
That's correct. It is an abort crash, i miswrote it. |
is a known flake cc @VerteDinde |
Release Notes Persisted
|
I have automatically backported this PR to "19-x-y", please check out #35490 |
I have automatically backported this PR to "20-x-y", please check out #35491 |
I have automatically backported this PR to "21-x-y", please check out #35492 |
Description of Change
Closes #35384.
Closes #35442.
Fixes a potential crash on WebWorker destruction. This was happening as a result of our custom
UV_LOOP_INTERRUPT_ON_IO_CHANGE
code added to libuv, asuv_loop_close
results in a call touv__io_stop
, which then callsuv__loop_interrupt
.uv__loop_interrupt
didn't account for the case where the loop was no longer alive, and so would crash. This fixes that.This PR also switches over from a direct call to
uv_loop_close
to Node's wrapperCheckedUvLoopClose
, which callsuv_loop_close
as expected but also aids in future debugging by logging all open handles should they exist.Checklist
npm test
passesRelease Notes
Notes: Fixed a potential crash on WebWorker destruction.