{"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/django/asgi_ipc/pulls/7","id":90303796,"html_url":"https://github.com/django/asgi_ipc/pull/7","diff_url":"https://github.com/django/asgi_ipc/pull/7.diff","patch_url":"https://github.com/django/asgi_ipc/pull/7.patch","issue_url":"https://api.github.com/repos/django/asgi_ipc/issues/7","number":7,"state":"open","locked":false,"title":"Unlink shared memory when MemoryDatastructure instances are destroyed. ","user":{"login":"eldritchideen","id":2540934,"avatar_url":"https://avatars.githubusercontent.com/u/2540934?v=3","gravatar_id":"","url":"https://api.github.com/users/eldritchideen","html_url":"https://github.com/eldritchideen","followers_url":"https://api.github.com/users/eldritchideen/followers","following_url":"https://api.github.com/users/eldritchideen/following{/other_user}","gists_url":"https://api.github.com/users/eldritchideen/gists{/gist_id}","starred_url":"https://api.github.com/users/eldritchideen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldritchideen/subscriptions","organizations_url":"https://api.github.com/users/eldritchideen/orgs","repos_url":"https://api.github.com/users/eldritchideen/repos","events_url":"https://api.github.com/users/eldritchideen/events{/privacy}","received_events_url":"https://api.github.com/users/eldritchideen/received_events","type":"User","site_admin":false},"body":"While running the test suite for asgi_ipc multiple times in a row, it would start failing with the following exception.\r\n\r\n```Traceback (most recent call last):\r\n  File \"/Users/sjc/anaconda3/envs/channel-dev/lib/python3.5/unittest/loader.py\", line 428, in _find_test_path\r\n    module = self._get_module_from_name(name)\r\n  File \"/Users/sjc/anaconda3/envs/channel-dev/lib/python3.5/unittest/loader.py\", line 369, in _get_module_from_name\r\n    __import__(name)\r\n  File \"/Users/sjc/projects/python/channels/asgi_ipc/test_asgi_ipc.py\", line 9, in <module>\r\n    class IPCLayerTests(ConformanceTestCase):\r\n  File \"/Users/sjc/projects/python/channels/asgi_ipc/test_asgi_ipc.py\", line 11, in IPCLayerTests\r\n    channel_layer = IPCChannelLayer(expiry=1, group_expiry=2, capacity=5)\r\n  File \"/Users/sjc/projects/python/channels/asgi_ipc/asgi_ipc.py\", line 43, in __init__\r\n    self.channel_store = MemoryDict(\"/%s-chan\" % self.prefix, size=channel_memory)\r\n  File \"/Users/sjc/projects/python/channels/asgi_ipc/asgi_ipc.py\", line 213, in __init__\r\n    \"Error was: %s\" % e\r\nValueError: Unable to allocate shared memory segment (potentially out of memory).\r\nError was: The size is invalid or the memory is read-only```\r\n\r\nTracked this down to the shared memory segment not being marked for release once the last process has unattached from it. The fd is closed, but the segment is never unlinked.\r\n\r\nAdding a call to the `unlink()` method on the `SharedMemory` instance, in `__del__` results in being able to run the unit tests continuously without failing after an initial run. \r\n","created_at":"2016-10-21T00:16:01Z","updated_at":"2016-10-21T00:16:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5af9d5048a162573e09ddb8dbf422c353ba3abba","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/asgi_ipc/pulls/7/commits","review_comments_url":"https://api.github.com/repos/django/asgi_ipc/pulls/7/comments","review_comment_url":"https://api.github.com/repos/django/asgi_ipc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/asgi_ipc/issues/7/comments","statuses_url":"https://api.github.com/repos/django/asgi_ipc/statuses/e38fda971825a8515fa28f9ebcfbd937c2288f66","head":{"label":"eldritchideen:master","ref":"master","sha":"e38fda971825a8515fa28f9ebcfbd937c2288f66","user":{"login":"eldritchideen","id":2540934,"avatar_url":"https://avatars.githubusercontent.com/u/2540934?v=3","gravatar_id":"","url":"https://api.github.com/users/eldritchideen","html_url":"https://github.com/eldritchideen","followers_url":"https://api.github.com/users/eldritchideen/followers","following_url":"https://api.github.com/users/eldritchideen/following{/other_user}","gists_url":"https://api.github.com/users/eldritchideen/gists{/gist_id}","starred_url":"https://api.github.com/users/eldritchideen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldritchideen/subscriptions","organizations_url":"https://api.github.com/users/eldritchideen/orgs","repos_url":"https://api.github.com/users/eldritchideen/repos","events_url":"https://api.github.com/users/eldritchideen/events{/privacy}","received_events_url":"https://api.github.com/users/eldritchideen/received_events","type":"User","site_admin":false},"repo":{"id":71512099,"name":"asgi_ipc","full_name":"eldritchideen/asgi_ipc","owner":{"login":"eldritchideen","id":2540934,"avatar_url":"https://avatars.githubusercontent.com/u/2540934?v=3","gravatar_id":"","url":"https://api.github.com/users/eldritchideen","html_url":"https://github.com/eldritchideen","followers_url":"https://api.github.com/users/eldritchideen/followers","following_url":"https://api.github.com/users/eldritchideen/following{/other_user}","gists_url":"https://api.github.com/users/eldritchideen/gists{/gist_id}","starred_url":"https://api.github.com/users/eldritchideen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldritchideen/subscriptions","organizations_url":"https://api.github.com/users/eldritchideen/orgs","repos_url":"https://api.github.com/users/eldritchideen/repos","events_url":"https://api.github.com/users/eldritchideen/events{/privacy}","received_events_url":"https://api.github.com/users/eldritchideen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eldritchideen/asgi_ipc","description":"IPC-based ASGI channel layer","fork":true,"url":"https://api.github.com/repos/eldritchideen/asgi_ipc","forks_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/forks","keys_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/teams","hooks_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/hooks","issue_events_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/issues/events{/number}","events_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/events","assignees_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/assignees{/user}","branches_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/branches{/branch}","tags_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/tags","blobs_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/git/refs{/sha}","trees_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/statuses/{sha}","languages_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/languages","stargazers_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/stargazers","contributors_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/contributors","subscribers_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/subscribers","subscription_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/subscription","commits_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/commits{/sha}","git_commits_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/git/commits{/sha}","comments_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/comments{/number}","issue_comment_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/issues/comments{/number}","contents_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/contents/{+path}","compare_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/merges","archive_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/downloads","issues_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/issues{/number}","pulls_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/pulls{/number}","milestones_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/milestones{/number}","notifications_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/labels{/name}","releases_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/releases{/id}","deployments_url":"https://api.github.com/repos/eldritchideen/asgi_ipc/deployments","created_at":"2016-10-20T23:19:43Z","updated_at":"2016-10-20T23:19:44Z","pushed_at":"2016-10-21T00:02:41Z","git_url":"git://github.com/eldritchideen/asgi_ipc.git","ssh_url":"git@github.com:eldritchideen/asgi_ipc.git","clone_url":"https://github.com/eldritchideen/asgi_ipc.git","svn_url":"https://github.com/eldritchideen/asgi_ipc","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"django:master","ref":"master","sha":"f22c60a677dd2cabb85d965c606dc036e0fddd7f","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":58187705,"name":"asgi_ipc","full_name":"django/asgi_ipc","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/asgi_ipc","description":"IPC-based ASGI channel layer","fork":false,"url":"https://api.github.com/repos/django/asgi_ipc","forks_url":"https://api.github.com/repos/django/asgi_ipc/forks","keys_url":"https://api.github.com/repos/django/asgi_ipc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/asgi_ipc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/asgi_ipc/teams","hooks_url":"https://api.github.com/repos/django/asgi_ipc/hooks","issue_events_url":"https://api.github.com/repos/django/asgi_ipc/issues/events{/number}","events_url":"https://api.github.com/repos/django/asgi_ipc/events","assignees_url":"https://api.github.com/repos/django/asgi_ipc/assignees{/user}","branches_url":"https://api.github.com/repos/django/asgi_ipc/branches{/branch}","tags_url":"https://api.github.com/repos/django/asgi_ipc/tags","blobs_url":"https://api.github.com/repos/django/asgi_ipc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/asgi_ipc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/asgi_ipc/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/asgi_ipc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/asgi_ipc/statuses/{sha}","languages_url":"https://api.github.com/repos/django/asgi_ipc/languages","stargazers_url":"https://api.github.com/repos/django/asgi_ipc/stargazers","contributors_url":"https://api.github.com/repos/django/asgi_ipc/contributors","subscribers_url":"https://api.github.com/repos/django/asgi_ipc/subscribers","subscription_url":"https://api.github.com/repos/django/asgi_ipc/subscription","commits_url":"https://api.github.com/repos/django/asgi_ipc/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/asgi_ipc/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/asgi_ipc/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/asgi_ipc/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/asgi_ipc/contents/{+path}","compare_url":"https://api.github.com/repos/django/asgi_ipc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/asgi_ipc/merges","archive_url":"https://api.github.com/repos/django/asgi_ipc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/asgi_ipc/downloads","issues_url":"https://api.github.com/repos/django/asgi_ipc/issues{/number}","pulls_url":"https://api.github.com/repos/django/asgi_ipc/pulls{/number}","milestones_url":"https://api.github.com/repos/django/asgi_ipc/milestones{/number}","notifications_url":"https://api.github.com/repos/django/asgi_ipc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/asgi_ipc/labels{/name}","releases_url":"https://api.github.com/repos/django/asgi_ipc/releases{/id}","deployments_url":"https://api.github.com/repos/django/asgi_ipc/deployments","created_at":"2016-05-06T07:01:14Z","updated_at":"2016-09-22T06:19:15Z","pushed_at":"2016-10-21T00:16:01Z","git_url":"git://github.com/django/asgi_ipc.git","ssh_url":"git@github.com:django/asgi_ipc.git","clone_url":"https://github.com/django/asgi_ipc.git","svn_url":"https://github.com/django/asgi_ipc","homepage":null,"size":19,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/asgi_ipc/pulls/7"},"html":{"href":"https://github.com/django/asgi_ipc/pull/7"},"issue":{"href":"https://api.github.com/repos/django/asgi_ipc/issues/7"},"comments":{"href":"https://api.github.com/repos/django/asgi_ipc/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/django/asgi_ipc/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/django/asgi_ipc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/asgi_ipc/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/django/asgi_ipc/statuses/e38fda971825a8515fa28f9ebcfbd937c2288f66"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"eldritchideen"}}