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

Issue 619891 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 612120
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

WebRTC H264 video sometimes gets stuck in a failing state where it can't encode frames

Project Member Reported by olka@chromium.org, Jun 14 2016

Issue description

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/30978/steps/browser_tests/logs/stdio

- WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264 test spams the log with "Failed to encode frame. Error code: -1" and then times out.


https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/30979/steps/browser_tests/logs/stdio

- it outputs
RESULT Unique_frames_count: 720p_H264= 0
RESULT Max_repeated: 720p_H264= 150
RESULT Max_skipped: 720p_H264= 1

per phoglund@: "This effectively means video isn't working - no video frames are making it through. The test still succeeds because it's a performance test. So H264 is completely broken in WebRTC on that particular bot at least.

The graph shows the bot sometimes succeeds with h264 video and sometimes it fails and gets 0 unique frames pushed through: https://chromeperf.appspot.com/report?sid=07ee6b33d24b839360fbfd6458f4c694c5fbf810f72d11737b01bd897937e4ad

And here's an example of it happening on the main waterfall bot as well: https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/55821/steps/browser_tests/logs/stdio "


 
That is, every nth run, H264 doesn't work at all on the bot and fails to encode frames. This happens on both Mac bots in the WebRTC waterfalls. It looks like about every 8th run on the FYI bot and maybe every 30th run on the main bot.

When the test succeeds, no "Failed to encode frame. Error code: -1" are printed, so it appears to be connected with the broken video.

Note also this doesn't happen for Linux: https://chromeperf.appspot.com/report?sid=d673d74527c873210dedd968fffe24474cd20f8170de4d8dfbcf1baca69726f5.

Comment 2 by pbos@chromium.org, Jun 14 2016

Cc: tkchin@chromium.org
Status: Assigned (was: Untriaged)
Looks like an issue with VideoToolbox/VideoToolbox interaction:

[09:11:36.154] VTCompressionSessionCreate signalled err=-8973 (err) (VTVideoEncoderStartSession failed) at /SourceCache/CoreMedia_frameworks/CoreMedia-1562.238/Sources/VideoToolbox/VTCompressionSession.c line 967

Comment 3 by olka@chromium.org, Jun 14 2016

Looks like a duplicate of  Issue 612120 ?
It is a VideoToolbox issue that I cannot address directly. Either we can disable HW encode for this test via kDisableWebRtcHWEncoding and solve flakiness, or work on getting better HW support on these bots? WDYT?

Comment 5 by pbos@chromium.org, Jun 14 2016

What does "getting better HW support on these bots" mean? If this is failing on the bots it must be failing for users as well?
phoglund@, I have this related bug coming from VideoToolbox in issue 619183. As far as I parsed the logs, there are more errors pointing to AppleIntelHD4000GraphicsVADriver. I was referring to that by better HW, and I should have explained it. However, there are still some crashes with HD5000 as well, so it isn't a 100% solution.

Also, from my search on limited sources on this particular error(-8973 codecOpenErr), I found it might be related to not having access to HW. Are there things running in parallel on these bots?

As far as the users, I think it should fallback to SW H264 if these error happen. Do these bots have the buildflag RTC_USE_H264?
Btw, I was referring to Peter in my earlier reply. Sorry for the mixup.

Comment 8 by pbos@chromium.org, Jun 14 2016

Should those be blacklisted and not claim to support it? Otherwise I we'll need a fallback on these systems.

Comment 9 by pbos@chromium.org, Jun 14 2016

(Don't blacklist too early.)
The HW actually supports it mostly. Considering we try to create a session to see HW encode support each time GPU process starts-which means all MAC users out there-, those crashes aren't high at all. 

However, these bots are crashing much more often than the regular case. So related to it,
1) Are there things running in parallel on these bots?
2) Do these bots have the buildflag RTC_USE_H264?

I really would prefer not to use kDisableWebRtcHWEncoding, because that would mean no test coverage :(
Re #10:

1) Not really. The tests run sequentially on the bot and nothing else runs at the same time. However, note that the tests open two tabs which each run WebRTC, so maybe we are using two sets of encoder/decoder?
2) Yes.
Mergedinto: 612120
Status: Duplicate (was: Assigned)

Sign in to add a comment