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

Issue 23496052: Kill worker process by way of a sync IPC message before it cleans up. (Closed)

Created:
7 years, 3 months ago by meacer
Modified:
7 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jochen (gone - plz use gerrit), kinuko
Visibility:
Public.

Description

Kill worker process by way of a sync IPC message before it cleans up. When a worker process shuts down, it shuts down WebKit. If there are other threads running in the worker process, this leads to crashes. This fix tries to kill the worker process forcibly so that no cleanup takes place. BUG=249502 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233099

Patch Set 1 #

Patch Set 2 : Fix comment #

Total comments: 4

Patch Set 3 : Fix indentation #

Total comments: 2

Patch Set 4 : Kill process in worker thread rather than websharedworker_stub #

Patch Set 5 : Remove unused header #

Total comments: 2

Patch Set 6 : Kill worker process in OnShutdown, that is after browser process says OK to shut down #

Patch Set 7 : Handle shutdown IPC in WorkerThread #

Patch Set 8 : Change process exit code #

Total comments: 3

Patch Set 9 : Add process_ checks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -0 lines) Patch
M content/browser/worker_host/worker_process_host.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -0 lines 0 comments Download
M content/common/worker_messages.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M content/worker/worker_thread.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/worker/worker_thread.cc View 1 2 3 4 5 6 3 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
meacer
Michael, this is the patch that implements your suggestion :) Layout tests pass and I ...
7 years, 3 months ago (2013-09-11 23:40:02 UTC) #1
michaeln
tryjobs would be great to see https://codereview.chromium.org/23496052/diff/3001/content/browser/worker_host/worker_process_host.h File content/browser/worker_host/worker_process_host.h (right): https://codereview.chromium.org/23496052/diff/3001/content/browser/worker_host/worker_process_host.h#newcode205 content/browser/worker_host/worker_process_host.h:205: void OnForceKillWorkerProcess(int worker_route_id, ...
7 years, 3 months ago (2013-09-12 00:22:11 UTC) #2
Mustafa Acer
https://codereview.chromium.org/23496052/diff/3001/content/browser/worker_host/worker_process_host.h File content/browser/worker_host/worker_process_host.h (right): https://codereview.chromium.org/23496052/diff/3001/content/browser/worker_host/worker_process_host.h#newcode205 content/browser/worker_host/worker_process_host.h:205: void OnForceKillWorkerProcess(int worker_route_id, On 2013/09/12 00:22:11, michaeln wrote: > ...
7 years, 3 months ago (2013-09-12 00:29:14 UTC) #3
michaeln
> Also, from reading the code there seems to be a one to one mapping ...
7 years, 3 months ago (2013-09-12 02:03:20 UTC) #4
meacer
Now it's killing the process in the worker thread. I haven't yet removed the code ...
7 years, 3 months ago (2013-09-16 21:40:41 UTC) #5
michaeln
https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc File content/worker/worker_thread.cc (right): https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc#newcode63 content/worker/worker_thread.cc:63: Send(new WorkerProcessHostMsg_ForceKillWorker()); Does it not work to have this ...
7 years, 3 months ago (2013-09-16 22:00:41 UTC) #6
Mustafa Acer
https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc File content/worker/worker_thread.cc (right): https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc#newcode63 content/worker/worker_thread.cc:63: Send(new WorkerProcessHostMsg_ForceKillWorker()); On 2013/09/16 22:00:41, michaeln wrote: > Does ...
7 years, 3 months ago (2013-09-16 22:08:43 UTC) #7
michaeln
On 2013/09/16 22:08:43, Mustafa Acer wrote: > https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc > File content/worker/worker_thread.cc (right): > > https://codereview.chromium.org/23496052/diff/24001/content/worker/worker_thread.cc#newcode63 ...
7 years, 3 months ago (2013-09-16 22:25:04 UTC) #8
meacer
> I can't help but notice that method is not virtual, then again > OnMessageReceived() ...
7 years, 3 months ago (2013-09-16 22:44:21 UTC) #9
michaeln
On 2013/09/16 22:44:21, Mustafa Emre Acer wrote: > > I can't help but notice that ...
7 years, 3 months ago (2013-09-17 01:15:01 UTC) #10
meacer
> I was suggesting there's no need to make OnShutdown()virtual. If a derived class > ...
7 years, 3 months ago (2013-09-17 17:41:35 UTC) #11
michaeln
pending trybot happiness, this lgtm! https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc File content/browser/worker_host/worker_process_host.cc (right): https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc#newcode394 content/browser/worker_host/worker_process_host.cc:394: base::KillProcess( Is this the ...
7 years, 3 months ago (2013-09-17 20:30:37 UTC) #12
meacer
On 2013/09/17 20:30:37, michaeln wrote: > pending trybot happiness, this lgtm! > > https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc > ...
7 years, 3 months ago (2013-09-17 23:30:30 UTC) #13
meacer
+atwilson: Can you please review content/browser/worker_host/* and content/worker/* files? Context: We get crashes if there ...
7 years, 3 months ago (2013-09-17 23:32:54 UTC) #14
meacer
Adding atwilson@ for real this time, please see my previous comment :)
7 years, 3 months ago (2013-09-17 23:33:53 UTC) #15
Andrew T Wilson (Slow)
lgtm, although I'm really not in a position to confirm whether it's OK to just ...
7 years, 3 months ago (2013-09-19 01:34:02 UTC) #16
jochen (gone - plz use gerrit)
I don't think that's the right solution. We shouldn't call from random threads into WebKit ...
7 years, 3 months ago (2013-09-19 05:04:07 UTC) #17
michaeln
> We shouldn't call from random threads into WebKit anyway (but only from the main ...
7 years, 3 months ago (2013-09-19 20:15:00 UTC) #18
jam
On 2013/09/19 01:34:02, Andrew T Wilson wrote: > lgtm, although I'm really not in a ...
7 years, 2 months ago (2013-10-02 20:13:11 UTC) #19
meacer
On 2013/10/02 20:13:11, jam wrote: > On 2013/09/19 01:34:02, Andrew T Wilson wrote: > > ...
7 years, 2 months ago (2013-10-08 21:54:28 UTC) #20
michaeln
> Should we land this patch in the meanwhile? I've made my point of view ...
7 years, 2 months ago (2013-10-15 20:27:29 UTC) #21
jochen (gone - plz use gerrit)
i don't have a strong opinion. If you think this improves the situation until this ...
7 years, 2 months ago (2013-10-15 23:49:26 UTC) #22
meacer
On 2013/10/15 23:49:26, jochen wrote: > i don't have a strong opinion. If you think ...
7 years, 2 months ago (2013-10-21 18:06:09 UTC) #23
meacer
Cris, can you take a look at content/common/worker_messages.h?
7 years, 1 month ago (2013-10-29 18:55:10 UTC) #24
meacer
Adding the right cdn@
7 years, 1 month ago (2013-11-01 01:47:13 UTC) #25
Cris Neckar
On 2013/11/01 01:47:13, Mustafa Emre Acer wrote: > Adding the right cdn@ LGTM for IPC ...
7 years, 1 month ago (2013-11-01 23:26:20 UTC) #26
Cris Neckar
https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc File content/browser/worker_host/worker_process_host.cc (right): https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc#newcode395 content/browser/worker_host/worker_process_host.cc:395: process_->GetData().handle, RESULT_CODE_NORMAL_EXIT, false); nit: may want to check process_launched_ ...
7 years, 1 month ago (2013-11-01 23:26:33 UTC) #27
meacer
https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc File content/browser/worker_host/worker_process_host.cc (right): https://codereview.chromium.org/23496052/diff/41001/content/browser/worker_host/worker_process_host.cc#newcode395 content/browser/worker_host/worker_process_host.cc:395: process_->GetData().handle, RESULT_CODE_NORMAL_EXIT, false); On 2013/11/01 23:26:34, Cris Neckar wrote: ...
7 years, 1 month ago (2013-11-04 18:38:09 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/23496052/108001
7 years, 1 month ago (2013-11-04 18:44:15 UTC) #29
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=218709
7 years, 1 month ago (2013-11-04 21:50:29 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/23496052/108001
7 years, 1 month ago (2013-11-05 20:04:24 UTC) #31
commit-bot: I haz the power
7 years, 1 month ago (2013-11-05 22:13:39 UTC) #32
Message was sent while issue was closed.
Change committed as 233099

Powered by Google App Engine
This is Rietveld 408576698