{"action":"closed","number":25,"pull_request":{"url":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25","id":83555350,"html_url":"https://github.com/MarshRom/android_system_core/pull/25","diff_url":"https://github.com/MarshRom/android_system_core/pull/25.diff","patch_url":"https://github.com/MarshRom/android_system_core/pull/25.patch","issue_url":"https://api.github.com/repos/MarshRom/android_system_core/issues/25","number":25,"state":"closed","locked":false,"title":"libutils: fix deadlock in elapsedRealtimeNano","user":{"login":"Slydelix","id":7862481,"avatar_url":"https://avatars.githubusercontent.com/u/7862481?v=3","gravatar_id":"","url":"https://api.github.com/users/Slydelix","html_url":"https://github.com/Slydelix","followers_url":"https://api.github.com/users/Slydelix/followers","following_url":"https://api.github.com/users/Slydelix/following{/other_user}","gists_url":"https://api.github.com/users/Slydelix/gists{/gist_id}","starred_url":"https://api.github.com/users/Slydelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slydelix/subscriptions","organizations_url":"https://api.github.com/users/Slydelix/orgs","repos_url":"https://api.github.com/users/Slydelix/repos","events_url":"https://api.github.com/users/Slydelix/events{/privacy}","received_events_url":"https://api.github.com/users/Slydelix/received_events","type":"User","site_admin":false},"body":"If n > 2 threads all lock the mutex awaiting the clock method to\r\nbe set, the 1st thread will first set the method and unlock.  The\r\n2nd thread will then take the mutex, but never unlock because the\r\nclock_method has already been updated by the 1st thread.  This causes\r\na deadlock for threads 3-n.\r\n\r\nSolution is to ensure the calling thread always unlocks the mutex if\r\nit has previously locked it.\r\n\r\nLog:\r\n\r\n\"main\" prio=5 tid=1 Native\r\n  | group=\"main\" sCount=1 dsCount=0 obj=0x733313b0 self=0xb4cf6500\r\n  | sysTid=12786 nice=0 cgrp=default sched=0/0 handle=0xb6f86b44\r\n  | state=S schedstat=( 41990410 32985836 80 ) utm=3 stm=1 core=2 HZ=100\r\n  | stack=0xbe5fb000-0xbe5fd000 stackSize=8MB\r\n  | held mutexes=\r\n  native: #00 pc 00017638  /system/lib/libc.so (syscall+28)\r\n  native: #01 pc 0003ffa5  /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tPK8timespeci+504)\r\n  native: #02 pc 000400a9  /system/lib/libc.so (pthread_mutex_lock+26)\r\n  native: #03 pc 0000fa01  /system/lib/libutils.so (_ZN7android19elapsedRealtimeNanoEv+16)\r\n  native: #04 pc 0000fb1f  /system/lib/libutils.so (_ZN7android15elapsedRealtimeEv+2)\r\n  native: #05 pc 00214d1d  /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_SystemClock_elapsedRealtime__+72)\r\n\r\n\"Thread-6372\" prio=5 tid=9 Native\r\n  | group=\"main\" sCount=1 dsCount=0 obj=0x32c05120 self=0xacb58100\r\n  | sysTid=12829 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0xb38c3930\r\n  | state=S schedstat=( 869427 8219115 17 ) utm=0 stm=0 core=2 HZ=100\r\n  | stack=0xb37c1000-0xb37c3000 stackSize=1038KB\r\n  | held mutexes=\r\n  native: #00 pc 00017638  /system/lib/libc.so (syscall+28)\r\n  native: #01 pc 0003ffa5  /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tPK8timespeci+504)\r\n  native: #02 pc 000400a9  /system/lib/libc.so (pthread_mutex_lock+26)\r\n  native: #03 pc 0000fa01  /system/lib/libutils.so (_ZN7android19elapsedRealtimeNanoEv+16)\r\n  native: #04 pc 0000fb1f  /system/lib/libutils.so (_ZN7android15elapsedRealtimeEv+2)\r\n  native: #05 pc 00214d1d  /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_SystemClock_elapsedRealtime__+72)\r\n\r\nHAM-1470\r\nChange-Id: I41874d2b0ea034a35a74da030398231089c15cde","created_at":"2016-09-01T01:09:21Z","updated_at":"2016-09-01T01:09:25Z","closed_at":"2016-09-01T01:09:25Z","merged_at":"2016-09-01T01:09:25Z","merge_commit_sha":"fe34a7d6e4127c20f81b4f2acd1ea6bb7915419c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25/commits","review_comments_url":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25/comments","review_comment_url":"https://api.github.com/repos/MarshRom/android_system_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarshRom/android_system_core/issues/25/comments","statuses_url":"https://api.github.com/repos/MarshRom/android_system_core/statuses/c00328f99aad5f1e8e879557f142981f08146fe3","head":{"label":"CyanogenMod:cm-13.0","ref":"cm-13.0","sha":"c00328f99aad5f1e8e879557f142981f08146fe3","user":{"login":"CyanogenMod","id":317721,"avatar_url":"https://avatars.githubusercontent.com/u/317721?v=3","gravatar_id":"","url":"https://api.github.com/users/CyanogenMod","html_url":"https://github.com/CyanogenMod","followers_url":"https://api.github.com/users/CyanogenMod/followers","following_url":"https://api.github.com/users/CyanogenMod/following{/other_user}","gists_url":"https://api.github.com/users/CyanogenMod/gists{/gist_id}","starred_url":"https://api.github.com/users/CyanogenMod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyanogenMod/subscriptions","organizations_url":"https://api.github.com/users/CyanogenMod/orgs","repos_url":"https://api.github.com/users/CyanogenMod/repos","events_url":"https://api.github.com/users/CyanogenMod/events{/privacy}","received_events_url":"https://api.github.com/users/CyanogenMod/received_events","type":"Organization","site_admin":false},"repo":{"id":756568,"name":"android_system_core","full_name":"CyanogenMod/android_system_core","owner":{"login":"CyanogenMod","id":317721,"avatar_url":"https://avatars.githubusercontent.com/u/317721?v=3","gravatar_id":"","url":"https://api.github.com/users/CyanogenMod","html_url":"https://github.com/CyanogenMod","followers_url":"https://api.github.com/users/CyanogenMod/followers","following_url":"https://api.github.com/users/CyanogenMod/following{/other_user}","gists_url":"https://api.github.com/users/CyanogenMod/gists{/gist_id}","starred_url":"https://api.github.com/users/CyanogenMod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyanogenMod/subscriptions","organizations_url":"https://api.github.com/users/CyanogenMod/orgs","repos_url":"https://api.github.com/users/CyanogenMod/repos","events_url":"https://api.github.com/users/CyanogenMod/events{/privacy}","received_events_url":"https://api.github.com/users/CyanogenMod/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CyanogenMod/android_system_core","description":"Android System Core (CM)","fork":true,"url":"https://api.github.com/repos/CyanogenMod/android_system_core","forks_url":"https://api.github.com/repos/CyanogenMod/android_system_core/forks","keys_url":"https://api.github.com/repos/CyanogenMod/android_system_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CyanogenMod/android_system_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CyanogenMod/android_system_core/teams","hooks_url":"https://api.github.com/repos/CyanogenMod/android_system_core/hooks","issue_events_url":"https://api.github.com/repos/CyanogenMod/android_system_core/issues/events{/number}","events_url":"https://api.github.com/repos/CyanogenMod/android_system_core/events","assignees_url":"https://api.github.com/repos/CyanogenMod/android_system_core/assignees{/user}","branches_url":"https://api.github.com/repos/CyanogenMod/android_system_core/branches{/branch}","tags_url":"https://api.github.com/repos/CyanogenMod/android_system_core/tags","blobs_url":"https://api.github.com/repos/CyanogenMod/android_system_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CyanogenMod/android_system_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CyanogenMod/android_system_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/CyanogenMod/android_system_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CyanogenMod/android_system_core/statuses/{sha}","languages_url":"https://api.github.com/repos/CyanogenMod/android_system_core/languages","stargazers_url":"https://api.github.com/repos/CyanogenMod/android_system_core/stargazers","contributors_url":"https://api.github.com/repos/CyanogenMod/android_system_core/contributors","subscribers_url":"https://api.github.com/repos/CyanogenMod/android_system_core/subscribers","subscription_url":"https://api.github.com/repos/CyanogenMod/android_system_core/subscription","commits_url":"https://api.github.com/repos/CyanogenMod/android_system_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/CyanogenMod/android_system_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/CyanogenMod/android_system_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/CyanogenMod/android_system_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/CyanogenMod/android_system_core/contents/{+path}","compare_url":"https://api.github.com/repos/CyanogenMod/android_system_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CyanogenMod/android_system_core/merges","archive_url":"https://api.github.com/repos/CyanogenMod/android_system_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CyanogenMod/android_system_core/downloads","issues_url":"https://api.github.com/repos/CyanogenMod/android_system_core/issues{/number}","pulls_url":"https://api.github.com/repos/CyanogenMod/android_system_core/pulls{/number}","milestones_url":"https://api.github.com/repos/CyanogenMod/android_system_core/milestones{/number}","notifications_url":"https://api.github.com/repos/CyanogenMod/android_system_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CyanogenMod/android_system_core/labels{/name}","releases_url":"https://api.github.com/repos/CyanogenMod/android_system_core/releases{/id}","deployments_url":"https://api.github.com/repos/CyanogenMod/android_system_core/deployments","created_at":"2010-07-04T17:56:35Z","updated_at":"2016-08-24T11:17:11Z","pushed_at":"2016-08-30T15:27:24Z","git_url":"git://github.com/CyanogenMod/android_system_core.git","ssh_url":"git@github.com:CyanogenMod/android_system_core.git","clone_url":"https://github.com/CyanogenMod/android_system_core.git","svn_url":"https://github.com/CyanogenMod/android_system_core","homepage":"","size":30320,"stargazers_count":237,"watchers_count":237,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":552,"mirror_url":null,"open_issues_count":0,"forks":552,"open_issues":0,"watchers":237,"default_branch":"cm-13.0"}},"base":{"label":"MarshRom:cm-13.0","ref":"cm-13.0","sha":"23a709e059774461b1f0c005d72b643e05f14e90","user":{"login":"MarshRom","id":16374087,"avatar_url":"https://avatars.githubusercontent.com/u/16374087?v=3","gravatar_id":"","url":"https://api.github.com/users/MarshRom","html_url":"https://github.com/MarshRom","followers_url":"https://api.github.com/users/MarshRom/followers","following_url":"https://api.github.com/users/MarshRom/following{/other_user}","gists_url":"https://api.github.com/users/MarshRom/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshRom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshRom/subscriptions","organizations_url":"https://api.github.com/users/MarshRom/orgs","repos_url":"https://api.github.com/users/MarshRom/repos","events_url":"https://api.github.com/users/MarshRom/events{/privacy}","received_events_url":"https://api.github.com/users/MarshRom/received_events","type":"Organization","site_admin":false},"repo":{"id":51226435,"name":"android_system_core","full_name":"MarshRom/android_system_core","owner":{"login":"MarshRom","id":16374087,"avatar_url":"https://avatars.githubusercontent.com/u/16374087?v=3","gravatar_id":"","url":"https://api.github.com/users/MarshRom","html_url":"https://github.com/MarshRom","followers_url":"https://api.github.com/users/MarshRom/followers","following_url":"https://api.github.com/users/MarshRom/following{/other_user}","gists_url":"https://api.github.com/users/MarshRom/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshRom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshRom/subscriptions","organizations_url":"https://api.github.com/users/MarshRom/orgs","repos_url":"https://api.github.com/users/MarshRom/repos","events_url":"https://api.github.com/users/MarshRom/events{/privacy}","received_events_url":"https://api.github.com/users/MarshRom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MarshRom/android_system_core","description":"Android System Core (CM)","fork":true,"url":"https://api.github.com/repos/MarshRom/android_system_core","forks_url":"https://api.github.com/repos/MarshRom/android_system_core/forks","keys_url":"https://api.github.com/repos/MarshRom/android_system_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarshRom/android_system_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarshRom/android_system_core/teams","hooks_url":"https://api.github.com/repos/MarshRom/android_system_core/hooks","issue_events_url":"https://api.github.com/repos/MarshRom/android_system_core/issues/events{/number}","events_url":"https://api.github.com/repos/MarshRom/android_system_core/events","assignees_url":"https://api.github.com/repos/MarshRom/android_system_core/assignees{/user}","branches_url":"https://api.github.com/repos/MarshRom/android_system_core/branches{/branch}","tags_url":"https://api.github.com/repos/MarshRom/android_system_core/tags","blobs_url":"https://api.github.com/repos/MarshRom/android_system_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarshRom/android_system_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarshRom/android_system_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarshRom/android_system_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarshRom/android_system_core/statuses/{sha}","languages_url":"https://api.github.com/repos/MarshRom/android_system_core/languages","stargazers_url":"https://api.github.com/repos/MarshRom/android_system_core/stargazers","contributors_url":"https://api.github.com/repos/MarshRom/android_system_core/contributors","subscribers_url":"https://api.github.com/repos/MarshRom/android_system_core/subscribers","subscription_url":"https://api.github.com/repos/MarshRom/android_system_core/subscription","commits_url":"https://api.github.com/repos/MarshRom/android_system_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarshRom/android_system_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarshRom/android_system_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarshRom/android_system_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarshRom/android_system_core/contents/{+path}","compare_url":"https://api.github.com/repos/MarshRom/android_system_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarshRom/android_system_core/merges","archive_url":"https://api.github.com/repos/MarshRom/android_system_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarshRom/android_system_core/downloads","issues_url":"https://api.github.com/repos/MarshRom/android_system_core/issues{/number}","pulls_url":"https://api.github.com/repos/MarshRom/android_system_core/pulls{/number}","milestones_url":"https://api.github.com/repos/MarshRom/android_system_core/milestones{/number}","notifications_url":"https://api.github.com/repos/MarshRom/android_system_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarshRom/android_system_core/labels{/name}","releases_url":"https://api.github.com/repos/MarshRom/android_system_core/releases{/id}","deployments_url":"https://api.github.com/repos/MarshRom/android_system_core/deployments","created_at":"2016-02-06T23:03:53Z","updated_at":"2016-02-06T23:12:19Z","pushed_at":"2016-09-01T01:09:25Z","git_url":"git://github.com/MarshRom/android_system_core.git","ssh_url":"git@github.com:MarshRom/android_system_core.git","clone_url":"https://github.com/MarshRom/android_system_core.git","svn_url":"https://github.com/MarshRom/android_system_core","homepage":"","size":21121,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"cm-13.0"}},"_links":{"self":{"href":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25"},"html":{"href":"https://github.com/MarshRom/android_system_core/pull/25"},"issue":{"href":"https://api.github.com/repos/MarshRom/android_system_core/issues/25"},"comments":{"href":"https://api.github.com/repos/MarshRom/android_system_core/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/MarshRom/android_system_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarshRom/android_system_core/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/MarshRom/android_system_core/statuses/c00328f99aad5f1e8e879557f142981f08146fe3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Slydelix","id":7862481,"avatar_url":"https://avatars.githubusercontent.com/u/7862481?v=3","gravatar_id":"","url":"https://api.github.com/users/Slydelix","html_url":"https://github.com/Slydelix","followers_url":"https://api.github.com/users/Slydelix/followers","following_url":"https://api.github.com/users/Slydelix/following{/other_user}","gists_url":"https://api.github.com/users/Slydelix/gists{/gist_id}","starred_url":"https://api.github.com/users/Slydelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slydelix/subscriptions","organizations_url":"https://api.github.com/users/Slydelix/orgs","repos_url":"https://api.github.com/users/Slydelix/repos","events_url":"https://api.github.com/users/Slydelix/events{/privacy}","received_events_url":"https://api.github.com/users/Slydelix/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":8,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"Slydelix"}}