Bug 63956 - new-run-webkit-tests fails to start http server if one is already running
Summary: new-run-webkit-tests fails to start http server if one is already running
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Seidel (no email)
Depends on:
Blocks: 34984
  Show dependency treegraph
Reported: 2011-07-05 15:11 PDT by Eric Seidel (no email)
Modified: 2011-07-05 16:00 PDT (History)
2 users (show)

See Also:

Patch (7.82 KB, patch)
2011-07-05 15:42 PDT, Eric Seidel (no email)
abarth: review+
abarth: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 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.
Comment 1 Adam Roben (:aroben) 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.
Comment 2 Eric Seidel (no email) 2011-07-05 15:34:56 PDT
ORWT only will kill old httpds if they're using the webkit pid file:

NRWT does the same:

Looks like the assumed pid file names are different though:
Looks like it produces /tmp/WebKit/httpd.pid


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?
Comment 3 Eric Seidel (no email) 2011-07-05 15:42:31 PDT
Created attachment 99756 [details]
Comment 4 Eric Seidel (no email) 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.
Comment 5 Eric Seidel (no email) 2011-07-05 16:00:02 PDT
Committed r90412: <http://trac.webkit.org/changeset/90412>