{"action":"created","issue":{"url":"https://api.github.com/repos/baidu/tera/issues/948","repository_url":"https://api.github.com/repos/baidu/tera","labels_url":"https://api.github.com/repos/baidu/tera/issues/948/labels{/name}","comments_url":"https://api.github.com/repos/baidu/tera/issues/948/comments","events_url":"https://api.github.com/repos/baidu/tera/issues/948/events","html_url":"https://github.com/baidu/tera/pull/948","id":167582235,"number":948,"title":"issue=#462 bugfix.tera_c-lock","user":{"login":"taocp","id":5194281,"avatar_url":"https://avatars.githubusercontent.com/u/5194281?v=3","gravatar_id":"","url":"https://api.github.com/users/taocp","html_url":"https://github.com/taocp","followers_url":"https://api.github.com/users/taocp/followers","following_url":"https://api.github.com/users/taocp/following{/other_user}","gists_url":"https://api.github.com/users/taocp/gists{/gist_id}","starred_url":"https://api.github.com/users/taocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taocp/subscriptions","organizations_url":"https://api.github.com/users/taocp/orgs","repos_url":"https://api.github.com/users/taocp/repos","events_url":"https://api.github.com/users/taocp/events{/privacy}","received_events_url":"https://api.github.com/users/taocp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bluebore","id":6851389,"avatar_url":"https://avatars.githubusercontent.com/u/6851389?v=3","gravatar_id":"","url":"https://api.github.com/users/bluebore","html_url":"https://github.com/bluebore","followers_url":"https://api.github.com/users/bluebore/followers","following_url":"https://api.github.com/users/bluebore/following{/other_user}","gists_url":"https://api.github.com/users/bluebore/gists{/gist_id}","starred_url":"https://api.github.com/users/bluebore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluebore/subscriptions","organizations_url":"https://api.github.com/users/bluebore/orgs","repos_url":"https://api.github.com/users/bluebore/repos","events_url":"https://api.github.com/users/bluebore/events{/privacy}","received_events_url":"https://api.github.com/users/bluebore/received_events","type":"User","site_admin":false},"assignees":[{"login":"bluebore","id":6851389,"avatar_url":"https://avatars.githubusercontent.com/u/6851389?v=3","gravatar_id":"","url":"https://api.github.com/users/bluebore","html_url":"https://github.com/bluebore","followers_url":"https://api.github.com/users/bluebore/followers","following_url":"https://api.github.com/users/bluebore/following{/other_user}","gists_url":"https://api.github.com/users/bluebore/gists{/gist_id}","starred_url":"https://api.github.com/users/bluebore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluebore/subscriptions","organizations_url":"https://api.github.com/users/bluebore/orgs","repos_url":"https://api.github.com/users/bluebore/repos","events_url":"https://api.github.com/users/bluebore/events{/privacy}","received_events_url":"https://api.github.com/users/bluebore/received_events","type":"User","site_admin":false},{"login":"caijieming-baidu","id":13461134,"avatar_url":"https://avatars.githubusercontent.com/u/13461134?v=3","gravatar_id":"","url":"https://api.github.com/users/caijieming-baidu","html_url":"https://github.com/caijieming-baidu","followers_url":"https://api.github.com/users/caijieming-baidu/followers","following_url":"https://api.github.com/users/caijieming-baidu/following{/other_user}","gists_url":"https://api.github.com/users/caijieming-baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/caijieming-baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caijieming-baidu/subscriptions","organizations_url":"https://api.github.com/users/caijieming-baidu/orgs","repos_url":"https://api.github.com/users/caijieming-baidu/repos","events_url":"https://api.github.com/users/caijieming-baidu/events{/privacy}","received_events_url":"https://api.github.com/users/caijieming-baidu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-07-26T11:13:25Z","updated_at":"2016-07-27T04:47:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/baidu/tera/pulls/948","html_url":"https://github.com/baidu/tera/pull/948","diff_url":"https://github.com/baidu/tera/pull/948.diff","patch_url":"https://github.com/baidu/tera/pull/948.patch"},"body":"#462 \r\n\r\n<img width=\"564\" alt=\"screen shot 2016-07-26 at 19 04 56\" src=\"https://cloud.githubusercontent.com/assets/5194281/17135756/e1e848b2-5363-11e6-831f-8a804914f842.png\">\r\n\r\n存在时序问题。\r\n\r\n如图，如代码。\r\n\r\n有个map的key是new RowReader得到的指针。\r\n\r\ntime-0时刻，线程a 释放mutex执行用户回调\r\ntime-1时刻，线程a 在回调中delete掉这个RowReader 0x123\r\ntime-2时刻，线程b 可能在new RowReader时分配到相同的地址（0x123）并insert到这个map里（失败但并没有检查，没有检查是因为理论上不会失败。。）\r\ntime-3时刻，线程a 执行完回调重新拿到mutex，然后从map里把（0x123） erase掉。（线程b 下次再去查找0x123时就失败了）\r\n"},"comment":{"url":"https://api.github.com/repos/baidu/tera/issues/comments/235482963","html_url":"https://github.com/baidu/tera/pull/948#issuecomment-235482963","issue_url":"https://api.github.com/repos/baidu/tera/issues/948","id":235482963,"user":{"login":"taocp","id":5194281,"avatar_url":"https://avatars.githubusercontent.com/u/5194281?v=3","gravatar_id":"","url":"https://api.github.com/users/taocp","html_url":"https://github.com/taocp","followers_url":"https://api.github.com/users/taocp/followers","following_url":"https://api.github.com/users/taocp/following{/other_user}","gists_url":"https://api.github.com/users/taocp/gists{/gist_id}","starred_url":"https://api.github.com/users/taocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taocp/subscriptions","organizations_url":"https://api.github.com/users/taocp/orgs","repos_url":"https://api.github.com/users/taocp/repos","events_url":"https://api.github.com/users/taocp/events{/privacy}","received_events_url":"https://api.github.com/users/taocp/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T04:47:26Z","updated_at":"2016-07-27T04:47:26Z","body":"这个场景下用指针本来没事，主要是我用法有问题 :joy: 。现在已经修复啦。"}}
{"actor":{"display_login":"taocp"}}