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

Issue 5377001: base: wait for children to terminate. (Closed)

Created:
10 years, 1 month ago by agl
Modified:
9 years, 7 months ago
Reviewers:
Markus (顧孟勤)
CC:
chromium-reviews, Mark Mentovai, agl
Visibility:
Public.

Description

base: wait for children to terminate. I screwed up and assumed that you can't race the kernel. But it turns out that it's possible to obverse a child in the process of dying. The kernel will close the child's file descriptors before waitpid knows that the child is dead. Rather than rewrite everything (in an area of the code which has had lots of issues in the past), I'm opting to do a blocking wait for the child to die. The code higher up already copes with waitpid() failing, but we'll miss some crashes if it does. With this patch, we'll wait up to 250ms for the termination information on a child. We are, no doubt, blocking a latency sensitive thread with this. However, the race window in the kernel is small, so doesn't really block for > a millisecond or so. We do have to consider the case where a buggy child closes its file descriptor without dying. In that case, we'll block for the full 250ms but that indicates a serious bug in the child. BUG=63531 TEST=nagivating to about:gpucrash on linux and checking the we know that the child crashed.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -43 lines) Patch
M base/process_util_posix.cc View 7 chunks +55 lines, -43 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
agl
10 years, 1 month ago (2010-11-24 15:17:08 UTC) #1
Markus (顧孟勤)
10 years, 1 month ago (2010-11-24 17:36:48 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698