Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(62)

Issue 1978001: Merge r46466 from the trunk to the 375 branch.... (Closed)

Created:
8 years, 10 months ago by Mark Mentovai
Modified:
7 years, 10 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org
Visibility:
Public.

Description

Merge r46466 from the trunk to the 375 branch. Kernel zombie death race! Harden process_watcher_mac against zombie-admitting holes. A race between the application and the kernel exists in that a process stops being kqueueable before it becomes waitable. If ProcessWatcher::EnsureProcessTerminated was called within this window, it would assume that the process had already been reaped. The process would then become waitable, but by then, the application forgot about it, and it would be leaked as a zombie until the application as a whole was quit. In order to kill the undead, this code now detects not-kqueueable not-waitable processes and does a blocking wait, with a kill thrown in for good measure. Other opportunities for this code to return early without making the best effort to kill the process have been plugged up too. If any of the kqueue operations fail, this will now fall through to kill and wait for the process. BUG=43150, 43244 TEST=A. Steps from bug 43150 comment 8: 1. Clean profile. 2. Launch. The home page, http://www.google.com/, will load. 3. Type (or paste) about:blank into the omnibox. Expect: no zombies. Observe: original renderer process almost always becomes undead. Note: Perform the test multiple times. It's timing-sensitive. I experienced varying degrees of success reproducing zombies when launching the app by double-clicking it, running it from a terminal window with stdout and stderr on the terminal, and running it from a terminal window with stdout and stderr redirected to a file. With this fix, no zombies should be condition. B. zombies.py test from bug 43244. Review URL: http://codereview.chromium.org/1915003 TBR=mark@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46469

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -77 lines) Patch
M chrome/common/process_watcher_mac.cc View 1 chunk +127 lines, -77 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Mark Mentovai
8 years, 10 months ago (2010-05-05 18:44:16 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698