-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
raspberry pi 300% cpu setTimeout() #49937
Comments
It would be extremely useful to know which version of 20.x introduced the regression. |
I have tested that the issue appears between version 18.17.1 and 18.18.0. |
If the bug doesn't exist in 18.17.1 but exists in 18.18.0, it's very likely that it was introduced in one of the recent 20.x releases. It would help a lot because 20.x releases will have fewer commits than 18.18.0, so it would be very helpful to help identify which one was it. |
node-v20.2.0-linux-armv6l -> OK https://nodejs.org/en/blog/release/v20.3.0 |
What do you see when you let |
(This was run without docker, using node-v20.3.0-linux-armv6l)
possibly related: #48654 (comment) |
Right, that's a known kernel bug. Upgrade your kernel or set UV_USE_IO_URING=0 in the environment. |
related: #48444 I suppose this issue can be closed now. |
If you can pinpoint the range of affected kernels, I can blacklist them in libuv. |
5.15.61-v7l+ (raspberrypi-kernel 1.20220830-1) -> bug The 6.1.21 kernel was tested using CM4
6.1.54-v7l+ (manual kernel update) -> bug however: in 64bit mode (6.1.54-v8+) -> OK! So, it is safe to conclude that all 32-bit kernel versions, up to 6.1.54-v7l+ are affected. Available kernels: https://github.com/raspberrypi/firmware/commits/master |
Version
v20.7.0
Platform
5.15.61-v7l+ #1579 SMP armv7l GNU/Linux
Subsystem
What steps will reproduce the bug?
The following 3-line script causes high cpu on a raspberry pi4 /CM4 (actively tested on 2 devices, seen on more).
After restarting nodejs a couple of times the issue disappears (the device must be rebooted to consistently get the 300% cpu usage again). Both setInterval and setTimeout show the same behaviour.
After 4-5 minutes, cpu usage drops to normal levels again, until reboot that is.
Interval works correctly: 'test' is printed every x seconds
The issue is also present in the following nodejs versions, so it must have been introduced around 18.18.0.
20.7.0 bug
18.18.0 bug
18.17.1 OK!
18.17.0 OK!
18.16.0 OK!
18.14.0: OK!
18.0.0: OK!
16.20.2: OK!
The issue was detected both in a docker container and running nodejs without docker.
Tested both with .deb install and the unoffical builds.
Dockerfile is below.
Dockerfile:
How often does it reproduce? Is there a required condition?
Always after reboot. Starting from versions v18.18.0 up to v20.7.0
Never seen on my desktop, always on RPI devices (rpi4 / CM4)
What is the expected behavior? Why is that the expected behavior?
0% cpu usage, just as in version 16.x
What do you see instead?
300% cpu usage (top -c -H to show threads)
Additional information
Seen also, but very rarely on nodejs version 16.x, so can't confirm it is the same issue.
Please take note that rpi is running a 32-bit kernel...
The text was updated successfully, but these errors were encountered: