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

Issue 1052133002: Fix deadlock in ChildProcessService.onDestroy() (Closed)

Created:
5 years, 8 months ago by no sievers
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix deadlock in ChildProcessService.onDestroy() onCreate() spawns the CrMain thread. onDestroy() can happen quickly after onCreate() (for example if the browser crashes), so we have to be careful about blocking on any semaphores wrt the CrMain thread. The existing cmdline check did not cover all of that. In addition we have to avoid deadlocks between nativeShutdownMainThread()and us actually not having ever entered native main(). (ChildThreadImpl::Shutdown() on Android waits on a condition variable.) BUG=448549, 457406, 457914 NOTRY=True Committed: https://crrev.com/b87d764ee43fb0f2f555f6519ced1e4fa8009518 Cr-Commit-Position: refs/heads/master@{#323567}

Patch Set 1 #

Total comments: 9

Patch Set 2 : don't throw runtime exception #

Patch Set 3 : newline #

Patch Set 4 : suppress findbugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -4 lines) Patch
M content/public/android/java/src/org/chromium/content/app/ChildProcessService.java View 1 2 3 4 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 29 (13 generated)
no sievers
ptal
5 years, 8 months ago (2015-04-02 02:18:16 UTC) #2
jdduke (slow)
Semaphore changes lgtm, though I may not be the best reviewer for this. +cc michaelbai. ...
5 years, 8 months ago (2015-04-02 15:13:42 UTC) #3
michaelbai
https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java File content/public/android/java/src/org/chromium/content/app/ChildProcessService.java (right): https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java#newcode129 content/public/android/java/src/org/chromium/content/app/ChildProcessService.java:129: throw new RuntimeException("Illegal child process reuse."); Did you suspect ...
5 years, 8 months ago (2015-04-02 17:29:48 UTC) #5
no sievers
https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java File content/public/android/java/src/org/chromium/content/app/ChildProcessService.java (right): https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java#newcode129 content/public/android/java/src/org/chromium/content/app/ChildProcessService.java:129: throw new RuntimeException("Illegal child process reuse."); On 2015/04/02 17:29:47, ...
5 years, 8 months ago (2015-04-02 17:50:48 UTC) #6
michaelbai
https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java File content/public/android/java/src/org/chromium/content/app/ChildProcessService.java (right): https://codereview.chromium.org/1052133002/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java#newcode129 content/public/android/java/src/org/chromium/content/app/ChildProcessService.java:129: throw new RuntimeException("Illegal child process reuse."); On 2015/04/02 17:50:47, ...
5 years, 8 months ago (2015-04-02 18:07:38 UTC) #7
no sievers
> ht> Before your change, it seems render process will work fine even if the ...
5 years, 8 months ago (2015-04-02 18:31:44 UTC) #8
michaelbai
On 2015/04/02 18:31:44, sievers wrote: > > ht> Before your change, it seems render process ...
5 years, 8 months ago (2015-04-02 18:46:47 UTC) #9
no sievers
On 2015/04/02 18:46:47, michaelbai wrote: > On 2015/04/02 18:31:44, sievers wrote: > > > ht> ...
5 years, 8 months ago (2015-04-02 19:05:46 UTC) #10
michaelbai
On 2015/04/02 19:05:46, sievers wrote: > On 2015/04/02 18:46:47, michaelbai wrote: > > On 2015/04/02 ...
5 years, 8 months ago (2015-04-02 19:13:09 UTC) #11
no sievers
On 2015/04/02 19:13:09, michaelbai wrote: > On 2015/04/02 19:05:46, sievers wrote: > > On 2015/04/02 ...
5 years, 8 months ago (2015-04-02 19:16:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052133002/40001
5 years, 8 months ago (2015-04-02 19:25:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052133002/40001
5 years, 8 months ago (2015-04-02 19:36:13 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/63367)
5 years, 8 months ago (2015-04-02 20:33:02 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052133002/60001
5 years, 8 months ago (2015-04-02 21:29:28 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-02 21:32:51 UTC) #28
commit-bot: I haz the power
5 years, 8 months ago (2015-04-03 20:29:19 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b87d764ee43fb0f2f555f6519ced1e4fa8009518
Cr-Commit-Position: refs/heads/master@{#323567}

Powered by Google App Engine
This is Rietveld 408576698