{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/7301","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/7301/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/7301/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/7301/events","html_url":"https://github.com/nodejs/node/issues/7301","id":160327667,"number":7301,"title":"Using the http module under certain network settings blocks fs","user":{"login":"napalm272","id":2146400,"avatar_url":"https://avatars.githubusercontent.com/u/2146400?v=3","gravatar_id":"","url":"https://api.github.com/users/napalm272","html_url":"https://github.com/napalm272","followers_url":"https://api.github.com/users/napalm272/followers","following_url":"https://api.github.com/users/napalm272/following{/other_user}","gists_url":"https://api.github.com/users/napalm272/gists{/gist_id}","starred_url":"https://api.github.com/users/napalm272/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napalm272/subscriptions","organizations_url":"https://api.github.com/users/napalm272/orgs","repos_url":"https://api.github.com/users/napalm272/repos","events_url":"https://api.github.com/users/napalm272/events{/privacy}","received_events_url":"https://api.github.com/users/napalm272/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc"},{"url":"https://api.github.com/repos/nodejs/node/labels/http","name":"http","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-15T02:49:06Z","updated_at":"2016-06-15T08:03:57Z","closed_at":null,"body":"* **Version**: 0.12.13, 4.0, 5.0\r\n* **Platform**: Mac OSX El Capitan, Ubuntu 14.04\r\n* **Subsystem**:\r\n\r\nThe `http` core module blocks file IO under certain network settings.  I can reproduce this 100% of the time on multiple Node versions and different operating systems.\r\n\r\n*Network settings:*\r\n1. Connect your computer to wifi, then unplug the internet ethernet cable from the router.  \r\n2. Do `ifconfig` on your computer, your should still have an ip address for wlan0 even though you don't have internet.\r\n\r\n*Code sample:*\r\n```\r\nvar path = require('path');\r\nvar http = require('http');\r\nvar fs = require('fs');\r\nvar stream = fs.createWriteStream(path.join(__dirname, 'testfile'));\r\n\r\nsetInterval(function(){\r\n    //do http request\r\n    http.get(\"http://httpbin.org/get\", function(res) {\r\n        console.log(\"Got response: \" + res.statusCode);\r\n    }).on('error', function(e) {\r\n        console.log(\"Got error: \" + e.message);\r\n    });\r\n\r\n    //write to file\r\n    stream.write('aaa\\n')\r\n}, 1000);\r\n```\r\n\r\nIf you run the code above under the setting I described, and tail `testfile`, then you should see 3 `aaa` before it stops writing to that file."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/226116576","html_url":"https://github.com/nodejs/node/issues/7301#issuecomment-226116576","issue_url":"https://api.github.com/repos/nodejs/node/issues/7301","id":226116576,"user":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T08:03:57Z","updated_at":"2016-06-15T08:03:57Z","body":"I'm relatively sure what happens if DNS queries get stalled and fill-up the threadpool, which is where fs operations run."}}
{"actor":{"display_login":"saghul"}}