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

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2011
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocked on:
issue 88788

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
link

Issue 100507: NaCl 3D busted - command buffer initialization failure

Reported by bradchen@chromium.org, Oct 16 2011 Project Member

Issue description

What steps will reproduce the problem?
1. Start Chrome
2. Attempt to run a Native Client 3D module (e.g. angrybots)
3. "Aw, snap". Note line "Failed to create context" in log below.

I have only tested this on MacOS. Two most recent canary builds (16.0.909, 16.0.910) fail, as well as head of tree. I have a browser build @105335 (13 Oct) and it works fine, so it appears to be a change between 105335 and whatever the rev for Canary 16.0.909 would be.

dhcp-172-19-0-123:src bradchen$ /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary  --enable-nacl
[34896:2307:20612385773456:ERROR:process_util_mac.mm(283)] Invalid process
[34907,2954604544:04:52:38.029878] NaCl_page_alloc_randomized: 0xde7a2a0b
[34907,2954604544:04:52:38.030035] NaCl_page_alloc_randomized: hint 0x5e7a0000
[34907,2954604544:04:52:38.030136] NaClMakePcrelThunk: got addr 0x5e7a0000
[34903,2953392128:04:52:38.099973] PluginReverseInterface::StartupInitializationComplete
[34903,2953392128:04:52:38.100020] PluginReverseInterface::StartupInitializationComplete: invoking CB
UnityModule.
[34909:263:20627425695745:ERROR:gpu_command_buffer_stub.cc(225)] Failed to create context.

[34903:263:20627425900735:ERROR:command_buffer_proxy.cc(136)] Failed to initialize command buffer service.
[SRPC:NACL:34907,1056900288:11:52:38.539000] NaClSrpcRpcWait(channel=0x3efc0bb0): EOF is received instead of response. Probably, the other side (usually, nacl module or browser plugin) crashed.
 

Comment 1 by bradchen@chromium.org, Oct 16 2011

Cc: kbr@chromium.org
Looking at http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Mac/, the regression appears to have happend between 105363 and 105464.

CL of interest: 105399. If this one is the problem then it is likely Mac specific.

Shame on the NaCl/Pepper folks for not having a test. I've filed a separate issue for that.

Comment 2 by bradchen@chromium.org, Oct 17 2011

Hard-wiring gpu_preferences to gfx::PreferIntegratedGpu seems to fix this on my Macbook Pro, although I doubt it this is the right permanent fix.

dhcp-172-19-0-123:src bradchen$ git diff
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/g
index 9717d5e..58508bc 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -1,4 +1,4 @@
- // Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -210,9 +210,10 @@ void GpuCommandBufferStub::OnInitialize(
     return;
   }
 
-  gfx::GpuPreference gpu_preference =
-      channel_->ShouldPreferDiscreteGpu() ?
-          gfx::PreferDiscreteGpu : gpu_preference_;
+  //  gfx::GpuPreference gpu_preference =
+  //      channel_->ShouldPreferDiscreteGpu() ?
+  //          gfx::PreferDiscreteGpu : gpu_preference_;
+  gfx::GpuPreference gpu_preference = gfx::PreferIntegratedGpu;
 
   context_ = gfx::GLContext::CreateGLContext(
       channel_->share_group(),

Comment 3 by kbr@chromium.org, Oct 17 2011

Owner: kbr@chromium.org
I'll look into this ASAP. Please don't back out r105399 in response, as that is a must fix and needs to continue to soak.

Comment 4 by kbr@chromium.org, Oct 17 2011

BTW, please confirm which version of Mac OS X you are running. The contents of about:gpu would be even better.

Comment 5 by nfullagar@google.com, Oct 17 2011

There is a 3D test (chrome/src/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d), but it was disabled in NaCl's SConstruct for all bots.

Comment 6 by kbr@chromium.org, Oct 19 2011

Blocking: 88788

Comment 7 by kbr@chromium.org, Oct 19 2011

Blocking: -88788

Comment 8 by kbr@chromium.org, Oct 19 2011

Blockedon: 88788

Comment 9 by kbr@chromium.org, Oct 19 2011

Labels: Merge-Requested
Fixed on trunk in http://codereview.chromium.org/8342024/ / http://src.chromium.org/viewvc/chrome?view=rev&revision=106394 .

Requesting permission to backport to M16.

Comment 10 by bugdroid1@chromium.org, Oct 19 2011

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=106394

------------------------------------------------------------------------
r106394 | kbr@chromium.org | Wed Oct 19 15:05:43 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_platform_context_3d_impl.cc?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/gpu/gpu_process_launch_causes.h?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/gpu/renderer_gl_context.cc?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/ui/gfx/gl/gl_context_cgl.cc?r1=106394&r2=106393&pathrev=106394
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_parent_context_provider.cc?r1=106394&r2=106393&pathrev=106394
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_parent_context_provider.h?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_plugin_delegate_impl.cc?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_plugin_delegate_impl.h?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/pepper_platform_context_3d_impl.h?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_widget_fullscreen_pepper.cc?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc?r1=106394&r2=106393&pathrev=106394
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_widget_fullscreen_pepper.h?r1=106394&r2=106393&pathrev=106394

Fixed bugs with Pepper 3D under dynamic GPU switching.

Made Pepper 3D context creation code fully aware of GPU switching and changed
the order of context creation and and fetching of the parent context.
Creating the context potentially causes all existing contexts for that
renderer, including the parent, to be lost.

Detect shutting down of the GPU channel more quickly on the renderer side.

Only reject context creation in GLContextCGL upon GpuPreference mismatch if
the system supports dual GPUs.

Will update tools/histograms/histograms.xml as soon as this is committed;
must occur in a separate CL.

BUG= 100507 
TEST=tested navigating to and from, and reloading, NaCl Pepper 3D samples on Mac 10.6.8 and 10.7.1; WebGL tests
Review URL: http://codereview.chromium.org/8342024
------------------------------------------------------------------------

Comment 11 by laforge@google.com, Oct 19 2011

Labels: -Merge-Requested Merge-Approved

Comment 12 by bugdroid1@chromium.org, Oct 19 2011

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=106411

------------------------------------------------------------------------
r106411 | kbr@chromium.org | Wed Oct 19 16:41:53 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/gpu/gpu_process_launch_causes.h?r1=106411&r2=106410&pathrev=106411

Fixed existing launch cause for video decode accelerator initialization,
and reordered new Pepper 3D launch cause so that value for NO_LAUNCH is
preserved from original value in histograms.xml.

BUG= 100507 
TEST=compiled
Review URL: http://codereview.chromium.org/8342060
------------------------------------------------------------------------

Comment 13 by kbr@chromium.org, Oct 20 2011

Labels: ReleaseBlock-Beta

Comment 14 by bugdroid1@chromium.org, Oct 20 2011

Project Member
Labels: merge-merged-912
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=106440

------------------------------------------------------------------------
r106440 | kbr@chromium.org | Wed Oct 19 19:13:04 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/render_widget_fullscreen_pepper.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_platform_context_3d_impl.h?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_platform_context_3d_impl.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/gpu/renderer_gl_context.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/ui/gfx/gl/gl_context_cgl.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/render_widget_fullscreen_pepper.h?r1=106440&r2=106439&pathrev=106440
 A http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_parent_context_provider.h?r1=106440&r2=106439&pathrev=106440 (from /trunk/src/content/renderer/pepper_parent_context_provider.h revision 106394)
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_plugin_delegate_impl.cc?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/content_renderer.gypi?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/common/gpu/gpu_process_launch_causes.h?r1=106440&r2=106439&pathrev=106440
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_plugin_delegate_impl.h?r1=106440&r2=106439&pathrev=106440
 A http://src.chromium.org/viewvc/chrome/branches/912/src/content/renderer/pepper_parent_context_provider.cc?r1=106440&r2=106439&pathrev=106440 (from /trunk/src/content/renderer/pepper_parent_context_provider.cc revision 106394)

Merge 106394 - Fixed bugs with Pepper 3D under dynamic GPU switching.

Made Pepper 3D context creation code fully aware of GPU switching and changed
the order of context creation and and fetching of the parent context.
Creating the context potentially causes all existing contexts for that
renderer, including the parent, to be lost.

Detect shutting down of the GPU channel more quickly on the renderer side.

Only reject context creation in GLContextCGL upon GpuPreference mismatch if
the system supports dual GPUs.

Will update tools/histograms/histograms.xml as soon as this is committed;
must occur in a separate CL.

BUG= 100507 
TEST=tested navigating to and from, and reloading, NaCl Pepper 3D samples on Mac 10.6.8 and 10.7.1; WebGL tests
Review URL: http://codereview.chromium.org/8342024

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/8352033
------------------------------------------------------------------------

Comment 16 by bugdroid1@chromium.org, Oct 20 2011

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=106441

------------------------------------------------------------------------
r106441 | kbr@chromium.org | Wed Oct 19 19:15:08 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/branches/912/src/content/common/gpu/gpu_process_launch_causes.h?r1=106441&r2=106440&pathrev=106441

Merge 106411 - Fixed existing launch cause for video decode accelerator initialization,
and reordered new Pepper 3D launch cause so that value for NO_LAUNCH is
preserved from original value in histograms.xml.

BUG= 100507 
TEST=compiled
Review URL: http://codereview.chromium.org/8342060

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/8355032
------------------------------------------------------------------------

Comment 17 by k...@google.com, Jan 26 2012

Labels: -Merge-Approved Merge-Unknown
Moving to Unknown for merges in M16, as that ship has sailed.

Comment 18 by k...@google.com, Jan 26 2012

Labels: -Merge-Unknown
Remove unknown label on bugs that have a branch merged label.

Comment 19 by bugdroid1@chromium.org, Oct 13 2012

Project Member
Blockedon: -chromium:88788 chromium:88788
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.

Comment 20 by bugdroid1@chromium.org, Nov 14 2012

Project Member
The following revision refers to this bug:
    http://goto.ext.google.com/viewvc/chrome-internal?view=rev&revision=18781

------------------------------------------------------------------------
r18781 | kbr@google.com | 2011-10-20T01:56:07.815207Z

------------------------------------------------------------------------

Comment 21 by bugdroid1@chromium.org, Mar 10 2013

Project Member
Labels: -Area-Internals -Mstone-16 -Feature-GPU -Feature-NaCl Cr-Internals-GPU Cr-Platform-NaCl Cr-Internals M-16

Comment 22 by bugdroid1@chromium.org, Mar 13 2013

Project Member
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Sign in to add a comment