Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Issue 2786503002: Potential deadlock in destructor of GpuJpegDecodeAcceleratorHost (Closed)

Created:
3 years, 8 months ago by chfremer
Modified:
3 years, 8 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, piman+watch_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

A deadlock could happen in the following situation: 1. As part of program shutdown, VideoCaptureManager::StopCaptureForClient() is called. This posts a task to destroy the capture device to the "device thread", which eventually leads to this destructor being called (on the "device thread"). 2. While things on the "device thread" are running asynchronously, BrowserMainLoop is being destroyed. It's destructor waits for the "device thread" (audio thread) to complete. 3. |io_task_runner_| does not accept the posted task anymore. 4. |event.Wait()| will wait indefinitely causing the shutdown to hang. This deadlock occurred on build bot linux_android_rel_ng in CL https://codereview.chromium.org/2772963002/. It reproduces locally on a Nexus 5 device running KitKat. In production, class GpuJpegDecodeAcceleratorHost is currenlty only used on Chrome OS, but it might happen there as well, since the situation does not appear to be platform-dependent. BUG=706186 TEST= content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" content_unittests --gtest_filter="*Video*" 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 Review-Url: https://codereview.chromium.org/2786503002 Cr-Commit-Position: refs/heads/master@{#460531} Committed: https://chromium.googlesource.com/chromium/src/+/c64c69fce0b29af200419ab2f9df75e3d8e693d5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -5 lines) Patch
M media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc View 1 chunk +8 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
chfremer
sandersd@: PTAL This is currently blocking the landing of CL https://codereview.chromium.org/2772963002/ because it causes a ...
3 years, 8 months ago (2017-03-28 22:57:35 UTC) #5
chfremer
mcasas@, emircan@: FYI
3 years, 8 months ago (2017-03-28 22:59:22 UTC) #7
sandersd (OOO until July 31)
Note that this isn't a complete fix, it's still possible to successfully post a task ...
3 years, 8 months ago (2017-03-28 23:21:41 UTC) #9
chfremer
On 2017/03/28 23:21:41, sandersd wrote: > Note that this isn't a complete fix, it's still ...
3 years, 8 months ago (2017-03-28 23:34:03 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2786503002/1
3 years, 8 months ago (2017-03-29 20:44:10 UTC) #14
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 20:52:07 UTC) #17
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/c64c69fce0b29af200419ab2f9df...

Powered by Google App Engine
This is Rietveld 408576698