-
Notifications
You must be signed in to change notification settings - Fork 231
Pub tests leave zombie processes #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
<img src="https://avatars.githubusercontent.com/u/2108507?v=3" align="left" width="48" height="48"hspace="10"> Comment by dgrove We need to get this fixed asap. Added this to the M1 milestone. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent This appears to be a dart:io issue. When a process is killed, it doesn't kill its child processes. Here's a test case to repro: // a.dart // b.dart // c.dart If you run a.dart, you'll be left with a zombie dart process that's running c.dart forever. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Set owner to @whesse. |
<img src="https://avatars.githubusercontent.com/u/2909286?v=3" align="left" width="48" height="48"hspace="10"> Comment by madsager cc @whesse. |
<img src="https://avatars.githubusercontent.com/u/2909286?v=3" align="left" width="48" height="48"hspace="10"> Comment by madsager Bob, this is standard Linux/Mac behavior and it is not easy to do much about. The question is why you would need to use kill on a parent process in the first place? To avoid creating zombie processes your processes should wait for its child processes to finish. Do you have any idea why that is not happening in pub? Set owner to @munificent. |
<img src="https://avatars.githubusercontent.com/u/2909286?v=3" align="left" width="48" height="48"hspace="10"> Comment by madsager I haven't been able to reproduce this on my machine. Are people aborting their test runs using Ctrl-C or similar? Are tests timing out when this happens? Reproduction steps from the people seeing this would be great. |
<img src="https://avatars.githubusercontent.com/u/5032565?v=3" align="left" width="48" height="48"hspace="10"> Comment by sgmitrovic This happens on Mac OS x when running ./tools/test.py --checked --arch=all |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent It's not pub doing this. It's test.dart. The flow is like this:
This can also probably happen if you just Ctrl-C test.dart too. Of course, pub tests timing out is a problem, but fixing that is a different issue. We've split the suites up into smaller ones, which helps, but they are still generally more heavyweight than your typical "run a few lines of code than exit" test. I can do some tweaking to make sure they have more time. |
<img src="https://avatars.githubusercontent.com/u/2909286?v=3" align="left" width="48" height="48"hspace="10"> Comment by madsager Thanks for the context Bob. As far as I can tell, the only thing we can do here is to make sure that these tests have enough time to run (or cut them down so they do). Parent processes have to wait for their children. If they don't you will get zombies. That is the process model and I don't know of any way to change that. I'm more than happy to take input if any of you know how to reliably kill a process subtree by killing the root without creating zombies. cc @iposva-google. |
<img src="https://avatars.githubusercontent.com/u/5449880?v=3" align="left" width="48" height="48"hspace="10"> Comment by iposva-google It seems to be the case that these zombie processes spawned by pub are waiting indefinitely on some information from the main process. This would be an issue even for command line pub (not driven) by the test harness if the user runs out of patience and kills the main pub process. You cannot expect the user to then hunt down and kill the different sub processes spawned by pub. |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 Pub now has a 30s timeout on all of its operations that are likely to cause it to persist forever. This should mean that no zombie process persists for more than a minute or so, even if the parent process is ungracefully shut down. If you continue to see persistent zombie processes, please let us know. Added Fixed label. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="96" height="96"hspace="10"> Issue by munificent
Originally opened as dart-lang/sdk#4742
Run:
./tools/test.py --checked --arch=all
The VM guys have seen that that often leaves stale processes hanging around.
The text was updated successfully, but these errors were encountered: