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

Issue 683401 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 466729
issue 680597



Sign in to add a comment

GPU Hang after MediaCodec.setSurface() on some Marshmallow+ devices.

Project Member Reported by boliu@chromium.org, Jan 20 2017

Issue description

We started using MediaCodec.setSurface() in M56 for M+ devices, so I'd guess this is some device(s) handling this incorrectly.

Comment 2 by boliu@chromium.org, Jan 21 2017

blacklist-able?
Yeah, we'll have to plumb some blacklist bits, but is otherwise fairly easy since it's M+ only:

https://cs.chromium.org/chromium/src/media/filters/gpu_video_decoder.cc?l=229

You filtered the crashes to Mali-450MP, any reason why? If we blacklist all M,N Mali-450MP that will affect ~0.7% of M,N watch time. 

Comment 5 by boliu@chromium.org, Jan 21 2017

Labels: ReleaseBlock-Stable M-57
So should be ok to block m57 then?
Sure, we can figure out some blacklisting here. In case it's a video specific issue, here's the one SFW video I could find in crash URLs:

https://endlessvideo.com/watch?v=kiYVifQ90kE
Owner: dalecur...@chromium.org
Status: Assigned (was: Untriaged)
Looks like the #1 failing device is the ALE-L21 (actually the whole series of L21 devices account for 61% of crashes). We've had issues with this device in the past. I think liberato@ was going to order one per issue 650863.

liberato@, did you ever order this? I'll grab it from you tomorrow if so.
I didn't.  I think that i fixed 650863 then promptly forgot to order the phone.  Sorry about that.
Summary: GPU Hang after MediaCodec.setSurface() on some Marshmallow+ devices. (was: GPU hang in libstagefright on M ARM gpu)
liberato@ hadn't ordered one, I have one on the way and will be here Friday. Will see if I can repro and if this is an issue we can workaround or if we need to blacklist it. Given the long tail (~40%) of crashes, I'm hoping there is something we could do to prevent this hang.
Just got the device updated to M, ALE-L21 + setSurface == immediate failure. MediaCodec gives and takes a few buffers after the switch but then hangs shortly after and never returns any more input or output buffers. Seems like it's straight up broken. CTS test helpfully says "TODO" :|

https://android.googlesource.com/platform/cts/+/master/tests/tests/media/src/android/media/cts/AdaptivePlaybackTest.java#918

Will look into blacklisting options.
Looks like we'll have to go with blacklisting by Mali-450MP, just using *-L21 will only capture ~45% of the crashes versus ~72% with the GL renderer filter. Unfortunately to do that I need to plumb a gpu preferences bit since we can't easily access the GL renderer value from media/filters. Will start on that tomorrow.
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 7 2017

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

commit 8a5efb12a76b24de92a20a23f56d20aa9e22338b
Author: dalecurtis <dalecurtis@chromium.org>
Date: Tue Feb 07 02:17:21 2017

Make setOutputSurface, encrypted capabilities. Blacklist hi6210sft.

No need for platform specific define for encrypted hardware decode
support when we have a capability system; thus make support for
encrypted streams a capability.

We now have a device with broken MediaCodec.setOutputSurface(), so
make it a capability and blacklist the hardware platform common to
99% of the crashes (hi6210sft).

BUG= 683401 
TEST=p8lite no longer hangs on fullscreen transition.
CQ_INCLUDE_TRYBOTS=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/2677983004
Cr-Commit-Position: refs/heads/master@{#448514}

[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/base/android/media_codec_util.cc
[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/base/android/media_codec_util.h
[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/filters/gpu_video_decoder.cc
[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/gpu/android_video_decode_accelerator.cc
[modify] https://crrev.com/8a5efb12a76b24de92a20a23f56d20aa9e22338b/media/video/video_decode_accelerator.h

Labels: Merge-Request-57
Looks good on dev, marking as merge request.
Project Member

Comment 15 by sheriffbot@chromium.org, Feb 11 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

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

Comment 16 by bugdroid1@chromium.org, Feb 11 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3f399dec4ba3384929172a2ca92ab92a2a5132e

commit e3f399dec4ba3384929172a2ca92ab92a2a5132e
Author: Dale Curtis <dalecurtis@chromium.org>
Date: Sat Feb 11 01:01:24 2017

Merge M57: "Make setOutputSurface, encrypted capabilities. Blacklist hi6210sft."

No need for platform specific define for encrypted hardware decode
support when we have a capability system; thus make support for
encrypted streams a capability.

We now have a device with broken MediaCodec.setOutputSurface(), so
make it a capability and blacklist the hardware platform common to
99% of the crashes (hi6210sft).

BUG= 683401 
TEST=p8lite no longer hangs on fullscreen transition.
CQ_INCLUDE_TRYBOTS=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/2677983004
Cr-Commit-Position: refs/heads/master@{#448514}
(cherry picked from commit 8a5efb12a76b24de92a20a23f56d20aa9e22338b)

Review-Url: https://codereview.chromium.org/2693653003 .
Cr-Commit-Position: refs/branch-heads/2987@{#459}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java
[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/base/android/media_codec_util.cc
[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/base/android/media_codec_util.h
[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/filters/gpu_video_decoder.cc
[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/gpu/android_video_decode_accelerator.cc
[modify] https://crrev.com/e3f399dec4ba3384929172a2ca92ab92a2a5132e/media/video/video_decode_accelerator.h

Cc: amineer@chromium.org
Status: Fixed (was: Assigned)
We can merge back to M56 if there's going to be another update, it's currently ~12% of GPU crashes on stable. +amineer to make the call.
Labels: Merge-Review-56
I'll apply a Merge-Review-56 tag to this to keep it on my radar for respins, but as of now, nothing planned.
Labels: -Merge-Review-56
No more 56.

Sign in to add a comment