New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 631491 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

RefCountedDeleteOnMessageLoop + IPC::Channel = leaks

Project Member Reported by roc...@chromium.org, Jul 26 2016

Issue description

Particularly in unit tests which use an in-process ChildThreadImpl, this leads to racy leaks as the main thread is shut down before the IO thread and the task to free the unref'd ChannelAssocatiedGroupController may only be posted after the main thread's MessageLoop has completely quit.

We don't strictly need to use RefCountedDeleteOnMessageLoop since the only state which needs to be torn down on a specific thread is the Connector and its sink.

Given the potential for these races to crop up in many existing tests (much to the confusion of whichever unlucky developer/sheriff encounters them) I think we should get rid of this usage and find another way to safely clean up these objects. WDYT?
 

Comment 1 by roc...@chromium.org, Jul 26 2016

Cc: roc...@chromium.org
 Issue 630985  has been merged into this issue.

Comment 2 by roc...@chromium.org, Jul 26 2016

Status: Started (was: Assigned)

Comment 3 by yzshen@chromium.org, Jul 26 2016

Yeah. I have similar idea that we should get rid of RefCountedDeleteOnMessageLoop. Is it sufficient that Connector should be closed on the receiving thread but it is okay to destruct on any thread after that?

Comment 4 by roc...@chromium.org, Jul 26 2016

Yep, that's what I was going to do too
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 27 2016

Comment 6 by roc...@chromium.org, Jul 27 2016

Status: Fixed (was: Started)

Sign in to add a comment