{"action":"opened","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/4406","labels_url":"https://api.github.com/repos/nodejs/node/issues/4406/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4406/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/4406/events","html_url":"https://github.com/nodejs/node/issues/4406","id":123727555,"number":4406,"title":"Node hangs with FUTEX_WAIT_PRIVATE when calling child_process.spawn","user":{"login":"randunel","id":1965181,"avatar_url":"https://avatars.githubusercontent.com/u/1965181?v=3","gravatar_id":"","url":"https://api.github.com/users/randunel","html_url":"https://github.com/randunel","followers_url":"https://api.github.com/users/randunel/followers","following_url":"https://api.github.com/users/randunel/following{/other_user}","gists_url":"https://api.github.com/users/randunel/gists{/gist_id}","starred_url":"https://api.github.com/users/randunel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randunel/subscriptions","organizations_url":"https://api.github.com/users/randunel/orgs","repos_url":"https://api.github.com/users/randunel/repos","events_url":"https://api.github.com/users/randunel/events{/privacy}","received_events_url":"https://api.github.com/users/randunel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-23T21:47:20Z","updated_at":"2015-12-23T21:47:20Z","closed_at":null,"body":"I couldn't reduce the test case to less than 65 lines. Run [this code](https://gist.github.com/randunel/d74676cecebc872a177d) and you will notice that timeouts are not triggered, cpu usage 0, node hangs synchronously when calling child_process.spawn. `strace` shows hanging after `FUTEX_WAIT_PRIVATE`.\r\n\r\nThe weird parts:\r\n\r\n- commenting out any of the `fs`.* calls makes the code work\r\n- commenting out `child.stdout.on('end', cb)` makes the code work\r\n\r\nRun this\r\n\r\nhttps://gist.github.com/randunel/d74676cecebc872a177d\r\n\r\nAnd you will notice that [line 16](https://gist.github.com/randunel/d74676cecebc872a177d#file-testcase-js-L16) is never reached in the second call."}}