{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/18887","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18887/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18887/comments","events_url":"https://api.github.com/repos/golang/go/issues/18887/events","html_url":"https://github.com/golang/go/issues/18887","id":204726347,"number":18887,"title":"net: ExecIO invalid number of bytes written","user":{"login":"bioothod","id":1847575,"avatar_url":"https://avatars.githubusercontent.com/u/1847575?v=3","gravatar_id":"","url":"https://api.github.com/users/bioothod","html_url":"https://github.com/bioothod","followers_url":"https://api.github.com/users/bioothod/followers","following_url":"https://api.github.com/users/bioothod/following{/other_user}","gists_url":"https://api.github.com/users/bioothod/gists{/gist_id}","starred_url":"https://api.github.com/users/bioothod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bioothod/subscriptions","organizations_url":"https://api.github.com/users/bioothod/orgs","repos_url":"https://api.github.com/users/bioothod/repos","events_url":"https://api.github.com/users/bioothod/events{/privacy}","received_events_url":"https://api.github.com/users/bioothod/received_events","type":"User","site_admin":false},"labels":[{"id":373402289,"url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false},{"id":199753992,"url":"https://api.github.com/repos/golang/go/labels/OS-Windows","name":"OS-Windows","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1132,"closed_issues":673,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2017-02-04T02:31:46Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":34,"created_at":"2017-02-01T22:34:19Z","updated_at":"2017-02-04T18:33:30Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n### What version of Go are you using (`go version`)?\r\ngo version devel +ffedff7 Sun Jan 8 00:01:30 2017 +0000 linux/amd64\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\nIt is linux, but go was cross-compiled for windows\r\n\r\nWhile debugging bug in grpc-go server bugs https://github.com/grpc/grpc-go/issues/1054 I added several debug prints to find out why `bufio.Flush()` sometimes returns `short write` error when flushing data into http2 connection, in particular, I checked number of bytes returned from `netFD.Write()` method, and although most of the time it returned smaller number of bytes than buffer size, I got this error once:\r\n```\r\nWrite: ExecIO: n: 38, len: 33\r\n```\r\n\r\nI.e. `len(buf)` in this method returns 33, but `ExecIO` returned 38.\r\n\r\nHow is it possible?"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/277465355","html_url":"https://github.com/golang/go/issues/18887#issuecomment-277465355","issue_url":"https://api.github.com/repos/golang/go/issues/18887","id":277465355,"user":{"login":"bioothod","id":1847575,"avatar_url":"https://avatars.githubusercontent.com/u/1847575?v=3","gravatar_id":"","url":"https://api.github.com/users/bioothod","html_url":"https://github.com/bioothod","followers_url":"https://api.github.com/users/bioothod/followers","following_url":"https://api.github.com/users/bioothod/following{/other_user}","gists_url":"https://api.github.com/users/bioothod/gists{/gist_id}","starred_url":"https://api.github.com/users/bioothod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bioothod/subscriptions","organizations_url":"https://api.github.com/users/bioothod/orgs","repos_url":"https://api.github.com/users/bioothod/repos","events_url":"https://api.github.com/users/bioothod/events{/privacy}","received_events_url":"https://api.github.com/users/bioothod/received_events","type":"User","site_admin":false},"created_at":"2017-02-04T18:33:30Z","updated_at":"2017-02-04T18:33:30Z","body":"Well, I started to debug wine to find out why `WSASend()` returns invalid number of bytes already, so far no info to share though, but windows itself clearly warns against simultaneously using `lpOverlapped` and `lpNumberOfBytesSent` which can produce error\r\n>lpNumberOfBytesSent [out]\r\n>>A pointer to the number, in bytes, sent by this call if the I/O operation completes immediately.\r\n>>Use NULL for this parameter if the lpOverlapped parameter is not NULL to avoid potentially erroneous results. This parameter can be NULL only if the lpOverlapped parameter is not NULL."}}
{"actor":{"display_login":"bioothod"}}