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

Issue 9225019: Fix race condition between signal handler and main thread. (Closed)

Created:
8 years, 11 months ago by Mads Ager (google)
Modified:
8 years, 11 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix race condition between signal handler and main thread. The signal handler could unblock the main thread. The main thread could delete the Process object the signal handler is holding a pointer to. The signal handler could then close a file descriptor it got from the deleted memory. The whole process exit handling infrastructure is pretty fragile. We should attempt to come up with something simpler. R=sgjesse@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3652

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -6 lines) Patch
M runtime/bin/fdutils_macos.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/file_impl.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/bin/process_linux.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M runtime/bin/process_macos.cc View 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Mads Ager (google)
8 years, 11 months ago (2012-01-27 12:31:38 UTC) #1
Søren Gjesse
8 years, 11 months ago (2012-01-27 12:59:20 UTC) #2
lgtm

But as discussed offline we need to change the handling of terminating
processed. The global list of active processes need to be protected by locking
to avoid races. The process exit signal handler should only indicate that some
process is terminated. This indication should then picked up by some thread
which does the actual waitpid call and process list maintenance.

Powered by Google App Engine
This is Rietveld 408576698