Skip to content
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

event loop regression after libuv v1.45.0 update #48512

Closed
trevnorris opened this issue Jun 21, 2023 · 0 comments
Closed

event loop regression after libuv v1.45.0 update #48512

trevnorris opened this issue Jun 21, 2023 · 0 comments
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding.

Comments

@trevnorris
Copy link
Contributor

trevnorris commented Jun 21, 2023

Version

all

Platform

all

Subsystem

event loop

What steps will reproduce the bug?

// Backwards compatibility, this shouldn't run.
setTimeout(() => { throw new Error('bad') }, 1).unref();

const t = Date.now();
while (Date.now() - t < 10);

What do you see instead?

The test fails because of the change libuv/libuv@6600954 that landed in v1.45.0. What's happening is that unref'ing the timer shouldn't count as a handle internally, but the first iteration of timers runs regardless because the bootstrap takes longer than the timer's timeout.

Additional information

This was fixed in libuv/libuv@24d1d08, and should be included in the next libuv release. Node.js should update libuv as soon as is released (see libuv/libuv#4060).

@santigimeno santigimeno added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Jun 21, 2023
RafaelGSS pushed a commit that referenced this issue Jul 3, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: #48618
Fixes: #48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: nodejs#48618
Fixes: nodejs#48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: nodejs#48618
Fixes: nodejs#48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
arsnyder16 pushed a commit to arsnyder16/node that referenced this issue Sep 10, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: nodejs#48618
Fixes: nodejs#48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 11, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: #48618
Backport-PR-URL: #49591
Fixes: #48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
PR-URL: #48078
ruyadorno pushed a commit that referenced this issue Sep 13, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: #48618
Backport-PR-URL: #49591
Fixes: #48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
PR-URL: #48078
ruyadorno pushed a commit that referenced this issue Sep 17, 2023
Notable changes
- fs: use WTF-8 on Windows: libuv/libuv#2970
- linux: add some more iouring backed fs ops: libuv/libuv#4012

Important bugs fixed
- linux: work around io_uring IORING_OP_CLOSE bug: libuv/libuv#4059
- src: don't run timers if loop is stopped/unref'd: libuv/libuv#4048

PR-URL: #48618
Backport-PR-URL: #49591
Fixes: #48512
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
PR-URL: #48078
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding.
Projects
None yet
Development

No branches or pull requests

2 participants