Bug 63956

Summary: new-run-webkit-tests fails to start http server if one is already running
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 34984    
Attachments:
Description Flags
Patch abarth: review+, abarth: commit-queue+

Eric Seidel (no email)
Reported 2011-07-05 15:11:33 PDT
new-run-webkit-tests fails to start http server if one is already running It turns out old-run-webkit-tests seems to be really bad about shutting down httpd if it's interrupted/killed (as can commonly happen on the buildbots if someone cancels a build). We already seem to have a Tools/BuildSlaveSupport/kill-old-processes script to help with this. However that script doesn't know how to kill httpd on Mac. Trying to switch the bots to NRWT we're commonly encountering an error where NRWT refuses to start because there is already something bound to the 8080 port (so far it's always been an httpd server from a previous ORWT run). So I propose we add "httpd" to kill-old-processes and then buildbot will automatically clean these up before calling run-webkit-tests.
Attachments
Patch (7.82 KB, patch)
2011-07-05 15:42 PDT, Eric Seidel (no email)
abarth: review+
abarth: commit-queue+
Adam Roben (:aroben)
Comment 1 2011-07-05 15:18:12 PDT
Why not make NRWT automatically kill old httpd processes, like old-run-webkit-tests does? That would help regular folks, too, not just the bots.
Eric Seidel (no email)
Comment 2 2011-07-05 15:34:56 PDT
ORWT only will kill old httpds if they're using the webkit pid file: http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitperl/httpd.pm#L168 NRWT does the same: http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py#L75 Looks like the assumed pid file names are different though: http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitperl/httpd.pm#L68 Looks like it produces /tmp/WebKit/httpd.pid http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py#L62 http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py#L51 http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py#L59 Looks like it produces: /tmp/WebKit/apache.pid (at least on Mac) I could easily change NRWT to look at httpd.pid instead, maybe that's the better fix? Why does windows kill-old-processes kill httpd?
Eric Seidel (no email)
Comment 3 2011-07-05 15:42:31 PDT
Eric Seidel (no email)
Comment 4 2011-07-05 15:48:40 PDT
Thanks for your prod, aroben. After my investigation realizing that the pid file paths were different, this fix is much cleaner. Because I had already cleaned up kill-old-processes, I added that to the patch (even though there are no functional changes, just removing the ^M line endings.
Eric Seidel (no email)
Comment 5 2011-07-05 16:00:02 PDT
Note You need to log in before you can comment on or make changes to this bug.