{"action":"created","issue":{"url":"https://api.github.com/repos/mono/mono/issues/8350","repository_url":"https://api.github.com/repos/mono/mono","labels_url":"https://api.github.com/repos/mono/mono/issues/8350/labels{/name}","comments_url":"https://api.github.com/repos/mono/mono/issues/8350/comments","events_url":"https://api.github.com/repos/mono/mono/issues/8350/events","html_url":"https://github.com/mono/mono/issues/8350","id":316008042,"node_id":"MDU6SXNzdWUzMTYwMDgwNDI=","number":8350,"title":"UnobservedTaskException - ObjectDisposedException in MobileAuthenticatedStream","user":{"login":"bocciab","id":28934191,"node_id":"MDQ6VXNlcjI4OTM0MTkx","avatar_url":"https://avatars3.githubusercontent.com/u/28934191?v=4","gravatar_id":"","url":"https://api.github.com/users/bocciab","html_url":"https://github.com/bocciab","followers_url":"https://api.github.com/users/bocciab/followers","following_url":"https://api.github.com/users/bocciab/following{/other_user}","gists_url":"https://api.github.com/users/bocciab/gists{/gist_id}","starred_url":"https://api.github.com/users/bocciab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocciab/subscriptions","organizations_url":"https://api.github.com/users/bocciab/orgs","repos_url":"https://api.github.com/users/bocciab/repos","events_url":"https://api.github.com/users/bocciab/events{/privacy}","received_events_url":"https://api.github.com/users/bocciab/received_events","type":"User","site_admin":false},"labels":[{"id":778638475,"node_id":"MDU6TGFiZWw3Nzg2Mzg0NzU=","url":"https://api.github.com/repos/mono/mono/labels/area-BCL:%20System","name":"area-BCL: System","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mono/mono/milestones/6","html_url":"https://github.com/mono/mono/milestone/6","labels_url":"https://api.github.com/repos/mono/mono/milestones/6/labels","id":3090157,"node_id":"MDk6TWlsZXN0b25lMzA5MDE1Nw==","number":6,"title":"2018-02 (5.12.xx)","description":"","creator":{"login":"luhenry","id":660779,"node_id":"MDQ6VXNlcjY2MDc3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/660779?v=4","gravatar_id":"","url":"https://api.github.com/users/luhenry","html_url":"https://github.com/luhenry","followers_url":"https://api.github.com/users/luhenry/followers","following_url":"https://api.github.com/users/luhenry/following{/other_user}","gists_url":"https://api.github.com/users/luhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/luhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luhenry/subscriptions","organizations_url":"https://api.github.com/users/luhenry/orgs","repos_url":"https://api.github.com/users/luhenry/repos","events_url":"https://api.github.com/users/luhenry/events{/privacy}","received_events_url":"https://api.github.com/users/luhenry/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":232,"state":"open","created_at":"2018-02-05T16:32:57Z","updated_at":"2018-09-26T15:46:10Z","due_on":"3018-02-01T08:00:00Z","closed_at":null},"comments":19,"created_at":"2018-04-19T19:23:44Z","updated_at":"2018-09-26T21:49:09Z","closed_at":"2018-04-21T21:45:16Z","author_association":"NONE","body":"In the last week, we've had 59,891 distinct devices encounter it a total of 282,388 times. It appears this affects 4.0 and 4.2.1:\r\n\r\n```\r\n[Events]\r\nSource: UnobservedTaskException\r\n\r\n[Exception]\r\n\r\nSystem.ObjectDisposedException: Cannot access a disposed object.\r\nObject name: 'MobileAuthenticatedStream'.\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.2.1.28/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 \r\n  at Mono.Net.Security.MobileAuthenticatedStream+<StartOperation>d__58.MoveNext () [0x001b9] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.2.1.28/src/Xamarin.Mac/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:\r\n```\r\n----\r\n```\r\n[Events]\r\nSource: UnobservedTaskException\r\n\r\n[Exception]\r\n\r\nSystem.ObjectDisposedException: Cannot access a disposed object.\r\nObject name: 'MobileAuthenticatedStream'.\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 \r\n  at Mono.Net.Security.MobileAuthenticatedStream+<StartOperation>d__58.MoveNext () [0x001b9] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:380 \r\n```\r\n\r\nI don't have a specific repro, because the stack trace is incomplete due to being an unobserved task. We had reported this on https://bugzilla.xamarin.com/show_bug.cgi?id=61002, but that was closed without fully resolving our issue.\r\n\r\nThis could also be related to the following: \r\nhttps://bugzilla.xamarin.com/show_bug.cgi?id=55872 - Similar error, but not in an async/await context\r\nhttps://github.com/mono/mono/issues/6422 - Similar error, but not in an async/await context\r\nhttps://github.com/mono/mono/pull/6125 - suggested as a fix for some of the above, but I can't find it in any releases?\r\n\r\nI can't find any of those in any current or upcoming release notes, though and I can't confirm they are related beyond having similar errors.\r\n"},"comment":{"url":"https://api.github.com/repos/mono/mono/issues/comments/424881274","html_url":"https://github.com/mono/mono/issues/8350#issuecomment-424881274","issue_url":"https://api.github.com/repos/mono/mono/issues/8350","id":424881274,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDg4MTI3NA==","user":{"login":"brendanzagaeski","id":4934473,"node_id":"MDQ6VXNlcjQ5MzQ0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/4934473?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzagaeski","html_url":"https://github.com/brendanzagaeski","followers_url":"https://api.github.com/users/brendanzagaeski/followers","following_url":"https://api.github.com/users/brendanzagaeski/following{/other_user}","gists_url":"https://api.github.com/users/brendanzagaeski/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzagaeski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzagaeski/subscriptions","organizations_url":"https://api.github.com/users/brendanzagaeski/orgs","repos_url":"https://api.github.com/users/brendanzagaeski/repos","events_url":"https://api.github.com/users/brendanzagaeski/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzagaeski/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T21:49:09Z","updated_at":"2018-09-26T21:49:09Z","author_association":"CONTRIBUTOR","body":"> Maybe it is related to using websocket-sharp library, which uses Begin/End Read IAsyncResult pattern. These are implemented using tasks, but probably not observed?\r\n\r\nAppearances of unobserved exceptions from `MobileAuthenticatedStream` could indeed be caused by calls that use `NetworkStream` via some code path other than `HttpClient.SendAsync()`. Any library that interacts with network streams directly rather than via higher level APIs would need to ensure that it called `EndWrite()`. If by chance anyone has a test case they can provide where one of the higher level APIs is leading to unobserved task exceptions, please do open a new issue and attach it so the team can take a look. Thanks!"}}
{"actor":{"display_login":"brendanzagaeski"}}