{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/isc-projects/bind9/pulls/2","id":215864440,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODY0NDQw","html_url":"https://github.com/isc-projects/bind9/pull/2","diff_url":"https://github.com/isc-projects/bind9/pull/2.diff","patch_url":"https://github.com/isc-projects/bind9/pull/2.patch","issue_url":"https://api.github.com/repos/isc-projects/bind9/issues/2","number":2,"state":"open","locked":false,"title":"fix crash caused by race condition in timer creation","user":{"login":"zhangzl2013","id":5743049,"node_id":"MDQ6VXNlcjU3NDMwNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5743049?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangzl2013","html_url":"https://github.com/zhangzl2013","followers_url":"https://api.github.com/users/zhangzl2013/followers","following_url":"https://api.github.com/users/zhangzl2013/following{/other_user}","gists_url":"https://api.github.com/users/zhangzl2013/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangzl2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangzl2013/subscriptions","organizations_url":"https://api.github.com/users/zhangzl2013/orgs","repos_url":"https://api.github.com/users/zhangzl2013/repos","events_url":"https://api.github.com/users/zhangzl2013/events{/privacy}","received_events_url":"https://api.github.com/users/zhangzl2013/received_events","type":"User","site_admin":false},"body":"A crash happened with the following call trace:\r\n  (gdb) thread 4\r\n  [Switching to thread 4 (LWP 1827)]\r\n  #0  __lll_unlock_wake () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:371\r\n  371     ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory.\r\n  (gdb) bt\r\n  #0  __lll_unlock_wake () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:371\r\n  #1  0x00007f792dfe61f4 in __pthread_mutex_unlock_usercnt (mutex=mutex@entry=0x7f792f045028, decr=decr@entry=1) at pthread_mutex_unlock.c:55\r\n  #2  0x00007f792dfe62aa in __GI___pthread_mutex_unlock (mutex=mutex@entry=0x7f792f045028) at pthread_mutex_unlock.c:324\r\n  #3  0x00007f792e234f3e in isc__timer_create (manager0=0x7f792f045010, type=<optimized out>, expires=<optimized out>, interval=<optimized out>, task=<optimized out>,\r\n  \taction=<optimized out>, arg=0x55a04c063a50, timerp=0x55a04c063a88) at ../../../bind-9.10.3-P3/lib/isc/timer.c:485\r\n  #4  0x000055a04ac16610 in add_timeout (when=0x7ffea6082f90, where=0x7ffea6082fa0, what=0x0, ref=0xffffffff, unref=0x7f792f045028) at ../../dhcp-4.3.4/common/dispatch.c:354\r\n  #5  0x000055a04ac01cf1 in send_discover (cpp=0x55a04c063db0) at ../../dhcp-4.3.4/client/dhclient.c:2315\r\n  #6  0x000055a04abf8ac8 in main (argc=<optimized out>, argv=<optimized out>) at ../../dhcp-4.3.4/client/dhclient.c:795\r\n  (gdb) thread 1\r\n  [Switching to thread 1 (LWP 1828)]\r\n  #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58\r\n  58      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.\r\n  (gdb) bt\r\n  #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58\r\n  #1  0x00007f792dc713fa in __GI_abort () at abort.c:89\r\n  #2  0x00007f792e20c7af in isc_assertion_failed (file=file@entry=0x7f792e252b60 \"../../../bind-9.10.3-P3/lib/isc/timer.c\", line=line@entry=1163,\r\n  \ttype=type@entry=isc_assertiontype_require,\r\n  \tcond=cond@entry=0x7f792e2531f0 \"timerp != ((void *)0) && ((*timerp) != ((void *)0) && (*timerp)->magic == (('A') << 24 | ('t') << 16 | ('m') << 8 | ('r')))\")\r\n  \tat ../../../bind-9.10.3-P3/lib/isc/assertions.c:59\r\n  #3  0x00007f792e2358c1 in isc_timer_detach (timerp=timerp@entry=0x55a04c063a88) at ../../../bind-9.10.3-P3/lib/isc/timer.c:1163\r\n  #4  0x000055a04ac1625b in isclib_timer_callback (taskp=<optimized out>, eventp=0x7f792f04e130) at ../../dhcp-4.3.4/common/dispatch.c:179\r\n  #5  0x00007f792e22f64c in dispatch (manager=0x7f792f042010) at ../../../bind-9.10.3-P3/lib/isc/task.c:1130\r\n  #6  run (uap=0x7f792f042010) at ../../../bind-9.10.3-P3/lib/isc/task.c:1302\r\n  #7  0x00007f792dfe2464 in start_thread (arg=0x7f792d1d3700) at pthread_create.c:456\r\n  #8  0x00007f792dd24cef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105\r\n  (gdb) print *(struct isc_timer **) 0x55a04c063a88\r\n  $15 = (struct isc_timer *) 0x0\r\n\r\nThe race condition is the timer elapses before isc__timer_create() returns the pointer to the caller.\r\nAssigning the return pointer before enabling the timer will fix it.\r\n\r\nSigned-off-by: Zhaolong Zhang <zhangzl2013@126.com>","created_at":"2018-09-17T03:02:01Z","updated_at":"2018-09-17T03:02:01Z","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/isc-projects/bind9/pulls/2/commits","review_comments_url":"https://api.github.com/repos/isc-projects/bind9/pulls/2/comments","review_comment_url":"https://api.github.com/repos/isc-projects/bind9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isc-projects/bind9/issues/2/comments","statuses_url":"https://api.github.com/repos/isc-projects/bind9/statuses/580d0add91fc2572b9585c325a5de7812c74d1f2","head":{"label":"zhangzl2013:master","ref":"master","sha":"580d0add91fc2572b9585c325a5de7812c74d1f2","user":{"login":"zhangzl2013","id":5743049,"node_id":"MDQ6VXNlcjU3NDMwNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5743049?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangzl2013","html_url":"https://github.com/zhangzl2013","followers_url":"https://api.github.com/users/zhangzl2013/followers","following_url":"https://api.github.com/users/zhangzl2013/following{/other_user}","gists_url":"https://api.github.com/users/zhangzl2013/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangzl2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangzl2013/subscriptions","organizations_url":"https://api.github.com/users/zhangzl2013/orgs","repos_url":"https://api.github.com/users/zhangzl2013/repos","events_url":"https://api.github.com/users/zhangzl2013/events{/privacy}","received_events_url":"https://api.github.com/users/zhangzl2013/received_events","type":"User","site_admin":false},"repo":{"id":148881903,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4ODE5MDM=","name":"bind9","full_name":"zhangzl2013/bind9","private":false,"owner":{"login":"zhangzl2013","id":5743049,"node_id":"MDQ6VXNlcjU3NDMwNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5743049?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangzl2013","html_url":"https://github.com/zhangzl2013","followers_url":"https://api.github.com/users/zhangzl2013/followers","following_url":"https://api.github.com/users/zhangzl2013/following{/other_user}","gists_url":"https://api.github.com/users/zhangzl2013/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangzl2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangzl2013/subscriptions","organizations_url":"https://api.github.com/users/zhangzl2013/orgs","repos_url":"https://api.github.com/users/zhangzl2013/repos","events_url":"https://api.github.com/users/zhangzl2013/events{/privacy}","received_events_url":"https://api.github.com/users/zhangzl2013/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhangzl2013/bind9","description":"The classic full-featured DNS implementation. This is a mirror of https://gitlab.isc.org/isc-projects/bind9","fork":true,"url":"https://api.github.com/repos/zhangzl2013/bind9","forks_url":"https://api.github.com/repos/zhangzl2013/bind9/forks","keys_url":"https://api.github.com/repos/zhangzl2013/bind9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhangzl2013/bind9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhangzl2013/bind9/teams","hooks_url":"https://api.github.com/repos/zhangzl2013/bind9/hooks","issue_events_url":"https://api.github.com/repos/zhangzl2013/bind9/issues/events{/number}","events_url":"https://api.github.com/repos/zhangzl2013/bind9/events","assignees_url":"https://api.github.com/repos/zhangzl2013/bind9/assignees{/user}","branches_url":"https://api.github.com/repos/zhangzl2013/bind9/branches{/branch}","tags_url":"https://api.github.com/repos/zhangzl2013/bind9/tags","blobs_url":"https://api.github.com/repos/zhangzl2013/bind9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhangzl2013/bind9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhangzl2013/bind9/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhangzl2013/bind9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhangzl2013/bind9/statuses/{sha}","languages_url":"https://api.github.com/repos/zhangzl2013/bind9/languages","stargazers_url":"https://api.github.com/repos/zhangzl2013/bind9/stargazers","contributors_url":"https://api.github.com/repos/zhangzl2013/bind9/contributors","subscribers_url":"https://api.github.com/repos/zhangzl2013/bind9/subscribers","subscription_url":"https://api.github.com/repos/zhangzl2013/bind9/subscription","commits_url":"https://api.github.com/repos/zhangzl2013/bind9/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhangzl2013/bind9/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhangzl2013/bind9/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhangzl2013/bind9/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhangzl2013/bind9/contents/{+path}","compare_url":"https://api.github.com/repos/zhangzl2013/bind9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhangzl2013/bind9/merges","archive_url":"https://api.github.com/repos/zhangzl2013/bind9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhangzl2013/bind9/downloads","issues_url":"https://api.github.com/repos/zhangzl2013/bind9/issues{/number}","pulls_url":"https://api.github.com/repos/zhangzl2013/bind9/pulls{/number}","milestones_url":"https://api.github.com/repos/zhangzl2013/bind9/milestones{/number}","notifications_url":"https://api.github.com/repos/zhangzl2013/bind9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhangzl2013/bind9/labels{/name}","releases_url":"https://api.github.com/repos/zhangzl2013/bind9/releases{/id}","deployments_url":"https://api.github.com/repos/zhangzl2013/bind9/deployments","created_at":"2018-09-15T07:57:18Z","updated_at":"2018-09-17T03:00:39Z","pushed_at":"2018-09-17T03:00:28Z","git_url":"git://github.com/zhangzl2013/bind9.git","ssh_url":"git@github.com:zhangzl2013/bind9.git","clone_url":"https://github.com/zhangzl2013/bind9.git","svn_url":"https://github.com/zhangzl2013/bind9","homepage":"https://gitlab.isc.org/isc-projects/bind9","size":253830,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"isc-projects:master","ref":"master","sha":"5cf8fc4bba6f61d493ed20e86037d799e20a43db","user":{"login":"isc-projects","id":3965132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjUxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3965132?v=4","gravatar_id":"","url":"https://api.github.com/users/isc-projects","html_url":"https://github.com/isc-projects","followers_url":"https://api.github.com/users/isc-projects/followers","following_url":"https://api.github.com/users/isc-projects/following{/other_user}","gists_url":"https://api.github.com/users/isc-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/isc-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isc-projects/subscriptions","organizations_url":"https://api.github.com/users/isc-projects/orgs","repos_url":"https://api.github.com/users/isc-projects/repos","events_url":"https://api.github.com/users/isc-projects/events{/privacy}","received_events_url":"https://api.github.com/users/isc-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":112236924,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIyMzY5MjQ=","name":"bind9","full_name":"isc-projects/bind9","private":false,"owner":{"login":"isc-projects","id":3965132,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjUxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3965132?v=4","gravatar_id":"","url":"https://api.github.com/users/isc-projects","html_url":"https://github.com/isc-projects","followers_url":"https://api.github.com/users/isc-projects/followers","following_url":"https://api.github.com/users/isc-projects/following{/other_user}","gists_url":"https://api.github.com/users/isc-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/isc-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isc-projects/subscriptions","organizations_url":"https://api.github.com/users/isc-projects/orgs","repos_url":"https://api.github.com/users/isc-projects/repos","events_url":"https://api.github.com/users/isc-projects/events{/privacy}","received_events_url":"https://api.github.com/users/isc-projects/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/isc-projects/bind9","description":"The classic full-featured DNS implementation. This is a mirror of https://gitlab.isc.org/isc-projects/bind9","fork":false,"url":"https://api.github.com/repos/isc-projects/bind9","forks_url":"https://api.github.com/repos/isc-projects/bind9/forks","keys_url":"https://api.github.com/repos/isc-projects/bind9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isc-projects/bind9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isc-projects/bind9/teams","hooks_url":"https://api.github.com/repos/isc-projects/bind9/hooks","issue_events_url":"https://api.github.com/repos/isc-projects/bind9/issues/events{/number}","events_url":"https://api.github.com/repos/isc-projects/bind9/events","assignees_url":"https://api.github.com/repos/isc-projects/bind9/assignees{/user}","branches_url":"https://api.github.com/repos/isc-projects/bind9/branches{/branch}","tags_url":"https://api.github.com/repos/isc-projects/bind9/tags","blobs_url":"https://api.github.com/repos/isc-projects/bind9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isc-projects/bind9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isc-projects/bind9/git/refs{/sha}","trees_url":"https://api.github.com/repos/isc-projects/bind9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isc-projects/bind9/statuses/{sha}","languages_url":"https://api.github.com/repos/isc-projects/bind9/languages","stargazers_url":"https://api.github.com/repos/isc-projects/bind9/stargazers","contributors_url":"https://api.github.com/repos/isc-projects/bind9/contributors","subscribers_url":"https://api.github.com/repos/isc-projects/bind9/subscribers","subscription_url":"https://api.github.com/repos/isc-projects/bind9/subscription","commits_url":"https://api.github.com/repos/isc-projects/bind9/commits{/sha}","git_commits_url":"https://api.github.com/repos/isc-projects/bind9/git/commits{/sha}","comments_url":"https://api.github.com/repos/isc-projects/bind9/comments{/number}","issue_comment_url":"https://api.github.com/repos/isc-projects/bind9/issues/comments{/number}","contents_url":"https://api.github.com/repos/isc-projects/bind9/contents/{+path}","compare_url":"https://api.github.com/repos/isc-projects/bind9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isc-projects/bind9/merges","archive_url":"https://api.github.com/repos/isc-projects/bind9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isc-projects/bind9/downloads","issues_url":"https://api.github.com/repos/isc-projects/bind9/issues{/number}","pulls_url":"https://api.github.com/repos/isc-projects/bind9/pulls{/number}","milestones_url":"https://api.github.com/repos/isc-projects/bind9/milestones{/number}","notifications_url":"https://api.github.com/repos/isc-projects/bind9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isc-projects/bind9/labels{/name}","releases_url":"https://api.github.com/repos/isc-projects/bind9/releases{/id}","deployments_url":"https://api.github.com/repos/isc-projects/bind9/deployments","created_at":"2017-11-27T19:09:20Z","updated_at":"2018-09-14T05:41:00Z","pushed_at":"2018-09-14T05:30:20Z","git_url":"git://github.com/isc-projects/bind9.git","ssh_url":"git@github.com:isc-projects/bind9.git","clone_url":"https://github.com/isc-projects/bind9.git","svn_url":"https://github.com/isc-projects/bind9","homepage":"https://gitlab.isc.org/isc-projects/bind9","size":253830,"stargazers_count":30,"watchers_count":30,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":13,"open_issues":1,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/isc-projects/bind9/pulls/2"},"html":{"href":"https://github.com/isc-projects/bind9/pull/2"},"issue":{"href":"https://api.github.com/repos/isc-projects/bind9/issues/2"},"comments":{"href":"https://api.github.com/repos/isc-projects/bind9/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/isc-projects/bind9/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/isc-projects/bind9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isc-projects/bind9/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/isc-projects/bind9/statuses/580d0add91fc2572b9585c325a5de7812c74d1f2"}},"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":1,"additions":3,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"zhangzl2013"}}