Bug 212622 - REGRESSION(r217572): run-webkit-tests should abort if the TCP ports for the servers are already in use.
Summary: REGRESSION(r217572): run-webkit-tests should abort if the TCP ports for the s...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-01 18:30 PDT by Carlos Alberto Lopez Perez
Modified: 2020-07-24 09:58 PDT (History)
12 users (show)

See Also:


Attachments
Patch (2.79 KB, patch)
2020-06-01 18:46 PDT, Carlos Alberto Lopez Perez
clopez: review?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2020-06-01 18:30:19 PDT
It seems run-webkit-tests not longer (since r217572) aborts if there is any other process (for example, from other user) already listening on the TCP port the http/websocket/wpt helper servers needs.

If the TCP port is already listening it simply assumes those servers are already running (perhaps from a previous run-webkit-test iteration).

This can cause hard-to-diagnose problems, for example if the user is running other service than the webkit-test servers on this ports.

I think it should abort if it can't start itself the server on the designed TCP port.
Comment 1 Carlos Alberto Lopez Perez 2020-06-01 18:46:00 PDT
Created attachment 400776 [details]
Patch
Comment 2 Jonathan Bedard 2020-06-02 12:04:37 PDT
Comment on attachment 400776 [details]
Patch

I'm not against this, but I'm curious what people who make more use of these servers than myself things. Does Youenn have an opinion?
Comment 3 youenn fablet 2020-06-03 00:20:31 PDT
I sometimes have the HTTP servers up and running so that I can debug in a browser. I find it useful that WTR can run in parallel.

But I can see why this could cause issues.
@Carlos, can you detail a bit the problems you encountered?
Comment 4 Jonathan Bedard 2020-06-03 07:07:33 PDT
Another possibility is that we save a sort of status file (much like Postgres does) so we can keep track of our own web servers, but not generic ones running on the same ports.
Comment 5 Carlos Alberto Lopez Perez 2020-06-03 08:12:51 PDT
(In reply to youenn fablet from comment #3)
> @Carlos, can you detail a bit the problems you encountered?

We have some shared remote servers for building, developing and testing and I found random timeouts and failures when running WebKit layout tests on them. Investigating the issue, I found that it was because I was running the layout tests at the same time than other mate.
Previously if this situation happened, run-webkit-tests aborted with a loud warning (so it was easy to spot the issue).
Comment 6 youenn fablet 2020-06-03 09:51:40 PDT
(In reply to Carlos Alberto Lopez Perez from comment #5)
> (In reply to youenn fablet from comment #3)
> > @Carlos, can you detail a bit the problems you encountered?
> 
> We have some shared remote servers for building, developing and testing and
> I found random timeouts and failures when running WebKit layout tests on
> them. Investigating the issue, I found that it was because I was running the
> layout tests at the same time than other mate.
> Previously if this situation happened, run-webkit-tests aborted with a loud
> warning (so it was easy to spot the issue).

I see, so multiple checkouts but a single server actually running.
Would a console message warning stating that servers are already running be sufficient?
Comment 7 Carlos Alberto Lopez Perez 2020-06-03 10:16:34 PDT
(In reply to youenn fablet from comment #6)
> (In reply to Carlos Alberto Lopez Perez from comment #5)
> > (In reply to youenn fablet from comment #3)
> > > @Carlos, can you detail a bit the problems you encountered?
> > 
> > We have some shared remote servers for building, developing and testing and
> > I found random timeouts and failures when running WebKit layout tests on
> > them. Investigating the issue, I found that it was because I was running the
> > layout tests at the same time than other mate.
> > Previously if this situation happened, run-webkit-tests aborted with a loud
> > warning (so it was easy to spot the issue).
> 
> I see, so multiple checkouts but a single server actually running.
> Would a console message warning stating that servers are already running be
> sufficient?

Yes, I guess it will be sufficient.