New issue
Advanced search Search tips

Issue 736918 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 721812



Sign in to add a comment

[VideoCapture] WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc has a race condition

Project Member Reported by chfremer@chromium.org, Jun 26 2017

Issue description

The test starts a local Apprtc server, then connects to the same room from two tabs.

When the second tab is opened too soon, it can happen that the first tab never gets to request video capture to start, probably because its execution is suspended while it is not in the foreground.

This issue was first detected by the test failing (timing out) after enabling the video capture service in CL https://chromium-review.googlesource.com/c/524298/. This CL triggered the race condition on certain bots, because it adds a few milliseconds of process startup delay to the first video capture request.

The issue easily reproduces without enabling the video capture service by adding a small delay to the in-process video capture stack, for example by changing the PostTask at [1] to a PostDelayedTask.

[1] https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/in_process_video_capture_provider.cc?dr=CSs&l=55
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2017

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

commit 0e93d872a95a81445e43e997e11ace3ce919dcc6
Author: Christian Fremerey <chfremer@chromium.org>
Date: Tue Jun 27 21:47:29 2017

[Video Capture] Fix race condition in WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc

This CL fixes a race condition in test
WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc.

For an analysis of the condition, see the bug entry.

The proposed solution is to wait for the local video capture to start before
opening the second tab.

Bug:  736918 
Test: browser_tests --gtest_filter="*WorksOnApprtc*" --run-manual
Change-Id: I2a6ecfd5225c8853f706b2636e1916dd2aaae549
Reviewed-on: https://chromium-review.googlesource.com/549158
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482757}
[modify] https://crrev.com/0e93d872a95a81445e43e997e11ace3ce919dcc6/chrome/browser/media/webrtc/webrtc_apprtc_browsertest.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment