Skip to content
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

Repeated CreateProcess() failures runs past -k limit #542

Open
evmar opened this issue Apr 13, 2013 · 0 comments
Open

Repeated CreateProcess() failures runs past -k limit #542

evmar opened this issue Apr 13, 2013 · 0 comments

Comments

@evmar
Copy link
Collaborator

evmar commented Apr 13, 2013

This is an interesting corner. When CreateProcess() fails, Subprocess models it as if the command ran and output an error message; this allows the build to do the normal error handling of a failed subprocess, like printing the command that faile.d.

But since it fails immediately, the subprocess never gets into the running state, which means the main build loop will run and fail processes long past the maximum failure count. This is because the logic is like:

while more_to_do:
  if can start another within limit
    start another
    continue  // XXX
  if any failed:
    check if we hit failure limit
    continue
  // ... more here

We keep hitting the point marked XXX because we're never starting any processes, despite each process start failing. I think the fix is to swap the order of the two ifs there, but I want to think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant