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

Issue 2249353002: Stop calling blink::shutdown (Closed)

Created:
4 years, 4 months ago by haraken
Modified:
4 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop calling blink::shutdown RenderThreadImpl::Shutdown has been trying to shut down Blink and V8 gracefully, but the graceful shutdown has caused tons of use-after-free bugs (and many engineers has spent lots of time fixing ordering issues around the shutdown). As discussed in blink-dev@ (https://groups.google.com/a/chromium.org/d/topic/blink-dev/kk4VX0xRB7I/discussion) and platform-architecture-dev@ (https://groups.google.com/a/chromium.org/d/topic/platform-architecture-dev/Zc12k91NTFk/discussion), there is no reason we have to shut down the renderer gracefully. It's just causing use-after-free bugs and wasting performance. Hence, this CL stops calling blink::shutdown, which had been shutting down *some things* in Blink and V8 gracefully. (Remember that blink::shutdown hadn't been shutting down everything; a lot of objects in Blink and V8 had already been left as is without getting destructed.) Ideally we should just call ProcessDied() at an earlier stage of RenderThreadImpl::Shutdown(), but I'd like to defer the change to a separate CL. BUG=639244 Committed: https://crrev.com/01cb51d26b17923ed2b5c3b59566f0fc9aed74ae Cr-Commit-Position: refs/heads/master@{#413430}

Patch Set 1 #

Patch Set 2 : temp #

Patch Set 3 : temp #

Patch Set 4 : temp #

Patch Set 5 : temp #

Patch Set 6 : temp #

Patch Set 7 : temp #

Patch Set 8 : temp #

Patch Set 9 : temp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -17 lines) Patch
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/wtf/ThreadSpecific.h View 1 2 3 4 5 6 7 8 5 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 58 (44 generated)
haraken
tzik@: Feel free to take over this CL if you want.
4 years, 4 months ago (2016-08-17 11:47:43 UTC) #22
haraken
PS5 passes tests except linux asan :) Getting close.
4 years, 4 months ago (2016-08-18 13:29:44 UTC) #27
haraken
Elliott: PTAL Now all tests pass. I'll send a PSA to blink-dev@ before landing.
4 years, 4 months ago (2016-08-19 09:42:39 UTC) #42
Torne
What's going to happen in single process mode? I've been trying to diagnose an issue ...
4 years, 4 months ago (2016-08-19 10:44:00 UTC) #44
haraken
> I would *guess* that the effect of your change here would be that we ...
4 years, 4 months ago (2016-08-19 10:58:16 UTC) #45
Torne
On 2016/08/19 10:58:16, haraken wrote: > > I would *guess* that the effect of your ...
4 years, 4 months ago (2016-08-19 11:01:00 UTC) #46
haraken
On 2016/08/19 11:01:00, Torne wrote: > On 2016/08/19 10:58:16, haraken wrote: > > > I ...
4 years, 4 months ago (2016-08-19 11:03:50 UTC) #47
Torne
On 2016/08/19 11:03:50, haraken wrote: > On 2016/08/19 11:01:00, Torne wrote: > > On 2016/08/19 ...
4 years, 4 months ago (2016-08-19 11:07:45 UTC) #48
haraken
jochen: Would you take a look at this? Elliott is OOO. I already sent a ...
4 years, 4 months ago (2016-08-22 09:33:02 UTC) #50
jochen (gone - plz use gerrit)
lgtm
4 years, 4 months ago (2016-08-22 09:46:13 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2249353002/160001
4 years, 4 months ago (2016-08-22 09:46:50 UTC) #53
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 4 months ago (2016-08-22 11:44:44 UTC) #55
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/01cb51d26b17923ed2b5c3b59566f0fc9aed74ae Cr-Commit-Position: refs/heads/master@{#413430}
4 years, 4 months ago (2016-08-22 11:46:17 UTC) #57
haraken
4 years, 3 months ago (2016-09-05 02:21:58 UTC) #58
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:160001) has been created in
https://codereview.chromium.org/2312593002/ by haraken@chromium.org.

The reason for reverting is: I'll revert r413430 and its dependent CLs because
r413430 caused issue 642072.

The problem is that we cannot simply remove blink::shutdown because the
following scenario can happen:

1) blink::shutdown is not called. Workers are still running.
2) RenderThreadImpl gets destructed. MessageLoop gets destructed.
3) The workers may access the RenderThreadImpl and MessageLoop.

To fix the problem, we need to call ProcessDied() and forcibly kill the renderer
process at the end of RenderThreadImpl::Shutdown()..

Powered by Google App Engine
This is Rietveld 408576698