Bug 60241 - new-run-webkit-tests: doesn't wait for children if it gets a ctrl-c
Summary: new-run-webkit-tests: doesn't wait for children if it gets a ctrl-c
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 19:47 PDT by Dirk Pranke
Modified: 2011-05-31 15:27 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2011-05-04 19:47 PDT, Dirk Pranke
no flags Details | Formatted Diff | Diff
Patch (1.51 KB, patch)
2011-05-30 15:05 PDT, Dirk Pranke
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2011-05-04 19:47:30 PDT
new-run-webkit-tests: doesn't wait for children if it gets a ctrl-c
Comment 1 Dirk Pranke 2011-05-04 19:47:51 PDT
Created attachment 92364 [details]
Patch
Comment 2 Tony Chang 2011-05-06 15:25:55 PDT
Comment on attachment 92364 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92364&action=review

> Tools/Scripts/new-run-webkit-tests:59
> +    finally:

Do we need to catch other exceptions?  E.g., if proc.wait() throws another error (e.g., an IO or OS error), it looks like we'll just silently ignore the error if we make it to sys.exit(proc.returncode).  Maybe that's not possible?
Comment 3 Dirk Pranke 2011-05-06 15:41:54 PDT
Comment on attachment 92364 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92364&action=review

>> Tools/Scripts/new-run-webkit-tests:59
>> +    finally:
> 
> Do we need to catch other exceptions?  E.g., if proc.wait() throws another error (e.g., an IO or OS error), it looks like we'll just silently ignore the error if we make it to sys.exit(proc.returncode).  Maybe that's not possible?

Hm. Good point. I should rework this.
Comment 4 Eric Seidel (no email) 2011-05-11 20:16:47 PDT
Comment on attachment 92364 [details]
Patch

Sounds like dirk is gonna take another pass.
Comment 5 Dirk Pranke 2011-05-30 15:05:22 PDT
Created attachment 95374 [details]
Patch
Comment 6 Dirk Pranke 2011-05-30 15:08:10 PDT
Comment on attachment 95374 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95374&action=review

Okay, reworked. Can haz another review, plz?

> Tools/Scripts/new-run-webkit-tests:-57
> -        sys.exit(signal.SIGINT + 128)

Note that we don't need or want this line, because the same logic exists the subprocess, and omitting this will help catch cases where the subprocess starts doing the wrong thing.
Comment 7 Tony Chang 2011-05-31 12:06:47 PDT
Comment on attachment 95374 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95374&action=review

> Tools/Scripts/new-run-webkit-tests:59
> +        proc.wait()

Is it possible for this to hang completely?
Comment 8 Dirk Pranke 2011-05-31 14:34:14 PDT
Comment on attachment 95374 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95374&action=review

>> Tools/Scripts/new-run-webkit-tests:59
>> +        proc.wait()
> 
> Is it possible for this to hang completely?

Good question (since that's why I put the fixme in). I haven't seen in in practice, and in theory, I wouldn't think so (since the subprocess also got a Keyboard interrupt and should be exiting), but I can't definitively say that it's not possible.
Comment 9 Tony Chang 2011-05-31 14:37:23 PDT
Comment on attachment 95374 [details]
Patch

Ok, let's try it.  I guess worst case scenario, the user will press ctrl+c again and both the subprocess and the main process will raise a KeyboardInterrupt exception, right?
Comment 10 Dirk Pranke 2011-05-31 14:39:45 PDT
(In reply to comment #9)
> (From update of attachment 95374 [details])
> Ok, let's try it.  I guess worst case scenario, the user will press ctrl+c again and both the subprocess and the main process will raise a KeyboardInterrupt exception, right?

Yup.
Comment 11 WebKit Commit Bot 2011-05-31 15:25:37 PDT
The commit-queue encountered the following flaky tests while processing attachment 95374 [details]:

editing/pasteboard/copy-standalone-image.html bug 61813 (authors: andrew@webkit.org and mitz@webkit.org)
The commit-queue is continuing to process your patch.
Comment 12 WebKit Commit Bot 2011-05-31 15:27:07 PDT
Comment on attachment 95374 [details]
Patch

Clearing flags on attachment: 95374

Committed r87757: <http://trac.webkit.org/changeset/87757>
Comment 13 WebKit Commit Bot 2011-05-31 15:27:13 PDT
All reviewed patches have been landed.  Closing bug.