{"action":"opened","number":241,"pull_request":{"url":"https://api.github.com/repos/Blosc/c-blosc/pulls/241","id":224526734,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NTI2NzM0","html_url":"https://github.com/Blosc/c-blosc/pull/241","diff_url":"https://github.com/Blosc/c-blosc/pull/241.diff","patch_url":"https://github.com/Blosc/c-blosc/pull/241.patch","issue_url":"https://api.github.com/repos/Blosc/c-blosc/issues/241","number":241,"state":"open","locked":false,"title":"Enable fork-safe operation via pthread_atfork hook.","user":{"login":"asford","id":282792,"node_id":"MDQ6VXNlcjI4Mjc5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/282792?v=4","gravatar_id":"","url":"https://api.github.com/users/asford","html_url":"https://github.com/asford","followers_url":"https://api.github.com/users/asford/followers","following_url":"https://api.github.com/users/asford/following{/other_user}","gists_url":"https://api.github.com/users/asford/gists{/gist_id}","starred_url":"https://api.github.com/users/asford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asford/subscriptions","organizations_url":"https://api.github.com/users/asford/orgs","repos_url":"https://api.github.com/users/asford/repos","events_url":"https://api.github.com/users/asford/events{/privacy}","received_events_url":"https://api.github.com/users/asford/received_events","type":"User","site_admin":false},"body":"The blosc global context object maintains a thread-pool and internal\nmutexs, and is unsafe to reused in a child process post fork. This\ncauses deadlocks in child processes post-fork, which affects any\nblosc-consuming libraries. The `_ctx` context apis (set_releasegil in\npython-blosc) provide a workaround, but have a non-zero overhead and are\nnon-default. (https://github.com/Blosc/bloscpack/issues/58)\n\nThis update provides fork-safety by discarding and reinitializing the\nglobal context in the post-fork child. The behavior \"leaks\" the previous\ncontext in the child by skipping cleanup, however the context object is\nalready in an invalid state and likely can't be reliably reused. \n\n* Add init with pthread_atfork hook.\n\n  Update blosc to reinitialize child global context post-fork,\n  discarding potentially inconsistent global context. Resolves issues with\n  deadlock-on-decompression in child process post fork if blosc has\n  already been initialized.\n\n* Add test for compressor fork-safety.","created_at":"2018-10-21T08:46:09Z","updated_at":"2018-10-21T08:46:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Blosc/c-blosc/pulls/241/commits","review_comments_url":"https://api.github.com/repos/Blosc/c-blosc/pulls/241/comments","review_comment_url":"https://api.github.com/repos/Blosc/c-blosc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Blosc/c-blosc/issues/241/comments","statuses_url":"https://api.github.com/repos/Blosc/c-blosc/statuses/4a3036cadeea979ffcf6a44b40bfb5d278344f8b","head":{"label":"asford:master","ref":"master","sha":"4a3036cadeea979ffcf6a44b40bfb5d278344f8b","user":{"login":"asford","id":282792,"node_id":"MDQ6VXNlcjI4Mjc5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/282792?v=4","gravatar_id":"","url":"https://api.github.com/users/asford","html_url":"https://github.com/asford","followers_url":"https://api.github.com/users/asford/followers","following_url":"https://api.github.com/users/asford/following{/other_user}","gists_url":"https://api.github.com/users/asford/gists{/gist_id}","starred_url":"https://api.github.com/users/asford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asford/subscriptions","organizations_url":"https://api.github.com/users/asford/orgs","repos_url":"https://api.github.com/users/asford/repos","events_url":"https://api.github.com/users/asford/events{/privacy}","received_events_url":"https://api.github.com/users/asford/received_events","type":"User","site_admin":false},"repo":{"id":153987926,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM5ODc5MjY=","name":"c-blosc","full_name":"asford/c-blosc","private":false,"owner":{"login":"asford","id":282792,"node_id":"MDQ6VXNlcjI4Mjc5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/282792?v=4","gravatar_id":"","url":"https://api.github.com/users/asford","html_url":"https://github.com/asford","followers_url":"https://api.github.com/users/asford/followers","following_url":"https://api.github.com/users/asford/following{/other_user}","gists_url":"https://api.github.com/users/asford/gists{/gist_id}","starred_url":"https://api.github.com/users/asford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asford/subscriptions","organizations_url":"https://api.github.com/users/asford/orgs","repos_url":"https://api.github.com/users/asford/repos","events_url":"https://api.github.com/users/asford/events{/privacy}","received_events_url":"https://api.github.com/users/asford/received_events","type":"User","site_admin":false},"html_url":"https://github.com/asford/c-blosc","description":"A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`.","fork":true,"url":"https://api.github.com/repos/asford/c-blosc","forks_url":"https://api.github.com/repos/asford/c-blosc/forks","keys_url":"https://api.github.com/repos/asford/c-blosc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asford/c-blosc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asford/c-blosc/teams","hooks_url":"https://api.github.com/repos/asford/c-blosc/hooks","issue_events_url":"https://api.github.com/repos/asford/c-blosc/issues/events{/number}","events_url":"https://api.github.com/repos/asford/c-blosc/events","assignees_url":"https://api.github.com/repos/asford/c-blosc/assignees{/user}","branches_url":"https://api.github.com/repos/asford/c-blosc/branches{/branch}","tags_url":"https://api.github.com/repos/asford/c-blosc/tags","blobs_url":"https://api.github.com/repos/asford/c-blosc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asford/c-blosc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asford/c-blosc/git/refs{/sha}","trees_url":"https://api.github.com/repos/asford/c-blosc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asford/c-blosc/statuses/{sha}","languages_url":"https://api.github.com/repos/asford/c-blosc/languages","stargazers_url":"https://api.github.com/repos/asford/c-blosc/stargazers","contributors_url":"https://api.github.com/repos/asford/c-blosc/contributors","subscribers_url":"https://api.github.com/repos/asford/c-blosc/subscribers","subscription_url":"https://api.github.com/repos/asford/c-blosc/subscription","commits_url":"https://api.github.com/repos/asford/c-blosc/commits{/sha}","git_commits_url":"https://api.github.com/repos/asford/c-blosc/git/commits{/sha}","comments_url":"https://api.github.com/repos/asford/c-blosc/comments{/number}","issue_comment_url":"https://api.github.com/repos/asford/c-blosc/issues/comments{/number}","contents_url":"https://api.github.com/repos/asford/c-blosc/contents/{+path}","compare_url":"https://api.github.com/repos/asford/c-blosc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asford/c-blosc/merges","archive_url":"https://api.github.com/repos/asford/c-blosc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asford/c-blosc/downloads","issues_url":"https://api.github.com/repos/asford/c-blosc/issues{/number}","pulls_url":"https://api.github.com/repos/asford/c-blosc/pulls{/number}","milestones_url":"https://api.github.com/repos/asford/c-blosc/milestones{/number}","notifications_url":"https://api.github.com/repos/asford/c-blosc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asford/c-blosc/labels{/name}","releases_url":"https://api.github.com/repos/asford/c-blosc/releases{/id}","deployments_url":"https://api.github.com/repos/asford/c-blosc/deployments","created_at":"2018-10-21T08:30:17Z","updated_at":"2018-10-21T08:30:31Z","pushed_at":"2018-10-21T08:30:29Z","git_url":"git://github.com/asford/c-blosc.git","ssh_url":"git@github.com:asford/c-blosc.git","clone_url":"https://github.com/asford/c-blosc.git","svn_url":"https://github.com/asford/c-blosc","homepage":"http://blosc.org","size":3682,"stargazers_count":0,"watchers_count":0,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Blosc:master","ref":"master","sha":"a45ef59ebd4bbf062bcf6620b944539473b88f74","user":{"login":"Blosc","id":6469856,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0Njk4NTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6469856?v=4","gravatar_id":"","url":"https://api.github.com/users/Blosc","html_url":"https://github.com/Blosc","followers_url":"https://api.github.com/users/Blosc/followers","following_url":"https://api.github.com/users/Blosc/following{/other_user}","gists_url":"https://api.github.com/users/Blosc/gists{/gist_id}","starred_url":"https://api.github.com/users/Blosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blosc/subscriptions","organizations_url":"https://api.github.com/users/Blosc/orgs","repos_url":"https://api.github.com/users/Blosc/repos","events_url":"https://api.github.com/users/Blosc/events{/privacy}","received_events_url":"https://api.github.com/users/Blosc/received_events","type":"Organization","site_admin":false},"repo":{"id":1990838,"node_id":"MDEwOlJlcG9zaXRvcnkxOTkwODM4","name":"c-blosc","full_name":"Blosc/c-blosc","private":false,"owner":{"login":"Blosc","id":6469856,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0Njk4NTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6469856?v=4","gravatar_id":"","url":"https://api.github.com/users/Blosc","html_url":"https://github.com/Blosc","followers_url":"https://api.github.com/users/Blosc/followers","following_url":"https://api.github.com/users/Blosc/following{/other_user}","gists_url":"https://api.github.com/users/Blosc/gists{/gist_id}","starred_url":"https://api.github.com/users/Blosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blosc/subscriptions","organizations_url":"https://api.github.com/users/Blosc/orgs","repos_url":"https://api.github.com/users/Blosc/repos","events_url":"https://api.github.com/users/Blosc/events{/privacy}","received_events_url":"https://api.github.com/users/Blosc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Blosc/c-blosc","description":"A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`.","fork":false,"url":"https://api.github.com/repos/Blosc/c-blosc","forks_url":"https://api.github.com/repos/Blosc/c-blosc/forks","keys_url":"https://api.github.com/repos/Blosc/c-blosc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Blosc/c-blosc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Blosc/c-blosc/teams","hooks_url":"https://api.github.com/repos/Blosc/c-blosc/hooks","issue_events_url":"https://api.github.com/repos/Blosc/c-blosc/issues/events{/number}","events_url":"https://api.github.com/repos/Blosc/c-blosc/events","assignees_url":"https://api.github.com/repos/Blosc/c-blosc/assignees{/user}","branches_url":"https://api.github.com/repos/Blosc/c-blosc/branches{/branch}","tags_url":"https://api.github.com/repos/Blosc/c-blosc/tags","blobs_url":"https://api.github.com/repos/Blosc/c-blosc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Blosc/c-blosc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Blosc/c-blosc/git/refs{/sha}","trees_url":"https://api.github.com/repos/Blosc/c-blosc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Blosc/c-blosc/statuses/{sha}","languages_url":"https://api.github.com/repos/Blosc/c-blosc/languages","stargazers_url":"https://api.github.com/repos/Blosc/c-blosc/stargazers","contributors_url":"https://api.github.com/repos/Blosc/c-blosc/contributors","subscribers_url":"https://api.github.com/repos/Blosc/c-blosc/subscribers","subscription_url":"https://api.github.com/repos/Blosc/c-blosc/subscription","commits_url":"https://api.github.com/repos/Blosc/c-blosc/commits{/sha}","git_commits_url":"https://api.github.com/repos/Blosc/c-blosc/git/commits{/sha}","comments_url":"https://api.github.com/repos/Blosc/c-blosc/comments{/number}","issue_comment_url":"https://api.github.com/repos/Blosc/c-blosc/issues/comments{/number}","contents_url":"https://api.github.com/repos/Blosc/c-blosc/contents/{+path}","compare_url":"https://api.github.com/repos/Blosc/c-blosc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Blosc/c-blosc/merges","archive_url":"https://api.github.com/repos/Blosc/c-blosc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Blosc/c-blosc/downloads","issues_url":"https://api.github.com/repos/Blosc/c-blosc/issues{/number}","pulls_url":"https://api.github.com/repos/Blosc/c-blosc/pulls{/number}","milestones_url":"https://api.github.com/repos/Blosc/c-blosc/milestones{/number}","notifications_url":"https://api.github.com/repos/Blosc/c-blosc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Blosc/c-blosc/labels{/name}","releases_url":"https://api.github.com/repos/Blosc/c-blosc/releases{/id}","deployments_url":"https://api.github.com/repos/Blosc/c-blosc/deployments","created_at":"2011-07-03T11:38:39Z","updated_at":"2018-10-19T22:05:38Z","pushed_at":"2018-09-13T09:24:40Z","git_url":"git://github.com/Blosc/c-blosc.git","ssh_url":"git@github.com:Blosc/c-blosc.git","clone_url":"https://github.com/Blosc/c-blosc.git","svn_url":"https://github.com/Blosc/c-blosc","homepage":"http://blosc.org","size":3682,"stargazers_count":514,"watchers_count":514,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"archived":false,"open_issues_count":25,"license":null,"forks":91,"open_issues":25,"watchers":514,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Blosc/c-blosc/pulls/241"},"html":{"href":"https://github.com/Blosc/c-blosc/pull/241"},"issue":{"href":"https://api.github.com/repos/Blosc/c-blosc/issues/241"},"comments":{"href":"https://api.github.com/repos/Blosc/c-blosc/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/Blosc/c-blosc/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/Blosc/c-blosc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Blosc/c-blosc/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/Blosc/c-blosc/statuses/4a3036cadeea979ffcf6a44b40bfb5d278344f8b"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":124,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"asford"}}