{"action":"created","issue":{"url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/59","repository_url":"https://api.github.com/repos/zonyitoo/coio-rs","labels_url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/59/comments","events_url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/59/events","html_url":"https://github.com/zonyitoo/coio-rs/issues/59","id":164715137,"number":59,"title":"Connections might be silentrly not served","user":{"login":"redbaron","id":16624,"avatar_url":"https://avatars.githubusercontent.com/u/16624?v=3","gravatar_id":"","url":"https://api.github.com/users/redbaron","html_url":"https://github.com/redbaron","followers_url":"https://api.github.com/users/redbaron/followers","following_url":"https://api.github.com/users/redbaron/following{/other_user}","gists_url":"https://api.github.com/users/redbaron/gists{/gist_id}","starred_url":"https://api.github.com/users/redbaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redbaron/subscriptions","organizations_url":"https://api.github.com/users/redbaron/orgs","repos_url":"https://api.github.com/users/redbaron/repos","events_url":"https://api.github.com/users/redbaron/events{/privacy}","received_events_url":"https://api.github.com/users/redbaron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-10T13:13:41Z","updated_at":"2016-07-10T15:47:06Z","closed_at":null,"body":"On current master (7d12511cb8440b189), simple echo server might \"forget\" to serve response to certain clients, no erros are reported on server side, tcp connection is not dropped either.\r\n\r\nThis is very racey and you might need to play with params to trigger it more or less reliably on your machines. Params I am using in my Core i3 M370 (2 cores + 2 HT):\r\n\r\nserver:\r\n```\r\ncd benchmark; cargo run --bin coio-tcp-echo-server --release -- --bind 127.0.0.1:3000 -t 2\r\n```\r\n\r\nclient:\r\n```\r\ncd benchmark; GOMAXPROCS=1 go run tcp_bench.go -c 3 -t 10 -a \"127.0.0.1:3000\" -l 4096 -d 10s\r\n```\r\nNew `-d` param specifies read/write timeout and was added in https://github.com/zonyitoo/coio-rs/pull/58\r\n\r\nOutput:\r\n```\r\n2016/07/10 14:01:52 read tcp 127.0.0.1:40988->127.0.0.1:3000: i/o timeout\r\n2016/07/10 14:01:52 read tcp 127.0.0.1:40990->127.0.0.1:3000: i/o timeout\r\nBenchmarking: 127.0.0.1:3000\r\n3 clients, running 4096 bytes, 30 sec.\r\n\r\nSpeed: 18879 request/sec, 18879 response/sec\r\nRequests: 566395\r\nResponses: 566393\r\n```\r\n\r\nIt is not happening on every run, but I found that it happens more often when client opens _less_ connections.\r\n\r\nUPD1: it is not a performance issue, set timeout to \"60s\", you'll see that test completes, no more active communication happens, yet few connections remain waiting to read data back indefinitely."},"comment":{"url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/comments/231595617","html_url":"https://github.com/zonyitoo/coio-rs/issues/59#issuecomment-231595617","issue_url":"https://api.github.com/repos/zonyitoo/coio-rs/issues/59","id":231595617,"user":{"login":"zonyitoo","id":1067951,"avatar_url":"https://avatars.githubusercontent.com/u/1067951?v=3","gravatar_id":"","url":"https://api.github.com/users/zonyitoo","html_url":"https://github.com/zonyitoo","followers_url":"https://api.github.com/users/zonyitoo/followers","following_url":"https://api.github.com/users/zonyitoo/following{/other_user}","gists_url":"https://api.github.com/users/zonyitoo/gists{/gist_id}","starred_url":"https://api.github.com/users/zonyitoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonyitoo/subscriptions","organizations_url":"https://api.github.com/users/zonyitoo/orgs","repos_url":"https://api.github.com/users/zonyitoo/repos","events_url":"https://api.github.com/users/zonyitoo/events{/privacy}","received_events_url":"https://api.github.com/users/zonyitoo/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T15:47:06Z","updated_at":"2016-07-10T15:47:06Z","body":"I found that it always hangs right at the last packet, and if you kill the `tcp_bench` at that time, `tcp-echo-server` will soon get a `Readable` event from Mio. So I think that is because I haven't handle the `Hup` and `Error` events from Mio.\r\n\r\nhttps://github.com/zonyitoo/coio-rs/blob/master/src/scheduler.rs#L151-L154"}}
{"actor":{"display_login":"zonyitoo"}}