New issue
Advanced search Search tips

Issue 849189 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Web Audio output goes silent after some time

Reported by amacpherson@spotify.com, Jun 4 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce the problem:
1. Download the attached bug.html and click in the document area to run the Javascript.
2. After 2 seconds a tone will play.
3. In earlier Chrome the tone will play forever but after 1 to 20 seconds (the amount varies) audio will go silent and won't return. Doesn't occur with 100% reproducibility but happens about 50% of the time here.

What is the expected behavior?

What went wrong?
We received reports of audio randomly going silent during playback in Soundtrap with Chrome 67 and after a bit of digging around came up with this repro case which I think may be representative of the problem (same symptoms at least).

Happening in Stable 67.0.3396.62 and also confirmed in Canary 69.0.3447.3, though it seems to take more time in Canary before it happens. I'm not able to reproduce the issue in an old build of 66.0.3359.0.

Did this work before? Yes 66.0.3359.0

Does this work in other browsers? Yes

Chrome version: 67.0.3396.62  Channel: stable
OS Version: OS X 10.13.4
Flash Version:
 
bug.html
430 bytes View Download
Cc: pbomm...@chromium.org
Labels: Needs-Triage-M67
Labels: Needs-Bisect
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Feedback
Thanks for filing the issue!

Unable to reproduce the issue on reported chrome version 67.0.3396.62 and on the latest canary 69.0.3449.0 using Mac 10.13.1 with the below mentioned steps.
1. Launched chrome
2. Downloaded bug.html file from C#0
3. Opened the downloaded file in a new tab and clicked on page.
Observed the audio(Beep...) being played after 2 seconds of click and continues sound is heard, even after waiting for 100+ seconds we didn't observe audio going mute. Checked the same multiple times, still we didn't observe the audio going mute.

@Reporter: Could you please let us know if we missed anything in the process. Any further inputs from your end will be helpful. And requesting you to check the same in a new profile & let us know its behaviour. 
Thanks @vamshi.kommuri, I just tried the repro script here again on Canary 69.0.3449.2 on Mac 10.13.5 in an incognito window (I assume this is the same as using a new profile?) and was able to reproduce it again nearly every time following the same steps so I'm not sure what the difference is.

I spoke with hongchan@ and rtoy@ yesterday and they acknowledged that they were able to reproduce the issue, hongchan@ mentioned that forcing garbage collection in the devtools seemed to cause it to happen more quickly so you could maybe try that and see if that causes the issue to appear?
Status: Available (was: Unconfirmed)
vamshi@

I was able to confirmed this issue on ToT yesterday. We started the investigation.

Comment 6 by rtoy@chromium.org, Jun 5 2018

And an easy way to repro is to open dev console and press the GC button after a short time.  
Just to add more info: the problem is fixed by adding infinite tail time to the delay node. So I speculate this is a tail time bug.

Comment 8 by rtoy@chromium.org, Jun 6 2018

Here's what's happening, I think.  Disconnecting g0 causes d0 and d1 to start tail processing to flush out all of their memory before disabling themselves.  This lasts 1 sec because maxDelayTime defaults to 1 sec.  This causes d0 and d1 to be placed on a tail processing list. When the tail is done, this nodes are moved to the finished list that eventually gets processed to disable the outputs of the node (an optimization in Chrome to minimize the cost nodes that aren't doing anything).

When g0 connects to d1, d1 no longer needs to deal with tail processing.  Currently, the tail list is checked and d1 is removed if it's there.  But it's not; it's on the finished list.  When the finished list is processed, d1's output is disabled.  That's why sound suddenly stops.

So one thing we need to do is to check the finished list and remove the node from there as well so that the output isn't disabled.
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 6 2018

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

commit 279360c05dc73d985beb135d221db376579e6128
Author: Raymond Toy <rtoy@chromium.org>
Date: Wed Jun 06 20:04:06 2018

Check finished handlers when making a connection

When a connection is made, we remove the node from the list of tail
processing nodes.  But we didn't remove the node from the list of
finished handlers.  This is needed too because if we don't, when the
finished handlers are processed, they'll disable their outputs
incorrectly.

Bug:  849189 
Test: 
Change-Id: I11a5467d8ed42d9819b19a63c27e7838225f39e1
Reviewed-on: https://chromium-review.googlesource.com/1087725
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565013}
[modify] https://crrev.com/279360c05dc73d985beb135d221db376579e6128/third_party/blink/renderer/modules/webaudio/audio_node.cc
[modify] https://crrev.com/279360c05dc73d985beb135d221db376579e6128/third_party/blink/renderer/modules/webaudio/audio_node.h
[modify] https://crrev.com/279360c05dc73d985beb135d221db376579e6128/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc

Comment 10 by rtoy@chromium.org, Jun 7 2018

Status: Verified (was: Available)
Andrew has verified that this is fixed.

Comment 11 by rtoy@chromium.org, Jun 7 2018

Labels: Merge-Request-68
This is a regression.  It would be nice to have this in M68 at least.
Project Member

Comment 12 by sheriffbot@chromium.org, Jun 7 2018

Labels: -Merge-Request-68 Hotlist-Merge-Review Merge-Review-68
This bug requires manual review: M68 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-68 Merge-Approved-68
Approved - branch:3440
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 11 2018

Labels: -merge-approved-68 merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f8c3776c2c1b801b228fc4358b208be567c8c3d

commit 6f8c3776c2c1b801b228fc4358b208be567c8c3d
Author: Raymond Toy <rtoy@chromium.org>
Date: Mon Jun 11 15:57:12 2018

Check finished handlers when making a connection

When a connection is made, we remove the node from the list of tail
processing nodes.  But we didn't remove the node from the list of
finished handlers.  This is needed too because if we don't, when the
finished handlers are processed, they'll disable their outputs
incorrectly.

Bug:  849189 
Test: 
Change-Id: I11a5467d8ed42d9819b19a63c27e7838225f39e1
Reviewed-on: https://chromium-review.googlesource.com/1087725
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#565013}(cherry picked from commit 279360c05dc73d985beb135d221db376579e6128)
Reviewed-on: https://chromium-review.googlesource.com/1094562
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#275}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/6f8c3776c2c1b801b228fc4358b208be567c8c3d/third_party/blink/renderer/modules/webaudio/audio_node.cc
[modify] https://crrev.com/6f8c3776c2c1b801b228fc4358b208be567c8c3d/third_party/blink/renderer/modules/webaudio/audio_node.h
[modify] https://crrev.com/6f8c3776c2c1b801b228fc4358b208be567c8c3d/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc

Sign in to add a comment