Potential deadlock in VRDisplay::submitFrame
Reported by
artyo...@gmail.com,
May 17 2017
|
||||
Issue description
Steps to reproduce the problem:
None
What is the expected behavior?
VRDisplay::submitFrame waits on pending_previous_frame_render_ and pending_submit_frame_. Those are set to true and OnSubmitFrameTransferred / OnSubmitFrameComplete callbacks supposed to set those members to false and this would unlock the submitFrame:
while (pending_submit_frame_) {
if (!submit_frame_client_binding_.WaitForIncomingMethodCall()) {
DLOG(ERROR) << "Failed to receive SubmitFrame response";
break;
}
}
What went wrong?
However, since it waits in the loop, the C++ compiler may optimize and replace the pending_previous_frame_render_ and pending_submit_frame_ by registers, since it is not aware that those could be changed by someone else. I'd say these members require 'volatile' modifier.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: M60 master Channel: n/a
OS Version:
Flash Version:
,
May 17 2017
,
May 18 2017
You, probably, right. However, 'volatile' is a cheap insurance and improves readability.
,
May 18 2017
'volatile' certainly does not improve readability. Any reader would begin to wonder if there's some memory-mapped I/O happening and how this could possibly be happening inside of blink. @klausw that sounds right. Adding a comment to make this clear sounds reasonable.
,
Apr 17 2018
Bug scrub: Klaus, this has been active for nearly a year, and if the action item was to add a comment, I think we should just close this off. Please reopen if you disagree.
,
Jul 4
|
||||
►
Sign in to add a comment |
||||
Comment 1 by klausw@chromium.org
, May 17 2017Labels: Proj-VR
Status: Started (was: Unconfirmed)