Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 1444683002: Revert of Fix gpu command buffer use after free by GrContext (Closed)

Created:
5 years, 1 month ago by cbiesinger
Modified:
5 years, 1 month ago
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, vmpstr+blinkwatch_chromium.org, dshwang, jbroman, danakj, blink-reviews-platform-graphics_chromium.org, Rik, f(malita), blink-reviews, piman+watch_chromium.org, Stephen Chennney, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Fix gpu command buffer use after free by GrContext (patchset #14 id:250001 of https://codereview.chromium.org/1414683003/ ) Reason for revert: Reverting because this breaks several layout tests: STDERR: [3888:1580:1113/081604:621866:FATAL:context_provider_command_buffer.cc(79)] Check failed: context_thread_checker_.CalledOnValidThread(). STDERR: Backtrace: STDERR: base::debug::StackTrace::StackTrace [0x00D8DC31+33] STDERR: logging::LogMessage::~LogMessage [0x00DE69DB+75] STDERR: content::ContextProviderCommandBuffer::WebContext3D [0x11BB5DA7+887] STDERR: content::ContextProviderCommandBuffer::ContextGL [0x11BB481B+267] STDERR: content::RenderThreadImpl::SharedWorkerContextProvider [0x1202B2A0+400] STDERR: content::RenderWidget::CreateOutputSurface [0x12089254+452] STDERR: content::RenderWidgetCompositor::RequestNewOutputSurface [0x11E7767F+127] https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Win7__dbg_/results/layout-test-results/virtual/mediasession/media/mediasession/htmlmediaelement-set-session-crash-log.txt https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29/builds/3500 Original issue's description: > Fix gpu command buffer use after free by GrContext > > ContextProviderCommandBuffer owns a WebGraphicsContext3DCommandBufferImpl and a > GrContextForWebGraphicsContext3D via scoped_ptr. The problem was > that the GrContext object held by GrContextForWebGraphicsContext3D > depended on interface pointers that reference an interface that is owned > by WebGraphicsContext3DCommandBufferImpl, so whenever the > GrContext outlived the ContextProviderCommandBuffer, we ended up in a > state where the interface function pointers are deallocated, but still > referenced. Then, attempts to use the GrContext would result in using > deallocated function pointers. Because the GrContext is a ref counted > object, it can easily outlive the ContextProviderCommandBuffer. This led to > a dangerous situation where we had to be careful about object destruction > order. > > This CL fixes the problem for good by wrapping the ownership of the > WebGraphicsContext3DCommandBufferImpl into a subclass of > GrGLInterface, which is a ref counted object that can be owned jointly by > the GrContext and the ContextProviderCommandBuffer, thus guaranteeing > that the command buffer interface will remain valid for the lifetimes of the > GrContext and of the ContextProviderCommandBuffer. > > BUG=551143 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/d87aa1f1aee6ab0181eadaae827a5768981c1ccc > Cr-Commit-Position: refs/heads/master@{#359493} TBR=piman@chromium.org,danakj@chromium.org,kbr@chromium.org,rbyers@chromium.org,boliu@chromium.org,dtrainor@chromium.org,junov@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=551143

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -184 lines) Patch
M android_webview/browser/aw_render_thread_context_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/client/compositor/blimp_context_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/test_in_process_context_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/android/in_process/context_provider_in_process.h View 4 chunks +2 lines, -5 lines 0 comments Download
M content/browser/android/in_process/context_provider_in_process.cc View 8 chunks +18 lines, -30 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 2 chunks +0 lines, -47 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 3 chunks +1 line, -5 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 7 chunks +23 lines, -32 lines 0 comments Download
M content/common/gpu/client/grcontext_for_webgraphicscontext3d.h View 2 chunks +1 line, -26 lines 0 comments Download
M content/common/gpu/client/grcontext_for_webgraphicscontext3d.cc View 3 chunks +14 lines, -28 lines 0 comments Download
M gpu/blink/webgraphicscontext3d_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/blink/webgraphicscontext3d_impl.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebGraphicsContext3D.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
cbiesinger
Created Revert of Fix gpu command buffer use after free by GrContext
5 years, 1 month ago (2015-11-13 18:57:41 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1444683002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1444683002/1
5 years, 1 month ago (2015-11-13 19:00:21 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1444683002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1444683002/1
5 years, 1 month ago (2015-11-13 19:04:47 UTC) #3
commit-bot: I haz the power
Failed to apply patch for content/browser/gpu/gpu_ipc_browsertests.cc: While running git apply --index -3 -p1; error: patch ...
5 years, 1 month ago (2015-11-13 19:07:10 UTC) #5
Justin Novosad
No worries. I have a fix coming right up.
5 years, 1 month ago (2015-11-13 19:57:34 UTC) #7
Justin Novosad
Closed revert. fix is here: https://codereview.chromium.org/1450433002
5 years, 1 month ago (2015-11-13 20:08:41 UTC) #9
cbiesinger
Thank you! -Christian On Fri, Nov 13, 2015 at 12:08 PM, <junov@chromium.org> wrote: > Closed ...
5 years, 1 month ago (2015-11-13 20:51:59 UTC) #10
cbiesinger
5 years, 1 month ago (2015-11-13 20:52:00 UTC) #11
Message was sent while issue was closed.
Thank you!

-Christian

On Fri, Nov 13, 2015 at 12:08 PM,  <junov@chromium.org> wrote:
> Closed revert. fix is here: https://codereview.chromium.org/1450433002
>
> https://codereview.chromium.org/1444683002/

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698