New issue
Advanced search Search tips

Issue 891599 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ResetAfterFirstConfigInfo VDA unittest triggers DCHECK() on Hana in import mode

Project Member Reported by acourbot@chromium.org, Oct 3

Issue description

./video_decode_accelerator_unittest --single-process-tests --disable_rendering --test_video_data=test-25fps.vp9:320:240:250:250:35:150:12 --test_import
...
[ RUN      ] ResetAfterFirstConfigInfo/VideoDecodeAcceleratorParamTest.TestSimpleDecode/0
[12649:12708:1003/142210.010485:77046385935:FATAL:v4l2_video_decode_accelerator.cc(639)] Check failed: kAwaitingPictureBuffers == decoder_state_ (5 vs. 3)
#0 0x00000a691014 base::debug::StackTrace::StackTrace()
#1 0x00000a581264 base::debug::StackTrace::StackTrace()
#2 0x00000a59c3e8 logging::LogMessage::~LogMessage()
#3 0x00000a54924a media::V4L2VideoDecodeAccelerator::ImportBufferForPictureTask()
#4 0x00000a55cf9a _ZN4base8internal13FunctorTraitsIMN5media26V4L2VideoDecodeAcceleratorEFviNSt3__16vectorINS_13ScopedGenericIiNS0_19ScopedFDCloseTraitsEEENS4_9allocatorIS8_EEEEiEvE6InvokeISD_PS3_JRKiSB_SI_EEEvT_OT0_DpOT1_
#5 0x00000a55cdec _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN5media26V4L2VideoDecodeAcceleratorEFviNSt3__16vectorINS_13ScopedGenericIiNS0_19ScopedFDCloseTraitsEEENS6_9allocatorISA_EEEEiEJPS5_RKiSD_SK_EEEvOT_DpOT0_
#6 0x00000a55cd5c _ZN4base8internal7InvokerINS0_9BindStateIMN5media26V4L2VideoDecodeAcceleratorEFviNSt3__16vectorINS_13ScopedGenericIiNS0_19ScopedFDCloseTraitsEEENS5_9allocatorIS9_EEEEiEJNS0_17UnretainedWrapperIS4_EEiNS0_13PassedWrapperISC_EEiEEEFvvEE7RunImplIRKSE_RKNS5_5tupleIJSG_iSI_iEEEJLj0ELj1ELj2ELj3EEEEvOT_OT0_NS5_16integer_sequenceIjJXspT1_EEEE
#7 0x00000a55cc34 _ZN4base8internal7InvokerINS0_9BindStateIMN5media26V4L2VideoDecodeAcceleratorEFviNSt3__16vectorINS_13ScopedGenericIiNS0_19ScopedFDCloseTraitsEEENS5_9allocatorIS9_EEEEiEJNS0_17UnretainedWrapperIS4_EEiNS0_13PassedWrapperISC_EEiEEEFvvEE3RunEPNS0_13BindStateBaseE
#8 0x0000094f7194 _ZNO4base12OnceCallbackIFvvEE3RunEv
#9 0x00000a6c5a26 base::debug::TaskAnnotator::RunTask()
#10 0x00000a5a6636 base::MessageLoop::RunTask()
#11 0x00000a5a6870 base::MessageLoop::DeferOrRunPendingTask()
#12 0x00000a5a6b94 base::MessageLoop::DoWork()
#13 0x00000a5ac436 base::MessagePumpDefault::Run()
#14 0x00000a5a6150 base::MessageLoop::Run()
#15 0x00000a5ea336 base::RunLoop::Run()
#16 0x00000a634f4a base::Thread::Run()
#17 0x00000a635638 base::Thread::ThreadMain()
#18 0x00000a6aa2aa base::(anonymous namespace)::ThreadFunc()

This happens because ImportBufferForPictureTask() is called right after we enter reset state, making the DCHECK() fail.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 11

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

commit 15bc312282ebebc831752c530b1b661baf66c6b5
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Thu Oct 11 04:19:41 2018

media/gpu/v4l2vda: fix reset handling in ImportBufferForPictureTask()

ImportBufferForPictureTask() creates the image processor when handling
the first buffer. On doing so, it DCHECK()s that we are in the
kAwaitingPictureBuffers state.

However, right before this check we are potentially calling
FinishReset(), which may change the state to kReset and make this
DCHECK() fail.

Fix this by moving the FinishReset() to after we create the image
processor instance. While at it, move the DCHECK() to the beginning of
the block.

BUG= 891599 
Test=Checked the VDA unittest was passing on Hana in import mode

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I35d2aa134209b5bd8061e5be6df3e78d88fcb5fd
Reviewed-on: https://chromium-review.googlesource.com/c/1257790
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598667}
[modify] https://crrev.com/15bc312282ebebc831752c530b1b661baf66c6b5/media/gpu/v4l2/v4l2_video_decode_accelerator.cc

Status: Fixed (was: Started)
Marking fixed as the CL has landed.

Sign in to add a comment