{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Common/pulls/comments/183250875","pull_request_review_id":114214524,"id":183250875,"diff_hunk":"@@ -77,6 +77,12 @@ protected void Dispose(bool disposing)\n                 _isActive = false;\n \n                 _disposedValue = true;\n+#if DEBUG\n+                if (_ownedBlocks != 0)\n+                {\n+                    throw new InvalidOperationException(\"MemoryPoolBlocks still outstanding!\");","path":"shared/Microsoft.Extensions.Buffers.Sources/MemoryPoolSlab.cs","position":null,"original_position":7,"commit_id":"cc7f7d6101eaa219a4e18268bbdb2f361421c923","original_commit_id":"cc7f7d6101eaa219a4e18268bbdb2f361421c923","user":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars0.githubusercontent.com/u/1697911?v=4","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"body":"Add blocks `Leaser`s to exception message.","created_at":"2018-04-22T20:50:16Z","updated_at":"2018-04-22T20:50:16Z","html_url":"https://github.com/aspnet/Common/pull/342#discussion_r183250875","pull_request_url":"https://api.github.com/repos/aspnet/Common/pulls/342","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments/183250875"},"html":{"href":"https://github.com/aspnet/Common/pull/342#discussion_r183250875"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Common/pulls/342"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Common/pulls/342","id":183263739,"html_url":"https://github.com/aspnet/Common/pull/342","diff_url":"https://github.com/aspnet/Common/pull/342.diff","patch_url":"https://github.com/aspnet/Common/pull/342.patch","issue_url":"https://api.github.com/repos/aspnet/Common/issues/342","number":342,"state":"open","locked":false,"title":"Don't unpin MemoryPoolSlab while in use","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"May cause heap corruption re: https://github.com/aspnet/Common/pull/332#discussion_r183229246\r\n\r\nCurrently it Unpins, then a block is returned which throws an ODE exception https://github.com/aspnet/KestrelHttpServer/issues/2486\r\n```\r\nLog Critical[0]: Unexpected exception in HttpConnection.ProcessRequestsAsync. System.ObjectDisposedException: Cannot access a disposed object.\r\n[20:27:03]\tObject name: 'MemoryPoolBlock'.\r\n[20:27:03]\tat System.Buffers.ThrowHelper.ThrowObjectDisposedException(ExceptionArgument argument) in D:\\b\\w\\1e8cd6334ef22651\\packages\\microsoft.extensions.buffers.sources\\2.1.0-preview3-32110\\contentFiles\\cs\\netstandard1.0\\Microsoft.Extensions.Buffers.Sources\\PipelinesThrowHelper.cs:line 51\r\n[20:27:03]\tat System.Buffers.MemoryPoolBlock.Dispose() in D:\\b\\w\\1e8cd6334ef22651\\packages\\microsoft.extensions.buffers.sources\\2.1.0-preview3-32110\\contentFiles\\cs\\netstandard1.0\\Microsoft.Extensions.Buffers.Sources\\MemoryPoolBlock.Release.cs:line 54\r\n[20:27:03]\tat System.IO.Pipelines.BufferSegment.ResetMemory()\r\n[20:27:03]\tat System.IO.Pipelines.Pipe.CompletePipe()\r\n[20:27:03]\tat System.IO.Pipelines.Pipe.CompleteWriter(Exception exception)\r\n[20:27:03]\tat Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.AdaptedPipeline.ReadInputAsync(Stream stream)\r\n[20:27:03]\tat Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.AdaptedPipeline.RunAsync(Stream stream) in D:\\b\\w\\1e8cd6334ef22651\\src\\Kestrel.Core\\Adapter\\Internal\\AdaptedPipeline.cs:line 45\r\n[20:27:03]\tat Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.ProcessRequestsAsync[TContext](IHttpApplication`1 httpApplication) in D:\\b\\w\\1e8cd6334ef22651\\src\\Kestrel.Core\\Internal\\HttpConnection.cs:line 183\r\n``` \r\nProbably bad things also happen as the data block would now be using unpinned memory, with a long previously captured pointer... Like heap corruption? https://github.com/aspnet/KestrelHttpServer/issues/2503 https://github.com/dotnet/coreclr/issues/17679\r\n\r\nNew spin on this; is the change https://github.com/aspnet/Common/pull/332 started throwing ODE exceptions, whereas previously it didn't do, so that may have been where the GC crash leading to hangs surfaced in the error handling/unwind?\r\n\r\nResolves https://github.com/aspnet/KestrelHttpServer/issues/2486 (Test timeout: MemoryPoolBlock ObjectDisposedException)\r\n\r\n/cc @pakrym @davidfowl @GrabYourPitchforks @mikeharder @jkotas","created_at":"2018-04-22T09:20:29Z","updated_at":"2018-04-22T20:50:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f5493a080b931f7185c88581cd61824ae24d581","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Common/pulls/342/commits","review_comments_url":"https://api.github.com/repos/aspnet/Common/pulls/342/comments","review_comment_url":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Common/issues/342/comments","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/cc7f7d6101eaa219a4e18268bbdb2f361421c923","head":{"label":"benaadams:MemoryBlock-Disposal-ODE","ref":"MemoryBlock-Disposal-ODE","sha":"cc7f7d6101eaa219a4e18268bbdb2f361421c923","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"repo":{"id":44432538,"name":"Common","full_name":"benaadams/Common","owner":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benaadams/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":true,"url":"https://api.github.com/repos/benaadams/Common","forks_url":"https://api.github.com/repos/benaadams/Common/forks","keys_url":"https://api.github.com/repos/benaadams/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benaadams/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benaadams/Common/teams","hooks_url":"https://api.github.com/repos/benaadams/Common/hooks","issue_events_url":"https://api.github.com/repos/benaadams/Common/issues/events{/number}","events_url":"https://api.github.com/repos/benaadams/Common/events","assignees_url":"https://api.github.com/repos/benaadams/Common/assignees{/user}","branches_url":"https://api.github.com/repos/benaadams/Common/branches{/branch}","tags_url":"https://api.github.com/repos/benaadams/Common/tags","blobs_url":"https://api.github.com/repos/benaadams/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benaadams/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benaadams/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/benaadams/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benaadams/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/benaadams/Common/languages","stargazers_url":"https://api.github.com/repos/benaadams/Common/stargazers","contributors_url":"https://api.github.com/repos/benaadams/Common/contributors","subscribers_url":"https://api.github.com/repos/benaadams/Common/subscribers","subscription_url":"https://api.github.com/repos/benaadams/Common/subscription","commits_url":"https://api.github.com/repos/benaadams/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/benaadams/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/benaadams/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/benaadams/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/benaadams/Common/contents/{+path}","compare_url":"https://api.github.com/repos/benaadams/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benaadams/Common/merges","archive_url":"https://api.github.com/repos/benaadams/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benaadams/Common/downloads","issues_url":"https://api.github.com/repos/benaadams/Common/issues{/number}","pulls_url":"https://api.github.com/repos/benaadams/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/benaadams/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/benaadams/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benaadams/Common/labels{/name}","releases_url":"https://api.github.com/repos/benaadams/Common/releases{/id}","deployments_url":"https://api.github.com/repos/benaadams/Common/deployments","created_at":"2015-10-17T10:16:08Z","updated_at":"2018-03-21T21:01:18Z","pushed_at":"2018-04-22T20:46:08Z","git_url":"git://github.com/benaadams/Common.git","ssh_url":"git@github.com:benaadams/Common.git","clone_url":"https://github.com/benaadams/Common.git","svn_url":"https://github.com/benaadams/Common","homepage":null,"size":2083,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":1,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"b31e410695210ea4144129f3243f2b114b144c13","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30932325,"name":"Common","full_name":"aspnet/Common","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":false,"url":"https://api.github.com/repos/aspnet/Common","forks_url":"https://api.github.com/repos/aspnet/Common/forks","keys_url":"https://api.github.com/repos/aspnet/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Common/teams","hooks_url":"https://api.github.com/repos/aspnet/Common/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Common/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Common/events","assignees_url":"https://api.github.com/repos/aspnet/Common/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Common/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Common/tags","blobs_url":"https://api.github.com/repos/aspnet/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Common/languages","stargazers_url":"https://api.github.com/repos/aspnet/Common/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Common/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Common/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Common/subscription","commits_url":"https://api.github.com/repos/aspnet/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Common/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Common/merges","archive_url":"https://api.github.com/repos/aspnet/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Common/downloads","issues_url":"https://api.github.com/repos/aspnet/Common/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Common/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Common/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Common/deployments","created_at":"2015-02-17T19:02:08Z","updated_at":"2018-04-20T23:03:42Z","pushed_at":"2018-04-22T20:46:10Z","git_url":"git://github.com/aspnet/Common.git","ssh_url":"git@github.com:aspnet/Common.git","clone_url":"https://github.com/aspnet/Common.git","svn_url":"https://github.com/aspnet/Common","homepage":null,"size":2759,"stargazers_count":116,"watchers_count":116,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":58,"open_issues":7,"watchers":116,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/342"},"html":{"href":"https://github.com/aspnet/Common/pull/342"},"issue":{"href":"https://api.github.com/repos/aspnet/Common/issues/342"},"comments":{"href":"https://api.github.com/repos/aspnet/Common/issues/342/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Common/pulls/342/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Common/pulls/342/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Common/statuses/cc7f7d6101eaa219a4e18268bbdb2f361421c923"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pakrym"}}