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

Issue 920908 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

video thumbnail is broken from M72 on nyan

Project Member Reported by hiroh@chromium.org, Jan 11

Issue description

Access http://crosvideo.appspot.com/?codec=h264&resolution=1080.
The video there will not automatically plays and instead you see video thumbnail.
The thumbnail looks good on M71 on nyan_big.
But the thumbnail is corrupt on M72 on nyan_big as attached image.
This seems a regression from some point on M72.
We need to bisect.
 
nyan_thumbnail_corruption.png
35.6 KB View Download
Cc: -hiroh@chromium.org
Owner: hiroh@chromium.org
Cc: hiroh@chromium.org
Owner: acourbot@chromium.org
Summary: video thumbnail is broken from M72 on nyan (was: video thumbnail is broken in M72 on nyan)
As I bisect, this issue starts from the following commit.
"media/gpu/v4l2: lazy-assign EGLImages to image processor buffers"
https://chromium-review.googlesource.com/c/chromium/src/+/1288498

I verified reverting this CL on Chrome ToT resolves this issue.
Alex, could you take a look?

By the way, the CL makes the problem serious and always happen. However, even before the CL, sometimes a part of thumbnail is invalid on nyan_big (See attached image). There must be some other issue.
thumbnail_corruption2.png
584 KB View Download
Status: Assigned (was: Available)
I'm a bit flooded, but will try to take a look later today.

Comment 4 by acourbot@chromium.org, Yesterday (47 hours ago)

I think the observation of #2 might be fixed by crrev.com/c/1424629. This does not fix the initial problem though, it seems like we have a race condition between EGLImage creation and the buffer being passed to the client.

Comment 5 by acourbot@chromium.org, Yesterday (47 hours ago)

Status: Started (was: Assigned)

Comment 6 by acourbot@chromium.org, Yesterday (47 hours ago)

Also FWIW the issue is still visible on R73 ToT.
Project Member

Comment 7 by bugdroid1@chromium.org, Yesterday (46 hours ago)

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

commit a2062b754caeca0f1ce708b686ee91a0fff2bad4
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Mon Jan 21 07:35:09 2019

media/gpu/v4l2: move picture clearing back to the correct thread

CL crrev.com/c/1391649 changed the thread on which picture clearing
takes place from the child thread to the decode thread. This can result
in a picture being sent before an EGLImage is created for it, since the
later event happens on the child thread and is scheduled before the
picture clearing. Moving picture clearing to the decoder thread removes
any order guarantee that we had before.

Revert this part to what it was before crrev.com/c/1391649 since it
seems to be a typo.

Bug:  917310 
Bug: 920908
Test: VDA passing in debug mode on nyan_big
Change-Id: Ic44c37f6aaa6a966c2f11a5e7363975229ec04a8
Reviewed-on: https://chromium-review.googlesource.com/c/1424629
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624526}
[modify] https://crrev.com/a2062b754caeca0f1ce708b686ee91a0fff2bad4/media/gpu/v4l2/v4l2_video_decode_accelerator.cc

Comment 8 by acourbot@chromium.org, Yesterday (46 hours ago)

https://chromium-review.googlesource.com/c/chromium/src/+/1424683 should be the fix for this, PTAL!
Project Member

Comment 9 by bugdroid1@chromium.org, Yesterday (45 hours ago)

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

commit c5ccd039a73e8f7226ae0d5d3848600c99899354
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Mon Jan 21 09:16:56 2019

media/gpu/v4l2: do not start decoding before EGL image is assigned.

CL crrev.com/c/1288498 tried to optimize things a bit by assigning the
EGL image for a new buffer while the decoder started using said buffer.
This works on all platforms but Tegra: when doing so the first frame of
each buffer is a partially-cleared image without any trace of decoding.

What may be happening is that the Tegra EGL or V4L2 library clears the
buffers that are assigned to EGL images. This would explain the observed
behavior since the first frame is likely to get decoded into the buffer
before its EGL image is assigned. This would also explain why subsequent
frames are not affected.

Work this around by making sure that the buffer is not made available
for decoding before it is assigned an EGL image. This was the behavior
before crrev.com/c/1288498, so no performance penalty is introduced.

correct on nyan_big.

Bug: 920908
Test: Checked that H.264 playback on crosvideo.appspot.com was
Change-Id: I3bd79a02c82676b743305d23ac0691be7d67f8a7
Reviewed-on: https://chromium-review.googlesource.com/c/1424683
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624537}
[modify] https://crrev.com/c5ccd039a73e8f7226ae0d5d3848600c99899354/media/gpu/v4l2/v4l2_video_decode_accelerator.cc

Comment 10 by hiroh@chromium.org, Yesterday (44 hours ago)

Thanks Alex for fixing this so quickly!
Could you verify this on M72 and merge-request to M72?

Thanks!

Comment 11 by acourbot@chromium.org, Yesterday (44 hours ago)

Labels: Merge-Request-72
That wasn't exactly quick. :)

Requesting merge for M72 since the issue was initially reported there.
Project Member

Comment 12 by sheriffbot@chromium.org, Yesterday (44 hours ago)

Labels: -Merge-Request-72 Merge-Review-72 Hotlist-Merge-Review
This bug requires manual review: We are only 7 days from stable.
Please contact the milestone owner if you have questions.
Owners: govind@(Android), kariahda@(iOS), djmm@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 13 by hiroh@chromium.org, Today (5 hours ago)

Labels: -Hotlist-Merge-Review -Merge-Review-72
It turns out the CL#9 breaks playback starts on hana.
Remove Merge-Request labels.

Comment 14 by hiroh@chromium.org, Today (5 hours ago)

Reproduce step:
1.) Play any video on crosvideo.appspot.com or youtube.com
2.) Push play button on HTML5 Player.
3.) Video player shows loading icon and video playback doesn't start forever.

Comment 15 by acourbot@chromium.org, Today (3 hours ago)

Could confirm that VDA unittest remains stuck on trying to playback the video on Hana. This is likely due to me overlooking the code path when an image processor is present.

Comment 16 by acourbot@chromium.org, Today (3 hours ago)

Found the issue, trying the fix on both Hana and Nyan, with import mode enabled/disabled and with rendering on/off to make sure I haven't missed anything. Will take some time to complete the tests.

Comment 17 by acourbot@chromium.org, Today (113 minutes ago)

Cc: djmm@chromium.org
Labels: Merge-Request-72
Fix for Hana has been merged.

djmm, can we have permission to merge these three small CLs into M72? 

https://chromium-review.googlesource.com/c/1424629
https://chromium-review.googlesource.com/c/1424683
https://chromium-review.googlesource.com/c/1428623

Without them Nyan will glitch during video playback as shown in the first post.
Project Member

Comment 18 by sheriffbot@chromium.org, Today (112 minutes ago)

Labels: -Merge-Request-72 Merge-Review-72 Hotlist-Merge-Review
This bug requires manual review: We are only 5 days from stable.
Please contact the milestone owner if you have questions.
Owners: govind@(Android), kariahda@(iOS), djmm@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 19 by acourbot@chromium.org, Today (109 minutes ago)

Sign in to add a comment