{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/31927","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/31927/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/31927/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/31927/events","html_url":"https://github.com/dotnet/corefx/issues/31927","id":353589091,"node_id":"MDU6SXNzdWUzNTM1ODkwOTE=","number":31927,"title":"Work around EPROTOTYPE race condition on macOS","user":{"login":"halter73","id":54385,"node_id":"MDQ6VXNlcjU0Mzg1","avatar_url":"https://avatars3.githubusercontent.com/u/54385?v=4","gravatar_id":"","url":"https://api.github.com/users/halter73","html_url":"https://github.com/halter73","followers_url":"https://api.github.com/users/halter73/followers","following_url":"https://api.github.com/users/halter73/following{/other_user}","gists_url":"https://api.github.com/users/halter73/gists{/gist_id}","starred_url":"https://api.github.com/users/halter73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halter73/subscriptions","organizations_url":"https://api.github.com/users/halter73/orgs","repos_url":"https://api.github.com/users/halter73/repos","events_url":"https://api.github.com/users/halter73/events{/privacy}","received_events_url":"https://api.github.com/users/halter73/received_events","type":"User","site_admin":false},"labels":[{"id":497898539,"node_id":"MDU6TGFiZWw0OTc4OTg1Mzk=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net.Sockets","name":"area-System.Net.Sockets","color":"d4c5f9","default":false},{"id":145399955,"node_id":"MDU6TGFiZWwxNDUzOTk5NTU=","url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5","default":true},{"id":174911469,"node_id":"MDU6TGFiZWwxNzQ5MTE0Njk=","url":"https://api.github.com/repos/dotnet/corefx/labels/needs%20more%20info","name":"needs more info","color":"eb6420","default":false},{"id":205613895,"node_id":"MDU6TGFiZWwyMDU2MTM4OTU=","url":"https://api.github.com/repos/dotnet/corefx/labels/os-mac-os-x","name":"os-mac-os-x","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-23T23:20:49Z","updated_at":"2018-09-19T17:53:45Z","closed_at":null,"author_association":"NONE","body":"There are some [flaky tests in Kestrel](https://github.com/aspnet/KestrelHttpServer/issues/2764) that are caused by a race condition on macOS since at least Yosemite where EPROTOTYPE will sometimes be raised instead of EPIPE when sends occur during connection teardown. This results in a SocketError.ProtocolType being raised instead of the expected SocketError.Shutdown from Socket.SendAsync().\r\n\r\nThis was [fixed in libuv](https://github.com/libuv/libuv/pull/482) 3 years ago by retrying the write operation. You can find more background info about this issue [here](https://github.com/gevent/gevent/pull/1033)."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/422898387","html_url":"https://github.com/dotnet/corefx/issues/31927#issuecomment-422898387","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/31927","id":422898387,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjg5ODM4Nw==","user":{"login":"halter73","id":54385,"node_id":"MDQ6VXNlcjU0Mzg1","avatar_url":"https://avatars3.githubusercontent.com/u/54385?v=4","gravatar_id":"","url":"https://api.github.com/users/halter73","html_url":"https://github.com/halter73","followers_url":"https://api.github.com/users/halter73/followers","following_url":"https://api.github.com/users/halter73/following{/other_user}","gists_url":"https://api.github.com/users/halter73/gists{/gist_id}","starred_url":"https://api.github.com/users/halter73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halter73/subscriptions","organizations_url":"https://api.github.com/users/halter73/orgs","repos_url":"https://api.github.com/users/halter73/repos","events_url":"https://api.github.com/users/halter73/events{/privacy}","received_events_url":"https://api.github.com/users/halter73/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T17:53:45Z","updated_at":"2018-09-19T17:53:45Z","author_association":"NONE","body":"It is reproducible in 10.12 (this is the version of macOS the last agent we've seen this error was running) and very well could have been an issue before 10.10, but that's the timeframe when it was first reported to libuv.\r\n\r\nThis is a race condition that occurs when send a connection reset occur simultaneously, so it requires a loop to repro. [Here's](https://github.com/libuv/libuv/pull/482#issuecomment-131944594) a repro written in C against sys/socket.h. [This](http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/) is the very detailed blog post from the original finder of the bug four years ago that tracks the bug all the way to the offending kernel code."}}
{"actor":{"display_login":"halter73"}}