{"action":"created","issue":{"url":"https://api.github.com/repos/docker/hyperkit/issues/62","repository_url":"https://api.github.com/repos/docker/hyperkit","labels_url":"https://api.github.com/repos/docker/hyperkit/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/docker/hyperkit/issues/62/comments","events_url":"https://api.github.com/repos/docker/hyperkit/issues/62/events","html_url":"https://github.com/docker/hyperkit/pull/62","id":180270422,"number":62,"title":"Flush any bufered data before closing the socket","user":{"login":"ijc25","id":12985729,"avatar_url":"https://avatars.githubusercontent.com/u/12985729?v=3","gravatar_id":"","url":"https://api.github.com/users/ijc25","html_url":"https://github.com/ijc25","followers_url":"https://api.github.com/users/ijc25/followers","following_url":"https://api.github.com/users/ijc25/following{/other_user}","gists_url":"https://api.github.com/users/ijc25/gists{/gist_id}","starred_url":"https://api.github.com/users/ijc25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijc25/subscriptions","organizations_url":"https://api.github.com/users/ijc25/orgs","repos_url":"https://api.github.com/users/ijc25/repos","events_url":"https://api.github.com/users/ijc25/events{/privacy}","received_events_url":"https://api.github.com/users/ijc25/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/hyperkit/labels/status/0-triage","name":"status/0-triage","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-30T10:22:56Z","updated_at":"2016-09-30T10:29:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/hyperkit/pulls/62","html_url":"https://github.com/docker/hyperkit/pull/62","diff_url":"https://github.com/docker/hyperkit/pull/62.diff","patch_url":"https://github.com/docker/hyperkit/pull/62.patch"},"body":"v7 of the vsock spec improved the semantics of the protocol on shutdown. Updating to those new semantics (in #59) has exposed a latent bug where TX data which was buffered could be lost because we did `shutdown(SHUT_WR)` on the Unix domain socket while there was still buffered data pending. Avoid this by deferring the `shutdown(SHUT_WR)` to the end of `buffer_drain`, using the difference between `sock->local_shutdown` and `sock->peer_shutdown` to know when this should be done.\r\n\r\nThere was also a crash because we would repeatedly receive `EPIPE` from the `write` in `buffer_drain` (because we were trying to write to a socket which had been closed in that direction) and hit `assert(s->local_shutdown != VIRTIO_VSOCK_FLAG_SHUTDOWN_ALL)` in `shutdown_local_sock`. The `tx_thread` should be ignoring a socket which has been `SHUT_WR`, so add a check on `local_shutdown`.\r\n\r\nSigned-off-by: Ian Campbell <ian.campbell@docker.com>"},"comment":{"url":"https://api.github.com/repos/docker/hyperkit/issues/comments/250712453","html_url":"https://github.com/docker/hyperkit/pull/62#issuecomment-250712453","issue_url":"https://api.github.com/repos/docker/hyperkit/issues/62","id":250712453,"user":{"login":"djs55","id":198586,"avatar_url":"https://avatars.githubusercontent.com/u/198586?v=3","gravatar_id":"","url":"https://api.github.com/users/djs55","html_url":"https://github.com/djs55","followers_url":"https://api.github.com/users/djs55/followers","following_url":"https://api.github.com/users/djs55/following{/other_user}","gists_url":"https://api.github.com/users/djs55/gists{/gist_id}","starred_url":"https://api.github.com/users/djs55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djs55/subscriptions","organizations_url":"https://api.github.com/users/djs55/orgs","repos_url":"https://api.github.com/users/djs55/repos","events_url":"https://api.github.com/users/djs55/events{/privacy}","received_events_url":"https://api.github.com/users/djs55/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T10:29:28Z","updated_at":"2016-09-30T10:29:28Z","body":"LGTM\r\n\r\nIf we wanted to test this would it suffice to `connect`/`accept` a connection, then `write` a message and immediately and `shutdown` from the client end and then verify that the message is received on the server end?"}}
{"actor":{"display_login":"djs55"}}