{"action":"created","issue":{"url":"https://api.github.com/repos/apache/trafficserver/issues/4019","repository_url":"https://api.github.com/repos/apache/trafficserver","labels_url":"https://api.github.com/repos/apache/trafficserver/issues/4019/labels{/name}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/4019/comments","events_url":"https://api.github.com/repos/apache/trafficserver/issues/4019/events","html_url":"https://github.com/apache/trafficserver/pull/4019","id":345022193,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjgwMDIw","number":4019,"title":"Ensure that continuation lock is held before calling handler.","user":{"login":"shinrich","id":334488,"node_id":"MDQ6VXNlcjMzNDQ4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"labels":[{"id":374860755,"node_id":"MDU6TGFiZWwzNzQ4NjA3NTU=","url":"https://api.github.com/repos/apache/trafficserver/labels/Core","name":"Core","color":"006b75","default":false},{"id":551674414,"node_id":"MDU6TGFiZWw1NTE2NzQ0MTQ=","url":"https://api.github.com/repos/apache/trafficserver/labels/Crash","name":"Crash","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":{"login":"shinrich","id":334488,"node_id":"MDQ6VXNlcjMzNDQ4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"assignees":[{"login":"shinrich","id":334488,"node_id":"MDQ6VXNlcjMzNDQ4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/apache/trafficserver/milestones/19","html_url":"https://github.com/apache/trafficserver/milestone/19","labels_url":"https://api.github.com/repos/apache/trafficserver/milestones/19/labels","id":3358032,"node_id":"MDk6TWlsZXN0b25lMzM1ODAzMg==","number":19,"title":"9.0.0","description":"","creator":{"login":"bryancall","id":216749,"node_id":"MDQ6VXNlcjIxNjc0OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/216749?v=4","gravatar_id":"","url":"https://api.github.com/users/bryancall","html_url":"https://github.com/bryancall","followers_url":"https://api.github.com/users/bryancall/followers","following_url":"https://api.github.com/users/bryancall/following{/other_user}","gists_url":"https://api.github.com/users/bryancall/gists{/gist_id}","starred_url":"https://api.github.com/users/bryancall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryancall/subscriptions","organizations_url":"https://api.github.com/users/bryancall/orgs","repos_url":"https://api.github.com/users/bryancall/repos","events_url":"https://api.github.com/users/bryancall/events{/privacy}","received_events_url":"https://api.github.com/users/bryancall/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":68,"state":"open","created_at":"2018-05-18T19:12:59Z","updated_at":"2018-07-30T03:32:11Z","due_on":"2019-06-30T07:00:00Z","closed_at":null},"comments":9,"created_at":"2018-07-26T22:06:20Z","updated_at":"2018-07-30T15:07:48Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/4019","html_url":"https://github.com/apache/trafficserver/pull/4019","diff_url":"https://github.com/apache/trafficserver/pull/4019.diff","patch_url":"https://github.com/apache/trafficserver/pull/4019.patch"},"body":"Noticed this while debugging a plugin using the ASYNC job support.  My earlier assumption was that all the VC and HttpSM continuations would have same mutex as the NH handler.  So there would be no need to grab the mutex before calling the handler.\r\n\r\nFor the client vc and the HttpSM, the mutexes are the same and correspond to the nh lock.  However, the server vc if it is reused may have a different mutex than the HttpSM.  So if the event is being processed from the server vc, the HttpSM will not be locked.  So there are cases when HttpSM is being called but not locked.  Most activity on the HttpSM will be from the same thread, so this shouldn't be too bad, but there are cases when other worker threads, etc work on the HttpSM.\r\n\r\nDuring my engine development there were some very odd timings which exposed some crashes due to unlocked HttpSM."},"comment":{"url":"https://api.github.com/repos/apache/trafficserver/issues/comments/408896989","html_url":"https://github.com/apache/trafficserver/pull/4019#issuecomment-408896989","issue_url":"https://api.github.com/repos/apache/trafficserver/issues/4019","id":408896989,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODg5Njk4OQ==","user":{"login":"shinrich","id":334488,"node_id":"MDQ6VXNlcjMzNDQ4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T15:07:48Z","updated_at":"2018-07-30T15:07:48Z","author_association":"MEMBER","body":"If you have a mutex associated with the continuation, there is no case where you should be calling the handleEvent without the lock.  I can hunt down the cases that aren't grabbing the lock and do a try lock there, but in that case I would want to put a ink_release cert in handleEvent.  If it very risky and vulnerable to race conditions to be calling the event handler on a continuation without holding its lock."}}
{"actor":{"display_login":"shinrich"}}