New issue
Advanced search Search tips

Issue 812456 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Surfaces for Videos Crash after renabling gpu

Project Member Reported by lethalantidote@chromium.org, Feb 15 2018

Issue description

Chrome Version: 66.0.3348.0 (Developer Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) Build and run Chrome with --enable-features=UseSurfaceLayerForVideo. Point to any youtube video. See that it runs fine.
(2) Run chrome with --enable-features=UseSurfaceLayerForVideo --disable-gpu.  Point to any youtube video. See that it doesn't crash, but no video.
(3) Run again with just --enable-features=UseSurfaceLayerForVideo.  Point to any youtube video.

What is the expected result?
Video should play as expected.

What happens instead?
Video studders, and the tab crashes. 
 
This is the stack trace.

lethalantidote@lethalantidote-linux:~/blimp/src$ out/Chrome/chrome --user-data-dir=~/tmp --enable-features=UseSurfaceLayerForVideo 
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
[1198:1222:0214/140538.293746:WARNING:simple_synchronous_entry.cc(1255)] Could not open platform files for entry.
[1198:1198:0214/140554.372569:INFO:CONSOLE(0)] "Error parsing header X-XSS-Protection: 1; mode=block; report=https://www.google.com/appserve/security-bugs/log/youtube: reporting URL is not same scheme, host, and port as page at character position 22. The default protections will be applied.", source: https://www.youtube.com/watch?v=7bDg7n-chhU (0)
[1:1:0214/140554.463721:ERROR:render_process_impl.cc(217)] WebFrame LEAKED 3 TIMES
[1266:1266:0214/140554.559490:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.559925:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.560257:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.560568:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.560880:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.561210:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.561541:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.561853:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.562275:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.562591:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.562896:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.563196:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.563489:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.563789:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1266:1266:0214/140554.564082:ERROR:gles2_cmd_decoder.cc(18285)] [.DisplayCompositor-0x3dd5d57c5820]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[1266:1266:0214/140554.564377:ERROR:gles2_cmd_decoder.cc(10111)] [.DisplayCompositor-0x3dd5d57c5820]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[1198:1198:0214/140555.067213:INFO:CONSOLE(26)] "<link rel=preload> must have a valid `as` value", source: https://www.youtube.com/watch?v=7bDg7n-chhU (26)
[1198:1231:0214/140556.666322:WARNING:extension_protocols.cc(469)] Failed to get directory for extension invalid
[1198:1231:0214/140556.666472:WARNING:url_request_job_manager.cc(90)] Failed to map: chrome-extension://invalid/
[1198:1231:0214/140557.345394:WARNING:extension_protocols.cc(469)] Failed to get directory for extension invalid
[1198:1231:0214/140557.345510:WARNING:url_request_job_manager.cc(90)] Failed to map: chrome-extension://invalid/
[1198:1198:0214/140558.764411:INFO:CONSOLE(0)] "Styling master document from stylesheets defined in HTML Imports is deprecated, and is planned to be removed in M65, around March 2018. Please refer to https://goo.gl/EGXzpw for possible migration paths.", source:  (0)
[1:18:0214/140602.335747:FATAL:VideoFrameSubmitter.cpp(42)] Check failed: is_rendering_. 
#0 0x7feefbb099fd base::debug::StackTrace::StackTrace()
#1 0x7feefbb07eec base::debug::StackTrace::StackTrace()
#2 0x7feefbb9021a logging::LogMessage::~LogMessage()
#3 0x7feee699d38f blink::VideoFrameSubmitter::StopRendering()
#4 0x7feedf83fc11 media::VideoFrameCompositor::OnRendererStateUpdate()
#5 0x7feedf842085 _ZN4base8internal13FunctorTraitsIMN5media20VideoFrameCompositorEFvbEvE6InvokeIPS3_JRKbEEEvS5_OT_DpOT0_
#6 0x7feedf841fdf _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN5media20VideoFrameCompositorEFvbEJPS5_RKbEEEvOT_DpOT0_
#7 0x7feedf841f6d _ZN4base8internal7InvokerINS0_9BindStateIMN5media20VideoFrameCompositorEFvbEJNS0_17UnretainedWrapperIS4_EEbEEEFvvEE7RunImplIRKS6_RKNSt3__15tupleIJS8_bEEEJLm0ELm1EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE
#8 0x7feedf841e7c _ZN4base8internal7InvokerINS0_9BindStateIMN5media20VideoFrameCompositorEFvbEJNS0_17UnretainedWrapperIS4_EEbEEEFvvEE3RunEPNS0_13BindStateBaseE
#9 0x7feefbab81b1 _ZNO4base12OnceCallbackIFvvEE3RunEv
#10 0x7feefbb0d92a base::debug::TaskAnnotator::RunTask()
#11 0x7feefbbacae9 base::internal::IncomingTaskQueue::RunTask()
#12 0x7feefbbb5edb base::MessageLoop::RunTask()
#13 0x7feefbbb6178 base::MessageLoop::DeferOrRunPendingTask()
#14 0x7feefbbb6488 base::MessageLoop::DoWork()
#15 0x7feefbbb904a base::MessagePumpDefault::Run()
#16 0x7feefbbb569c base::MessageLoop::Run()
#17 0x7feefbc6cdad base::RunLoop::Run()
#18 0x7feefbd32a68 base::Thread::Run()
#19 0x7feefbd336d5 base::Thread::ThreadMain()
#20 0x7feefbd194ad base::(anonymous namespace)::ThreadFunc()
#21 0x7feefc06c184 start_thread
#22 0x7feee187b03d clone

Received signal 6
#0 0x7feefbb099fd base::debug::StackTrace::StackTrace()
#1 0x7feefbb07eec base::debug::StackTrace::StackTrace()
#2 0x7feefbb093c5 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7feefc074330 <unknown>
#4 0x7feee17b3c37 gsignal
#5 0x7feee17b7028 abort
#6 0x7feefbb04fa6 base::debug::(anonymous namespace)::DebugBreak()
#7 0x7feefbb04f88 base::debug::BreakDebugger()
#8 0x7feefbb90ff5 logging::LogMessage::~LogMessage()
#9 0x7feee699d38f blink::VideoFrameSubmitter::StopRendering()
#10 0x7feedf83fc11 media::VideoFrameCompositor::OnRendererStateUpdate()
#11 0x7feedf842085 _ZN4base8internal13FunctorTraitsIMN5media20VideoFrameCompositorEFvbEvE6InvokeIPS3_JRKbEEEvS5_OT_DpOT0_
#12 0x7feedf841fdf _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN5media20VideoFrameCompositorEFvbEJPS5_RKbEEEvOT_DpOT0_
#13 0x7feedf841f6d _ZN4base8internal7InvokerINS0_9BindStateIMN5media20VideoFrameCompositorEFvbEJNS0_17UnretainedWrapperIS4_EEbEEEFvvEE7RunImplIRKS6_RKNSt3__15tupleIJS8_bEEEJLm0ELm1EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE
#14 0x7feedf841e7c _ZN4base8internal7InvokerINS0_9BindStateIMN5media20VideoFrameCompositorEFvbEJNS0_17UnretainedWrapperIS4_EEbEEEFvvEE3RunEPNS0_13BindStateBaseE
#15 0x7feefbab81b1 _ZNO4base12OnceCallbackIFvvEE3RunEv
#16 0x7feefbb0d92a base::debug::TaskAnnotator::RunTask()
#17 0x7feefbbacae9 base::internal::IncomingTaskQueue::RunTask()
#18 0x7feefbbb5edb base::MessageLoop::RunTask()
#19 0x7feefbbb6178 base::MessageLoop::DeferOrRunPendingTask()
#20 0x7feefbbb6488 base::MessageLoop::DoWork()
#21 0x7feefbbb904a base::MessagePumpDefault::Run()
#22 0x7feefbbb569c base::MessageLoop::Run()
#23 0x7feefbc6cdad base::RunLoop::Run()
#24 0x7feefbd32a68 base::Thread::Run()
#25 0x7feefbd336d5 base::Thread::ThreadMain()
#26 0x7feefbd194ad base::(anonymous namespace)::ThreadFunc()
#27 0x7feefc06c184 start_thread
#28 0x7feee187b03d clone
  r8: fffffffffffffed8  r9: fffffffffffffec8 r10: 0000000000000008 r11: 0000000000000202
 r12: 0000000000000000 r13: 0000000000000000 r14: 00007feeca1529c0 r15: 00007feeca152700
  di: 0000000000000001  si: 0000000000000012  bp: 00007feeca14e6d0  bx: 0000000000000000
  dx: 0000000000000006  ax: 0000000000000000  cx: 00007feee17b3c37  sp: 00007feeca14e598
  ip: 00007feee17b3c37 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
[1198:1345:0214/140602.423065:WARNING:audio_sync_reader.cc(175)] ASR: No room in socket buffer.: Broken pipe (32)
Status: Started (was: Assigned)
So the video chugs after following these steps and then crashes because it hits a race condition between |is_renderering_| being set to true and StopRendering being called. Both these calls get post to the media thread so I'm not sure why they don't happen in sequence, but if one changes the DCHECK around |is_renderering_| to a conditional, the video recovers and then plays smoothly. It updates the state back to renderering and resumes. I'll upload a CL shortly to make this more clear. The CL seems to address the symptom but not the cause in this case. I am not sure what would make this chug though like this. 
So, what it seems like is that we have a race case between EnableSubmission() (where the previously null |client_| now points to |submitter_| and StopRendering(). The sequence is as follows:

- We update the VideoFrameCompositor to start rendering in OnRendererStateUpdate, but since we do not have a client yet, we return.
- We provide a client via EnableSubmission
- We call OnRendererStateUpdate again to stop rendering. 
- Because we now have a client, the call occurs, but |is_rendering_| is still false, and now we hit this check.

The CL here https://chromium-review.googlesource.com/c/chromium/src/+/923709 puts a bandaid on this problem as described previously. 

I still don't know why this now happens when you switch disable-gpu on and off. 
Cc: mlamouri@chromium.org
Would it make sense to have the bandaid landed with a test in order to resolve the fix or do we suspect this might be the rootcause of a larger problem?
re c#3: good summary!

here's what bothers me.  most of that seems exactly the same in the non-surfaces path: we still create VideoLayer in WMPI::OnMetadata, which still posts to the compositor thread to create VLI (i think), which still registers as a client to VFC.  all of that seems extremely similar to the surfaces path with respect to the race condition.

in VideoFrameProviderClientImpl::StopRendering, there's a similar dcheck.

yet, we've not run into this on the non-surfaces path.

any idea what the difference is?  is it that we're now serialized on the media thread rather than fully async on the compositor thread, and we were just getting lucky?  if so, that seems testable.
Isn't this fixed?
Status: WontFix (was: Started)
So inadvertently we handle the race condition described by now checking for the compositor_frame_sink_ (https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc?rcl=022934873f6e8e16f07e36fabe2bebc1635e91c3&l=84). Since this is only set when we have called StartSubmitting, we don't need to worry. 

I checked to see if the problem still exists top of tree, and I don't think I'm able to repro it. 

However, I am still puzzled as to why the repro steps would have triggered this in the first place.

Sign in to add a comment