Potential deadlock in VRDisplay::submitFrame
Reported by
artyo...@gmail.com,
May 17 2017
|
|||||
Issue descriptionSteps to reproduce the problem: Seems like VRDisplay::submitFrame may got to deadlock in the case if OnSumbitFrameTransferred \ OnSubmitFrameComplete is not called for some reasons (for example, during the VrShell shutdown). What is the expected behavior? Shouldn't deadlock. What went wrong? I think, VRSubmitFrameClient should have method OnSubmitFrameAborted that would be called from VrShellGl::ForceExitVr and that will set both pending_previous_frame_render_ and pending_submit_frame_ to false. Did this work before? N/A Does this work in other browsers? Yes Chrome version: M60 master Channel: dev OS Version: Flash Version:
,
May 18 2017
Oh, you know what could happen: I used singleprocess mode (for debugging). In this case, it seems like mojo's reenterancy may suffer. It does not allow OnExitPresent to be received until sumbitFrame is finished. At least this is what I observed. However, I have to admit that I am running this code with M57 (146), assumed (probably, incorrectly) that M60 didn't change much in this area.
,
May 18 2017
Interesting, even in single process mode I'd assume it would still use separate threads. The problem may be that the other side of the IPC connection isn't getting scheduled, not the reentrancy as such. For the record, what build options and runtime options are you using for this singleprocess mode? Fixing this would be low priority, but would be good to understand what's happening.
,
May 18 2017
It could be. And OnSubmitFrameAborted solves the issue anyway ;) As to singleprocess mode: it is EXTREMELY helpful for debugging. I use Android Studio as a debugger and it works well with singleprocess Chromium. I had to do several relatively small tweaks (hacks, to be precise) to make it work, tho: 1) mojo/public/cpp/bindings/lib/binding_state.cc, BindingStateBase::BindInternal: I had to comment out the check "DCHECK(!router_);", for some reasons it fails in SP-mode. 2) content/browser/renderer_host/render_process_host_impl.cc, RenderProcessHostImpl::IsSuitableHost: removed the check "DCHECK_EQ(host->GetBrowserContext(), browser_context)" 3) content/browser/renderer_host/context_provider_factory_impl_android.cc, ContextProviderFactoryImpl::OnGpuChannelTimeout(): replace LOG(FATAL) by LOG(ERROR) there (don't actually remember why exactly that was an issue, though). 4) I've also added 'enforce_singleprocess' option into args.gn, that effectively forces to append the switch kSingleProcess switch to parsed_command_line in /content/browser/android/content_startup_flags.cc. Unless I forgot something, this is pretty much it. I've also created a doc on how to setup Android Studio for debugging Chromium, let me know if you are interested.
,
Nov 23 2017
Klaus, is there anything actionable here? If not, I think we should close this.
,
Dec 7 2017
friendly ping? Klaus, should we close this bug or do you prefer to keep it open?
,
Dec 8 2017
Let's close this out as WAI, this isn't an issue in production builds and needed a modified build using single process mode to reproduce. And even in that case, I think arguably that would be a bug in mojo scheduling. Single process mode does sound potentially useful for debugging, but we should track that separately if it's something we'd be interested in enabling.
,
Feb 8 2018
,
Jul 4
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by klausw@chromium.org
, May 17 2017Status: Started (was: Unconfirmed)