GitHub PullRequestReviewCommentEvent at 2014-12-14 08:51:37
Repository: rfcs
Actor: thestinger
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/21794832","id":21794832,"diff_hunk":"@@ -0,0 +1,63 @@\n+- Start Date: 2014-12-12\n+- RFC PR: (leave this empty)\n+- Rust Issue: (leave this empty)\n+\n+# Summary\n+\n+Currently, a spawned task that panics does not abort the process. A panic on a task is simply silently discarded. This is inappropriate behaviour, as the user's program may not be in a desired working state (a sort of zombie process). Instead, failing tasks should fail the entire process unless explicitly opted out of.\n+\n+# Motivation\n+\n+Defaulting to abort improves Rust's correctness, as programmers will have a harder time \"forgetting\" to handle panics from other tasks. Other systems, such as the Microsoft .NET platform, made the same mistake of silently ignoring background exceptions. For version 2, they made a breaking change to fix this behaviour, presumably because swallowing errors led to buggy programs.\n+\n+Changing this also makes Rust's behaviour more uniform. Having a task abort only if it panics twice, but silently ignore if it only panics once does not seem very elegant.\n+\n+Rust can rely on poisoning to abort related tasks. This allows, say, tasks sharing a mutex to all panic when acquiring the mutex after one task has panicked. This may eventually cause the entire program to crash. Relying on this behaviour may be somewhat non-deterministic, and also relies on every shared struct to support poisoning. This is complementary behaviour, but a: should be opt-in, in the case of a program being unwind-safe and wanting to continue to use the e.g. mutex after a panic, b: does not replace the need for the default behaviour to abort.","path":"0000-panic-default-abort.md","position":15,"original_position":15,"commit_id":"6a2397de90bed326c12165e28b1718339333f5da","original_commit_id":"6a2397de90bed326c12165e28b1718339333f5da","user":{"login":"thestinger","id":1505226,"avatar_url":"https://avatars.githubusercontent.com/u/1505226?v=3","gravatar_id":"","url":"https://api.github.com/users/thestinger","html_url":"https://github.com/thestinger","followers_url":"https://api.github.com/users/thestinger/followers","following_url":"https://api.github.com/users/thestinger/following{/other_user}","gists_url":"https://api.github.com/users/thestinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thestinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thestinger/subscriptions","organizations_url":"https://api.github.com/users/thestinger/orgs","repos_url":"https://api.github.com/users/thestinger/repos","events_url":"https://api.github.com/users/thestinger/events{/privacy}","received_events_url":"https://api.github.com/users/thestinger/received_events","type":"User","site_admin":false},"body":">  But mutex has to go out of its way to support poisoning. A non-poisoning mutex would simply be unlocked on panic - no inconsistencies right?\r\n\r\nNo. The poisoning is there because otherwise all other data structures would need to support continued use after a panic unwinds through their code.","created_at":"2014-12-14T08:51:37Z","updated_at":"2014-12-14T08:51:37Z","html_url":"https://github.com/rust-lang/rfcs/pull/519#discussion_r21794832","pull_request_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/519","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/21794832"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/519#discussion_r21794832"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/519"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/519","id":26015138,"html_url":"https://github.com/rust-lang/rfcs/pull/519","diff_url":"https://github.com/rust-lang/rfcs/pull/519.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/519.patch","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/519","number":519,"state":"open","locked":false,"title":"Panicking tasks should abort process if not handled","user":{"login":"MichaelGG","id":429031,"avatar_url":"https://avatars.githubusercontent.com/u/429031?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelGG","html_url":"https://github.com/MichaelGG","followers_url":"https://api.github.com/users/MichaelGG/followers","following_url":"https://api.github.com/users/MichaelGG/following{/other_user}","gists_url":"https://api.github.com/users/MichaelGG/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelGG/subscriptions","organizations_url":"https://api.github.com/users/MichaelGG/orgs","repos_url":"https://api.github.com/users/MichaelGG/repos","events_url":"https://api.github.com/users/MichaelGG/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelGG/received_events","type":"User","site_admin":false},"body":"RFC for issue opened here: https://github.com/rust-lang/rust/issues/19610\r\n","created_at":"2014-12-13T01:52:19Z","updated_at":"2014-12-14T08:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"334c6078584532e45b2bfadf0b687b6cccfa01e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/519/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/519/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/519/comments","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/6a2397de90bed326c12165e28b1718339333f5da","head":{"label":"MichaelGG:master","ref":"master","sha":"6a2397de90bed326c12165e28b1718339333f5da","user":{"login":"MichaelGG","id":429031,"avatar_url":"https://avatars.githubusercontent.com/u/429031?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelGG","html_url":"https://github.com/MichaelGG","followers_url":"https://api.github.com/users/MichaelGG/followers","following_url":"https://api.github.com/users/MichaelGG/following{/other_user}","gists_url":"https://api.github.com/users/MichaelGG/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelGG/subscriptions","organizations_url":"https://api.github.com/users/MichaelGG/orgs","repos_url":"https://api.github.com/users/MichaelGG/repos","events_url":"https://api.github.com/users/MichaelGG/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelGG/received_events","type":"User","site_admin":false},"repo":{"id":27944529,"name":"rfcs","full_name":"MichaelGG/rfcs","owner":{"login":"MichaelGG","id":429031,"avatar_url":"https://avatars.githubusercontent.com/u/429031?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelGG","html_url":"https://github.com/MichaelGG","followers_url":"https://api.github.com/users/MichaelGG/followers","following_url":"https://api.github.com/users/MichaelGG/following{/other_user}","gists_url":"https://api.github.com/users/MichaelGG/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelGG/subscriptions","organizations_url":"https://api.github.com/users/MichaelGG/orgs","repos_url":"https://api.github.com/users/MichaelGG/repos","events_url":"https://api.github.com/users/MichaelGG/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelGG/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichaelGG/rfcs","description":"RFCs for changes to Rust","fork":true,"url":"https://api.github.com/repos/MichaelGG/rfcs","forks_url":"https://api.github.com/repos/MichaelGG/rfcs/forks","keys_url":"https://api.github.com/repos/MichaelGG/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichaelGG/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichaelGG/rfcs/teams","hooks_url":"https://api.github.com/repos/MichaelGG/rfcs/hooks","issue_events_url":"https://api.github.com/repos/MichaelGG/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/MichaelGG/rfcs/events","assignees_url":"https://api.github.com/repos/MichaelGG/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/MichaelGG/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/MichaelGG/rfcs/tags","blobs_url":"https://api.github.com/repos/MichaelGG/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichaelGG/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichaelGG/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichaelGG/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichaelGG/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/MichaelGG/rfcs/languages","stargazers_url":"https://api.github.com/repos/MichaelGG/rfcs/stargazers","contributors_url":"https://api.github.com/repos/MichaelGG/rfcs/contributors","subscribers_url":"https://api.github.com/repos/MichaelGG/rfcs/subscribers","subscription_url":"https://api.github.com/repos/MichaelGG/rfcs/subscription","commits_url":"https://api.github.com/repos/MichaelGG/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichaelGG/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichaelGG/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichaelGG/rfcs/issues/comments/{number}","contents_url":"https://api.github.com/repos/MichaelGG/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/MichaelGG/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichaelGG/rfcs/merges","archive_url":"https://api.github.com/repos/MichaelGG/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichaelGG/rfcs/downloads","issues_url":"https://api.github.com/repos/MichaelGG/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/MichaelGG/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/MichaelGG/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/MichaelGG/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichaelGG/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/MichaelGG/rfcs/releases{/id}","created_at":"2014-12-13T00:57:04Z","updated_at":"2014-12-13T00:23:01Z","pushed_at":"2014-12-13T01:51:13Z","git_url":"git://github.com/MichaelGG/rfcs.git","ssh_url":"git@github.com:MichaelGG/rfcs.git","clone_url":"https://github.com/MichaelGG/rfcs.git","svn_url":"https://github.com/MichaelGG/rfcs","homepage":"","size":864,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"3436244877bbbe267d0e974a8155098a833c322b","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":17527989,"name":"rfcs","full_name":"rust-lang/rfcs","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rfcs","description":"RFCs for changes to Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rfcs","forks_url":"https://api.github.com/repos/rust-lang/rfcs/forks","keys_url":"https://api.github.com/repos/rust-lang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rfcs/teams","hooks_url":"https://api.github.com/repos/rust-lang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rfcs/events","assignees_url":"https://api.github.com/repos/rust-lang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rfcs/tags","blobs_url":"https://api.github.com/repos/rust-lang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rfcs/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rfcs/subscription","commits_url":"https://api.github.com/repos/rust-lang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rfcs/merges","archive_url":"https://api.github.com/repos/rust-lang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rfcs/downloads","issues_url":"https://api.github.com/repos/rust-lang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rfcs/releases{/id}","created_at":"2014-03-07T21:29:00Z","updated_at":"2014-12-14T03:43:42Z","pushed_at":"2014-12-11T23:07:24Z","git_url":"git://github.com/rust-lang/rfcs.git","ssh_url":"git@github.com:rust-lang/rfcs.git","clone_url":"https://github.com/rust-lang/rfcs.git","svn_url":"https://github.com/rust-lang/rfcs","homepage":"","size":5429,"stargazers_count":194,"watchers_count":194,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":201,"forks":130,"open_issues":201,"watchers":194,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/519"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/519"},"issue":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/519"},"comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/519/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/519/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/519/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rfcs/statuses/6a2397de90bed326c12165e28b1718339333f5da"}}}}