-
Notifications
You must be signed in to change notification settings - Fork 7.3k
node 0.7.9-pre cpu 100% on ubuntu 64bit #3332
Comments
Thanks for the report. Do you see the same behavior with a server that doesn't use express? I want to rule out the possibility of a bug in third-party modules (i.e. express). |
I got something similar today when testing an existing codebase (that used to work just fine on node 0.7.3) with the latest 0.7.9-pre (git cloned from the master branch). It happens both on OS X and Linux. On Linux, after a while it starts repeating the following lines when running with strace and using 100% CPU (during which the application works fine by the way): clock_gettime(CLOCK_MONOTONIC, {31126308, 775254165}) = 0 The strange thing is that all worker processes (4 on the Mac, 2 on the Linux machine) go to 100% CPU usage. |
@pixelspark Can you post a test case or describe how and what your application does (e.g. which node subsystems it uses and how)? The busy loop looks like node thinks there are pending events when there are none (hence the zero timeout to epoll_wait). |
The following code will make the node process consume 100% CPU (one core) on my Mac (with 0.7.9-pre) after the first HTTP request has been made to localhost:6283: var HTTP = require("http");
var System = require("util");
System.puts("server starting");
var server = HTTP.createServer(function(request, response) {
});
server.listen(6283,"localhost", function() {
System.puts("Server running");
}); |
DTrace (dtruss node script.js) shows the following line repeating a zillion times after the first HTTP request:
(The first occurrence has 0x1 instead of 0x0 for the third parameter to kevent) |
Okay, confirmed. Thanks. |
Fixed in 0fd2834. Thanks for the bug reports, people. |
root@li413-184:~# node -v
v0.7.9-pre
//------------------------------------
after i execute "node server.js" 30 seconds the cpu up to 100%, but no http request
this is the stack info
The text was updated successfully, but these errors were encountered: