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

Issue 740054 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Pulse fails creating output stream with kMaximumOutputBufferSize

Reported by andrew.macpherson@soundtrap.com, Jul 7 2017

Issue description

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

Steps to reproduce the problem:
Filing this from a discussion with dalecurtis@ here: https://codereview.chromium.org/2908073002/#msg91

The CL made it possible to create audio streams with buffer sizes between the min/max buffer sizes for each platform, however in the Pulse case trying to create a stream with the Pulse-specific max buffer size of 8192 resulted in failures in the FYI builds, more info here:

https://bugs.chromium.org/p/chromium/issues/detail?id=708917#c6

What appears to be happening is that in pulse_output.cc:136 (where the CHECK fails) we want to create a Pulse buffer of the required size, which in this case is 65536 (8192 frames per buffer * 2 bytes per sample * 4 channels). However Pulse internally has a max memory pool block size of 65536 - 64 (size of the block header) = 65472, which is the size returned by pa_stream_begin_write() and reported by the failing test.

dalecurtis@ says: Fixing the pulse code is the right thing to do if we want these new buffer sizes to be supported there. On very rare occasion someone hits that check with the current buffer sizes, so that's another reason for fixing the pulse code.

For now the Pulse-related changes were removed from the referenced CL but could be re-added once the underlying Pulse issue is fixed.

What is the expected behavior?

What went wrong?
Crash on the a Linux FYI build machine.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3071.115  Channel: stable
OS Version: OS X 10.12.5
Flash Version:
 
Cc: dalecur...@chromium.org
Components: Blink>Media>Audio
As per the above comment adding @dalecurtis for more updates on this issue.
Components: -Blink>Media>Audio Internals>Media>Audio
Labels: -OS-Mac OS-Linux
Cc: -dalecur...@chromium.org
Owner: dalecur...@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: raymes@chromium.org alokp@chromium.org hdodda@chromium.org
 Issue 786562  has been merged into this issue.
Owner: tmathmeyer@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 7 2017

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

commit a84bd68c5749fc38a76d4ffb42c7e036a3e6deb2
Author: Ted Meyer <tmathmeyer@chromium.org>
Date: Thu Dec 07 00:57:58 2017

Fix for PA buffer size allocation too small

PA pa_stream_begin_write() allocates a maximum of 8184, which can cause
a check fail when the audio-buffer-size is greater than that. To fix
this, we just have to write as many as will fit in the allocated space,
allocate another space, and write the remainder.

BUG= 740054 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I4effc3a405c1bfe2727a688b237841470dc1efd4
Reviewed-on: https://chromium-review.googlesource.com/809334
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522285}
[modify] https://crrev.com/a84bd68c5749fc38a76d4ffb42c7e036a3e6deb2/media/audio/pulse/pulse_output.cc

Status: Fixed (was: Assigned)

Sign in to add a comment