Closed bajtos closed 10 years ago
FWIW, it looks like an OSX-specific problem as the system cannot even shut down at that point.
Don't tell me that Apple ruined our proctitle again :(
How many times are we talking about? I'm running v0.10.31 (installed through homebrew) on 10.9.4 and tried something similar to:
for i in {1..1000}; do
node -e "console.log('${i} before');process.title='changed';console.log('${i} after');"
done
..without being able to reproduce.
To be honest, the trigger may be totally unrelated to Node.js, since it seems that the whole OS X is in a weird state at that point.
I don't restart my machine every day, just put it to sleep. After few days of work, where I run various node processes including npm, but also other stuff like WebStorm, Chrome, Colloquy, SlackChat, etc., I run npm install
and it suddenly hangs.
I am not sure how to proceed with this issue. I don't mind closing it until I (or somebody else) is able to provide more info.
Yeah, I wasn't able to reproduce it either... Haven't seen it myself.
(just adding my own experience for reference)
I rarely restart my desktop (say once a month) and use it as my main nodejs development rig. I've yet to run into something similar.
Here is the trigger I was able to find: the project I am working on calls gulp-install
to install npm dependencies in a subdirectory. The install process spawns a lot of child processes, probably too fast, thus Error: spawn EAGAIN
is reported.
child_process.js:927
throw errnoException(process._errno, 'spawn');
^
Error: spawn EAGAIN
at errnoException (child_process.js:980:11)
at ChildProcess.spawn (child_process.js:927:11)
at Object.exports.spawn (child_process.js:715:9)
at /Users/bajtos/src/strong/studio/node_modules/gulp-install/lib/commandRunner.js:11:28
at /Users/bajtos/src/strong/studio/node_modules/gulp-install/node_modules/which/which.js:55:18
at Object.oncomplete (fs.js:107:15)
After that, process.title="..."
hangs.
@bajtos We're going off topic here, but I'm guessing your hitting your ulimit. Your ps aux
should be pretty long. If you have further issues I'm suggesting you ask at the nodejs mailing list.
I managed to write an example that is reliably reproducing the problem. Let's move the discussion to a new bug.
hey @bajtos the Apple guys has requested the following info, could you please help me with it? ;)
Engineering has requested the following information in order to further investigate the issue:
Do you have any crashlogs for launchservicesd, or could you attach a sysdiagnose of a machine in this situation?
Please provide your response or results by updating your bug report.
Please compress any bundled files (e.g. nested folders) prior to uploading.
Do you have any crashlogs for launchservicesd,
I don't know, where shall I look for them?
or could you attach a sysdiagnose of a machine in this situation?
So the idea is to run the fork bomb until process.title
hangs the node process; and then run sysdiagnose
?
I have no idea, let's just submit sysdiagnose
output right when the process.title
hangs.
@indutny I've sent you a link to Google Drive document with the sysdiagnose output. Let me know if you can download it.
Thank you @bajtos ! Could you please add fedor.indutny@gmail.com
to a share list?
Could you please add fedor.indutny@gmail.com to a share list?
Done.
Thank you!
No problem, I am glad to help.
@bajtos
Engineering has requested the following information in order to further investigate the issue:
Was this sysdiagnose taken when a machine was in the state that all applications were hung inside LSApplicationCheckIn?
Please provide your response or results by updating your bug report.
Please compress any bundled files (e.g. nested folders) prior to uploading.
I assume - "yes", but asking here just in case.
Actually no, I killed the hanging app. I'll create a new sysdiagnose then, probably early next week.
Here is what I did:
Run the script to reproduce the problem, wait for "set process title" freezing the process
Starting the fork bomb.
--SPAWN-FAILED--
{ [Error: spawn EAGAIN] code: 'EAGAIN', errno: 'EAGAIN', syscall: 'spawn' }
My PID is 14932
Going to set the process title
ps x
to workps x
and kill
few bomber processessysdiagnose
(the frozen process is still up)The result is on Google Drive again, shared with fedor.indutny@gmail.com.
Now I can do a hard restart of my machine again.
Thank you, @bajtos !
Recently I started to experience a problem with
npm
, where after certain number of invocations the script not longer works, it hangs forever.I managed to track down the problem to this line in
bin/npm-cli.js
:When I add console logs before and after the line, the first log is printed but the second is not.
Once this problem occurs for the first time, every run of
npm
hangs until the machine is rebooted. In fact, any Node.js script callingprocess.title=value
hangs too.I did not manage to figure out what condition or actions triggers the problem.
Node version: v0.10.31, v0.10.24 npm version: 1.4.23, 1.3.21 Platform: OSX 10.9.4