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

Issue 731568 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Data race in blink::AudioBufferSourceHandler::HandleStoppableSourceNode

Project Member Reported by ClusterFuzz, Jun 9 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=6070031195832320

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_tsan_chrome_mp
Platform Id: linux

Crash Type: Data race READ 8
Crash Address: 0x7b4400006de8
Crash State:
  blink::AudioBufferSourceHandler::HandleStoppableSourceNode
  blink::BaseAudioContext::PerformCleanupOnMainThread
  base::internal::Invoker<base::internal::BindState<void
  
Sanitizer: thread (TSAN)

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6070031195832320


Issue filed automatically.

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Components: Blink>WebAudio

Comment 2 by rtoy@chromium.org, Jun 9 2017

Owner: sigbjo...@opera.com
sigbjornf: Could you take a look?
Cc: rtoy@chromium.org
Offline audio rendering interfering with the main thread stopping added by r478084; thinking through an appropriate fix.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 12 2017

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

commit 7ad07b8cd01390ea3b8ec8e43c9827fb5f87891a
Author: sigbjornf <sigbjornf@opera.com>
Date: Mon Jun 12 18:03:27 2017

Avoid AudioBufferSourceHandler data race.

Following r478084, the main thread may contend with the audio thread
on accessing AudioBufferSourceNodeHandler's mutable state. Coordinate
such access by introducing a Mutex over |min_playback_rate_|.

Using atomic ops would be the natural choice for handling this, but
steering clear of those over doubles (cf. https://crrev.com/1256053006)
until std::atomic<> is allowed.

R=haraken,hongchan
BUG= 731568 

Review-Url: https://codereview.chromium.org/2929283002
Cr-Commit-Position: refs/heads/master@{#478679}

[modify] https://crrev.com/7ad07b8cd01390ea3b8ec8e43c9827fb5f87891a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
[modify] https://crrev.com/7ad07b8cd01390ea3b8ec8e43c9827fb5f87891a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h

Comment 5 by rtoy@chromium.org, Jun 12 2017

Cc: sigbjo...@opera.com ranjitkan@chromium.org
 Issue 731521  has been merged into this issue.
Project Member

Comment 6 by ClusterFuzz, Jun 13 2017

ClusterFuzz has detected this issue as fixed in range 478645:478687.

Detailed report: https://clusterfuzz.com/testcase?key=6070031195832320

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_tsan_chrome_mp
Platform Id: linux

Crash Type: Data race READ 8
Crash Address: 0x7b4400006de8
Crash State:
  blink::AudioBufferSourceHandler::HandleStoppableSourceNode
  blink::BaseAudioContext::PerformCleanupOnMainThread
  base::internal::Invoker<base::internal::BindState<void
  
Sanitizer: thread (TSAN)

Fixed: https://clusterfuzz.com/revisions?job=linux_tsan_chrome_mp&range=478645:478687

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6070031195832320


See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.

Comment 7 by sigbjo...@opera.com, Jun 13 2017

Status: Fixed (was: Untriaged)

Sign in to add a comment