{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/15828","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/15828/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/15828/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/15828/events","html_url":"https://github.com/grpc/grpc/pull/15828","id":334295910,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MzA3NjE3","number":15828,"title":"WORK IN PROGRESS: Explicitly delete c-ares fd's from pollset set after c-ares is done","user":{"login":"apolcyn","id":9566254,"node_id":"MDQ6VXNlcjk1NjYyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9566254?v=4","gravatar_id":"","url":"https://api.github.com/users/apolcyn","html_url":"https://github.com/apolcyn","followers_url":"https://api.github.com/users/apolcyn/followers","following_url":"https://api.github.com/users/apolcyn/following{/other_user}","gists_url":"https://api.github.com/users/apolcyn/gists{/gist_id}","starred_url":"https://api.github.com/users/apolcyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apolcyn/subscriptions","organizations_url":"https://api.github.com/users/apolcyn/orgs","repos_url":"https://api.github.com/users/apolcyn/repos","events_url":"https://api.github.com/users/apolcyn/events{/privacy}","received_events_url":"https://api.github.com/users/apolcyn/received_events","type":"User","site_admin":false},"labels":[{"id":180840978,"node_id":"MDU6TGFiZWwxODA4NDA5Nzg=","url":"https://api.github.com/repos/grpc/grpc/labels/disposition/DO%20NOT%20MERGE","name":"disposition/DO NOT MERGE","color":"5319e7","default":false},{"id":155504842,"node_id":"MDU6TGFiZWwxNTU1MDQ4NDI=","url":"https://api.github.com/repos/grpc/grpc/labels/kind/bug","name":"kind/bug","color":"93732c","default":false},{"id":218696181,"node_id":"MDU6TGFiZWwyMTg2OTYxODE=","url":"https://api.github.com/repos/grpc/grpc/labels/lang/core","name":"lang/core","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":{"login":"markdroth","id":18664614,"node_id":"MDQ6VXNlcjE4NjY0NjE0","avatar_url":"https://avatars2.githubusercontent.com/u/18664614?v=4","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false},"assignees":[{"login":"markdroth","id":18664614,"node_id":"MDQ6VXNlcjE4NjY0NjE0","avatar_url":"https://avatars2.githubusercontent.com/u/18664614?v=4","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-06-21T00:37:05Z","updated_at":"2018-06-21T19:14:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/15828","html_url":"https://github.com/grpc/grpc/pull/15828","diff_url":"https://github.com/grpc/grpc/pull/15828.diff","patch_url":"https://github.com/grpc/grpc/pull/15828.patch"},"body":"In all of the existing tests for c-ares right now, the driving pollset set is quickly and completely unref'd and destroyed as soon as the test is over (by the channel). Google default credentials introduces a special case in that the google default credentials object is created as a global and potentially left around for a long time -  it's user receives a [second ref of it](https://github.com/grpc/grpc/blob/master/src/core/lib/security/credentials/google_default/google_default_credentials.cc#L247). It appears that the OAuth fetcher within google default credentials effectively [refs that driving pollset set](https://github.com/grpc/grpc/blob/master/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc#L284) but then doesn't let that ref go until [it's destroyed](https://github.com/grpc/grpc/blob/master/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc#L113), and as a result when c-ares is used with google default creds, the fd's created by c-ares are added to driving pollset set are not unref'd in a timely manner.\r\n\r\nThis test is a little messy but it seems to be a minimal way of catching the earlier bug.\r\n\r\n(as a slightly separate issue, I'm having a hard time telling when `g_default_credentials` is fully unref'd - it <i>seems</i> to need `grpc_flush_cached_google_default_credentials` to be called?).\r\n\r\n----\r\n\r\ntest needs more investigation for poll and poll-cv failures"},"comment":{"url":"https://api.github.com/repos/grpc/grpc/issues/comments/399212982","html_url":"https://github.com/grpc/grpc/pull/15828#issuecomment-399212982","issue_url":"https://api.github.com/repos/grpc/grpc/issues/15828","id":399212982,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTIxMjk4Mg==","user":{"login":"grpc-testing","id":28024233,"node_id":"MDQ6VXNlcjI4MDI0MjMz","avatar_url":"https://avatars1.githubusercontent.com/u/28024233?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc-testing","html_url":"https://github.com/grpc-testing","followers_url":"https://api.github.com/users/grpc-testing/followers","following_url":"https://api.github.com/users/grpc-testing/following{/other_user}","gists_url":"https://api.github.com/users/grpc-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc-testing/subscriptions","organizations_url":"https://api.github.com/users/grpc-testing/orgs","repos_url":"https://api.github.com/users/grpc-testing/repos","events_url":"https://api.github.com/users/grpc-testing/events{/privacy}","received_events_url":"https://api.github.com/users/grpc-testing/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T19:14:43Z","updated_at":"2018-06-21T19:14:43Z","author_association":"NONE","body":"```\n****************************************************************\n\nlibgrpc.so\n\n     VM SIZE                                                                                        FILE SIZE\n ++++++++++++++ GROWING                                                                          ++++++++++++++\n  +0.0%    +106 [None]                                                                              +394  +0.0%\n  +3.3%     +48 src/core/lib/iomgr/iomgr.cc                                                          +48  +3.3%\n      [NEW]     +41 grpc_iomgr_count_objects_for_testing                                                 +41  [NEW]\n       +15%      +7 [Unmapped]                                                                            +7   +15%\n   +11%     +38 src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posi     +38   +11%\n       +23%     +22 grpc_core::GrpcPolledFdPosix::~GrpcPolledFdPosix                                     +22   +23%\n       +22%     +22 grpc_core::NewGrpcPolledFdLocked                                                     +22   +22%\n\n  +0.0%    +192 TOTAL                                                                               +480  +0.0%\n\n\n****************************************************************\n\nlibgrpc++.so\n\n     VM SIZE        FILE SIZE\n ++++++++++++++  ++++++++++++++\n\n  [ = ]       0        0  [ = ]\n\n\n\n```"}}
{"actor":{"display_login":"grpc-testing"}}