Open Bug 1555554 Opened 5 years ago Updated 5 months ago

Use ephemeral ports for selfserv in tests

Categories

(NSS :: Test, task, P2)

All
macOS

Tracking

(Not tracked)

People

(Reporter: mt, Unassigned)

Details

One recurring problem for test runs, particularly the Mac ones, is an inability to open the server port. This accounts for a non-trivial number of CI failures.

It might be that getting dedicated images for test runs on Linux makes this less of a concern, but there have been several failures on Mac builds. We need to stamp hard on oranges, which consume time for investigation and could mask real issues.

The idea is to add an alternative argument to selfserv, call it --ephemeral-port, which has the server run on any available ephemeral port. The port number would be written to a file and that could be used for client connections.

I haven't checked if NSPR would allow getting an ephemeral port for TCP, but we can check. If there is no way to do that, we can at least iteratively try random ports in the upper reaches of the space.

There are a few places where we iteratively use the existing -b option, which just tests that the port is available. That code could be replaced entirely by this option.

I wonder if we should run fewer simultaneous workers on the Macs for a while as a tiny mitigation.

Severity: normal → major
Priority: P3 → P2

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.