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

Issue 665536 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

chrome://tracing causes DisplayCompositor errors on macOS

Project Member Reported by erikc...@chromium.org, Nov 15 2016

Issue description

gn args:
"""
  5 dcheck_always_on = false                                                        
  6 is_component_build = true                                                       
  7 is_debug = true                                                                 
  8 symbol_level = 0                                                                
  9 use_goma = true                                                                 
 10 enable_nacl = true     
"""

ToT, corp macOS 10.11.6. Without the flag - no errors. With the flag, open two new tabs, switch between them. Notice that many instances of the following error are emitted on every switch.

"""
[4989:1295:1115/112144:ERROR:gles2_cmd_decoder.cc(2402)] [.DisplayCompositor-0x7fa8d6094600]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : ScopedFramebufferBinder::dtor: <- error from previous GL command
"""
 
This also happens on Google Chrome, 54.0.2840.98

Run with the flag, try to take a memory-infra trace. Same error. Run without flag, take trace, no error.

Comment 2 by l...@chromium.org, Nov 16 2016

Owner: alph@chromium.org
Status: Assigned (was: Untriaged)
@alph, could you please take a look?

Comment 3 by dskiba@chromium.org, Nov 16 2016

Cc: dskiba@chromium.org
Hmm, but how did it run with --enable-heap-profiling, if heap profiling is not supported on macOS?
Cc: picksi@chromium.org kraynov@chromium.org
Components: -Platform>DevTools>Memory Internals>Tracing
Owner: kraynov@chromium.org
Not really a devtools issue, -alph. 

I think this is something similar to  Issue 664271 .

> Hmm, but how did it run with --enable-heap-profiling, if heap profiling is not supported on macOS?
This is not fully true. The shim layer is not supported on OSX; which means that the malloc heap is not reported. But all the rest of the heap profiling machinery is there, the pseudo stack tracing is there, and works for blinkgc and partalloc. 

Kraynov can you help here?
Labels: Hotlist-MemoryInfra
Status: Started (was: Assigned)
Managed to reproduce
Trying to fix it
Components: -Internals>Tracing Internals>GPU
Labels: -Pri-3 Pri-2
Owner: ----
Status: Available (was: Started)
It is not a problem of heap profiler. This issue can be reproduced by tracing nothing but 'gpu.debug' category.

The failure happening exactly here:
https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gles2_cmd_decoder.cc?q=TakeSnapshotWithCurrentFramebuffer&l=11574

TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), &is_tracing);
if (is_tracing) {
  ...
  gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer(
      is_offscreen ? offscreen_size_ : surface_->GetSize());
}

Lowest-level code failing:
https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gpu_state_tracer.cc?l=58

bool Snapshot::SaveScreenshot(const gfx::Size& size) {
  ...
  glReadPixels(0,
               0,
               screenshot_size_.width(),
               screenshot_size_.height(),
               GL_RGBA,
               GL_UNSIGNED_BYTE,
               &screenshot_pixels_[0]);
  ...
}

glReadPixels is flaky and returns error if framebuffer is incomplete:
https://www.khronos.org/opengles/sdk/docs/man/xhtml/glReadPixels.xml
GL_INVALID_FRAMEBUFFER_OPERATION is generated if the currently bound framebuffer is not framebuffer complete (i.e. the return value from glCheckFramebufferStatus is not GL_FRAMEBUFFER_COMPLETE).

It's another story why tracing of screenshots got enabled because of --enable-heap-profiling, see  https://crbug.com/669611 

Need some GPU guy to fix gpu_state_tracer.cc, where today SaveScreenshot always return true, not checking for errors :)
Cc: vmi...@chromium.org
+vmiura
Project Member

Comment 9 by sheriffbot@chromium.org, Dec 11 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: vmi...@chromium.org
Status: Assigned (was: Untriaged)
At the root of it, if glReadPixels fails, I guess the trace may be missing the snapshot, but the error isn't fatal. I am not sure this warrants spending time on it.

vmiura can you weigh in?
Summary: chrome://tracing causes DisplayCompositor errors on macOS (was: --enable-heap-profiling causes DisplayCompositor errors on macOS)
Labels: -Hotlist-Recharge-Cold
I'll take a look.

Sign in to add a comment