{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/13764","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/13764/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/13764/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/13764/events","html_url":"https://github.com/dotnet/coreclr/issues/13764","id":254805853,"number":13764,"title":"[Question] How to debug deadlock in Task?","user":{"login":"sillyousu","id":1446131,"avatar_url":"https://avatars0.githubusercontent.com/u/1446131?v=4","gravatar_id":"","url":"https://api.github.com/users/sillyousu","html_url":"https://github.com/sillyousu","followers_url":"https://api.github.com/users/sillyousu/followers","following_url":"https://api.github.com/users/sillyousu/following{/other_user}","gists_url":"https://api.github.com/users/sillyousu/gists{/gist_id}","starred_url":"https://api.github.com/users/sillyousu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sillyousu/subscriptions","organizations_url":"https://api.github.com/users/sillyousu/orgs","repos_url":"https://api.github.com/users/sillyousu/repos","events_url":"https://api.github.com/users/sillyousu/events{/privacy}","received_events_url":"https://api.github.com/users/sillyousu/received_events","type":"User","site_admin":false},"labels":[{"id":196940783,"url":"https://api.github.com/repos/dotnet/coreclr/labels/area-Diagnostics","name":"area-Diagnostics","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars0.githubusercontent.com/u/10454379?v=4","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false},"assignees":[{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars0.githubusercontent.com/u/10454379?v=4","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/coreclr/milestones/10","html_url":"https://github.com/dotnet/coreclr/milestone/10","labels_url":"https://api.github.com/repos/dotnet/coreclr/milestones/10/labels","id":2344332,"number":10,"title":"2.1.0","description":".NET Core 2.1, next major release. See [official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) for details.","creator":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"open_issues":143,"closed_issues":1084,"state":"open","created_at":"2017-02-23T20:40:02Z","updated_at":"2017-09-06T22:13:27Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2017-09-02T11:20:56Z","updated_at":"2017-09-06T22:17:45Z","closed_at":null,"author_association":"NONE","body":"Are there any tools/runtime infrastructure for debugging deadlock and Task hang?\r\n\r\n```csharp\r\nusing System;\r\nusing System.Threading.Tasks;\r\nusing System.Threading;\r\n\r\nnamespace Deadlock\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            SemaphoreSlim semaphore1 = new SemaphoreSlim(0);\r\n            SemaphoreSlim semaphore2 = new SemaphoreSlim(0);\r\n\r\n\r\n            var t1 = Task.Run(async () =>\r\n            {\r\n                await semaphore1.WaitAsync();\r\n                semaphore2.Release();\r\n            });\r\n\r\n\r\n            var t2 = Task.Run(async () =>\r\n            {\r\n                await semaphore2.WaitAsync();\r\n                semaphore1.Release();\r\n            });\r\n\r\n            Task.WaitAll(t1, t2);\r\n        }\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/327627667","html_url":"https://github.com/dotnet/coreclr/issues/13764#issuecomment-327627667","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/13764","id":327627667,"user":{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars0.githubusercontent.com/u/10454379?v=4","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false},"created_at":"2017-09-06T22:17:45Z","updated_at":"2017-09-06T22:17:45Z","author_association":"MEMBER","body":"I can't repro your problem with your program running on Ubuntu 14.04.  I'll try on my Centos VM.  \r\n\r\nNot sure why an older version (preview2) of createdump/runtime would work."}}
{"actor":{"display_login":"mikem8361"}}