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

Issue 3448030: Exit explicitly at end of parallel_emerge, so child processes exit as well. (Closed)

Created:
10 years, 2 months ago by davidjames
Modified:
9 years, 4 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Exit explicitly at end of parallel_emerge, so child processes exit as well. So, we've been seeing parallel_emerge hang after printing "Done". It's hard to know for sure why this hang is happening, but my theory right now is that the Python garbage collector doesn't always know that it needs to kill the child processes when we exit normally at the bottom of the script. Adding sys.exit(0) tells Python that yes, we really want to exit. I haven't tested my hypothesis above, because the hang we've been seeing is pretty rare and is hard to reproduce. So I'm planning on testing by just putting in this workaround and seeing if it fixes the problem. TEST=Run ./parallel_emerge world BUG=chromium-os:5976 Change-Id: I7b4f2ec4ccba9b00f22f3739dfd3eff51ceed425 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5137a74

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M parallel_emerge View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
davidjames
10 years, 2 months ago (2010-09-27 17:02:05 UTC) #1
Nick Sanders
lgtm, hope it fixes it!
10 years, 2 months ago (2010-09-29 22:03:35 UTC) #2
kliegs
Would adding in a call to print out child processes be more useful for debugging? ...
10 years, 2 months ago (2010-09-29 22:25:56 UTC) #3
David James
10 years, 2 months ago (2010-09-29 23:07:30 UTC) #4
On 2010/09/29 22:25:56, kliegs wrote:
> Would adding in a call to print out child processes be more useful for
> debugging?  If we think that's the problem then when we see a process hung
> we can see the output of how many child processes were present and draw
> a correlation.

If we see it hang again, that'd be a good step. We could add in a timer that
checks if parallel_emerge is still trying to exit after some timeout and then
outputs the debug messages if necessary. But I think that would be overkill if
my current commit fixes the problem.


> While this change may fix the problem, determining if it worked or if we've
> just been lucky will be difficult.

We've already seen this problem 3 times, so, if the problem is still present,
we'll likely see it fail again. If that happens again we can look into adding
more debugging stuffs.

Cheers,

David

Powered by Google App Engine
This is Rietveld 408576698