New issue
Advanced search Search tips

Issue 879152 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug
Proj-Servicification



Sign in to add a comment

SerialWorker may leak if browser is shutting down

Reported by x...@yandex-team.ru, Aug 30

Issue description

There are ASAN warnings in some tests, like services_unittests.NetworkContextTest caused by DnsConfigServicePosix::HostsReader instance not being deleted. This happens due to PostTaskAndReply behavior, when it attempts to post reply task, and fails due to original task runner no longer accepting tasks. It then tries to delete its own instance via DeleteSoon, which also fails, leaking ref to HostsReader.
 
Components: Internals>Network>DNS Internals>Services>Network
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24c51bc6acb53bead3a6b5949f260a6641aa902b

commit 24c51bc6acb53bead3a6b5949f260a6641aa902b
Author: Leonid Kaplan <xeor@yandex-team.ru>
Date: Tue Sep 04 13:23:16 2018

Fix possible shutdown leak in SerialWorker

SerialWorker instances could leak when the original task runner is
shutting down and no longer accepting tasks. This is because of the
implementation of ~PostTaskAndReplyRelay, which attempts to destroy its
own instance by DeleteSoon, which is also not accepted by the task
runner. This behavior produces warnings in ASAN builds, for example when
an instance of DnsConfigServicePosix::HostsReader is destroyed in
services_unittests.NetworkContextTest.

BUG=879152

Change-Id: I48df8e3171975ff6f11fe0676e456f8e8b756ec9
Reviewed-on: https://chromium-review.googlesource.com/1193344
Reviewed-by: Bence Béky <bnc@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588499}
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.cc
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.h

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24c51bc6acb53bead3a6b5949f260a6641aa902b

commit 24c51bc6acb53bead3a6b5949f260a6641aa902b
Author: Leonid Kaplan <xeor@yandex-team.ru>
Date: Tue Sep 04 13:23:16 2018

Fix possible shutdown leak in SerialWorker

SerialWorker instances could leak when the original task runner is
shutting down and no longer accepting tasks. This is because of the
implementation of ~PostTaskAndReplyRelay, which attempts to destroy its
own instance by DeleteSoon, which is also not accepted by the task
runner. This behavior produces warnings in ASAN builds, for example when
an instance of DnsConfigServicePosix::HostsReader is destroyed in
services_unittests.NetworkContextTest.

BUG=879152

Change-Id: I48df8e3171975ff6f11fe0676e456f8e8b756ec9
Reviewed-on: https://chromium-review.googlesource.com/1193344
Reviewed-by: Bence Béky <bnc@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588499}
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.cc
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.h

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24c51bc6acb53bead3a6b5949f260a6641aa902b

commit 24c51bc6acb53bead3a6b5949f260a6641aa902b
Author: Leonid Kaplan <xeor@yandex-team.ru>
Date: Tue Sep 04 13:23:16 2018

Fix possible shutdown leak in SerialWorker

SerialWorker instances could leak when the original task runner is
shutting down and no longer accepting tasks. This is because of the
implementation of ~PostTaskAndReplyRelay, which attempts to destroy its
own instance by DeleteSoon, which is also not accepted by the task
runner. This behavior produces warnings in ASAN builds, for example when
an instance of DnsConfigServicePosix::HostsReader is destroyed in
services_unittests.NetworkContextTest.

BUG=879152

Change-Id: I48df8e3171975ff6f11fe0676e456f8e8b756ec9
Reviewed-on: https://chromium-review.googlesource.com/1193344
Reviewed-by: Bence Béky <bnc@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588499}
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.cc
[modify] https://crrev.com/24c51bc6acb53bead3a6b5949f260a6641aa902b/net/dns/serial_worker.h

Labels: Hotlist-KnownIssue

Sign in to add a comment