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

Issue 3911 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 21
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Sign in to add a comment

tsan2 found races in webrtc/base (Thread::Clear, MessageQueueManager::Clear)

Reported by, Oct 9 2014

Issue description

See for suppressions.

Repo: remove suppression and run rtc_unittest under tsan2 (linux).

Comment 1 by, Dec 17 2014

Labels: Area-Video
Project Member

Comment 2 by, Dec 17 2014

Labels: -Area-Video Area-Internals

Comment 3 by, Feb 3 2015

Project Member

Comment 4 by, Mar 27 2015

The following revision refers to this bug:

commit 1d36003181fed7a23537ebdeaca74ef9f50bed8f
Author: Henrik Kjellander <>
Date: Fri Mar 27 12:46:34 2015

Suppress TSan errors triggered when deadlock detection is enabled.

These are problematic when running with the default TSan
settings which has deadlock detection enabled.
Our bots still run with it disabled but we want to be
able to turn it back on, thus this is needed.

BUG= 3911 ,4456
Successfully executed:
GYP_DEFINES="tsan=1 release_extra_cflags=-g use_allocator=none" webrtc/build/gyp_webrtc
ninja -C out/Release rtc_unittests

Review URL:

Cr-Commit-Position: refs/heads/master@{#8879}


Project Member

Comment 5 by, Nov 3 2016

This bus has not been modified for more than a year. Is this still a valid issue?
Project Member

Comment 6 by, Nov 7 2016

Owner: ----
Status: Available (was: Assigned)
I believe so, the suppressions are still there:

I don't think it makes sense for juberti to own the bug though.
Project Member

Comment 7 by, Feb 24 2017

The following revision refers to this bug:

commit 162cb53e7b6b892ef5201c5ce242520694bab9c1
Author: deadbeef <>
Date: Fri Feb 24 01:10:07 2017

Making AsyncInvoker destructor thread-safe.

The documentation for AsyncInvoker states that it owns the lifetime of
calls, and when its destructor is called, all in-flight calls are
cancelled or finish executing. The "cancelled" part is working, but if
a call is in the middle of executing, the destructor does *not* wait.

This is fixed by keeping a count of pending invocations, which is
decremented when a call is either cleared from a message queue or
finishes executing.

BUG= webrtc:3914 ,  webrtc:3911 

Cr-Commit-Position: refs/heads/master@{#16811}


Project Member

Comment 8 by, Apr 6 2017

Summary: tsan2 found races in webrtc/base (Thread::Clear, MessageQueueManager::Clear) (was: tsan2 found races in webrtc/base)
Project Member

Comment 9 by, Mar 5 2018

The following revision refers to this bug:

commit 08672605906581c818ae428d9f2a2de489278d34
Author: Taylor Brandstetter <>
Date: Mon Mar 05 20:09:20 2018

Fixing data race on vptr of Thread subclasses.

Thread's constructor calls DoInit, which registers itself with the
MessageQueueManager. This could result in the vptr being read before
the subclass has had a chance to modify it (for example, if another
thread happens to call MessageQueueManager::Clear at the right time).

This is exactly why there's a "DoInit" method, which is intended to be
called by the fully instantiated subclass. This was being done between
MessageQueue/Thread, but not between Thread and its subclasses.

Bug:  webrtc:3911 
Change-Id: I94d8855da56d9aaf22470ddca12d0b1dd5de249d
Reviewed-by: Bjorn Mellem <>
Reviewed-by: Niels Moller <>
Commit-Queue: Taylor Brandstetter <>
Cr-Commit-Position: refs/heads/master@{#22297}

Project Member

Comment 10 by, Jun 20

The following revision refers to this bug:

commit 3d8b171fe35d06df4a5b388730af3464a08831de
Author: Taylor Brandstetter <>
Date: Wed Jun 20 19:42:48 2018

Removing some TSan suppressions around Thread class.

Specifically, removing suppressions for:


These issues have hopefully been fixed by this and other CLs:


Bug:  webrtc:3911 , webrtc:4456
Change-Id: I12ce9df0d74381cce4a05e69382029d7fabe2c42
Commit-Queue: Taylor Brandstetter <>
Reviewed-by: Patrik Höglund <>
Cr-Commit-Position: refs/heads/master@{#23689}

Project Member

Comment 11 by, Jun 21

Status: Fixed (was: Available)

Sign in to add a comment