{"action":"created","issue":{"url":"https://api.github.com/repos/python/cpython/issues/3895","repository_url":"https://api.github.com/repos/python/cpython","labels_url":"https://api.github.com/repos/python/cpython/issues/3895/labels{/name}","comments_url":"https://api.github.com/repos/python/cpython/issues/3895/comments","events_url":"https://api.github.com/repos/python/cpython/issues/3895/events","html_url":"https://github.com/python/cpython/pull/3895","id":263030865,"number":3895,"title":"bpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error","user":{"login":"tomMoral","id":3321081,"avatar_url":"https://avatars0.githubusercontent.com/u/3321081?v=4","gravatar_id":"","url":"https://api.github.com/users/tomMoral","html_url":"https://github.com/tomMoral","followers_url":"https://api.github.com/users/tomMoral/followers","following_url":"https://api.github.com/users/tomMoral/following{/other_user}","gists_url":"https://api.github.com/users/tomMoral/gists{/gist_id}","starred_url":"https://api.github.com/users/tomMoral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomMoral/subscriptions","organizations_url":"https://api.github.com/users/tomMoral/orgs","repos_url":"https://api.github.com/users/tomMoral/repos","events_url":"https://api.github.com/users/tomMoral/events{/privacy}","received_events_url":"https://api.github.com/users/tomMoral/received_events","type":"User","site_admin":false},"labels":[{"id":666979821,"url":"https://api.github.com/repos/python/cpython/labels/awaiting%20review","name":"awaiting review","color":"fbca04","default":false},{"id":536945472,"url":"https://api.github.com/repos/python/cpython/labels/CLA%20signed","name":"CLA signed","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-05T07:41:25Z","updated_at":"2017-10-05T17:22:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/3895","html_url":"https://github.com/python/cpython/pull/3895","diff_url":"https://github.com/python/cpython/pull/3895.diff","patch_url":"https://github.com/python/cpython/pull/3895.patch"},"body":"When using `concurrent.futures.ProcessPoolExecutor` with objects that are not picklable or unpicklable, several situations results in a deadlock, with the interpreter freezed.\r\n\r\nThis is the case for different scenario, for instance these [three scripts](https://gist.github.com/tomMoral/cc27a938d669edcf0286c57516942369). This PR propose to test the different failure scenario and fix the ones that results on deadlocks.\r\n\r\nOverall, the goal is to make `concurrent.futures.ProcessPoolExecutor` more robust to faulty user code.\r\n\r\nThis work was done as part of the tommoral/loky#48 with the intent to re-use the executor in multiple independent part of the program, in collaboration with @ogrisel. See #1013 for more the details.\r\n\r\n\r\n\r\n<!-- issue-number: bpo-31699 -->\r\nhttps://bugs.python.org/issue31699\r\n<!-- /issue-number -->\r\n"},"comment":{"url":"https://api.github.com/repos/python/cpython/issues/comments/334533815","html_url":"https://github.com/python/cpython/pull/3895#issuecomment-334533815","issue_url":"https://api.github.com/repos/python/cpython/issues/3895","id":334533815,"user":{"login":"tomMoral","id":3321081,"avatar_url":"https://avatars0.githubusercontent.com/u/3321081?v=4","gravatar_id":"","url":"https://api.github.com/users/tomMoral","html_url":"https://github.com/tomMoral","followers_url":"https://api.github.com/users/tomMoral/followers","following_url":"https://api.github.com/users/tomMoral/following{/other_user}","gists_url":"https://api.github.com/users/tomMoral/gists{/gist_id}","starred_url":"https://api.github.com/users/tomMoral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomMoral/subscriptions","organizations_url":"https://api.github.com/users/tomMoral/orgs","repos_url":"https://api.github.com/users/tomMoral/repos","events_url":"https://api.github.com/users/tomMoral/events{/privacy}","received_events_url":"https://api.github.com/users/tomMoral/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T17:22:32Z","updated_at":"2017-10-05T17:22:32Z","author_association":"CONTRIBUTOR","body":"After thinking a bit, my main concern about safe pickling/unpickling of `_ResultItem/_CallItem` is with the fact that we are agnostic of the `Pickler` objects used in the `call_queue` and `results_queue`. This should be the `_ForkingPickler`, but this could be changed, depending on the context, as we do in the `loky` project. So I am not sure if it is the right solution."}}
{"actor":{"display_login":"tomMoral"}}