Closed Bug 1927721 Opened 1 year ago Closed 1 year ago

Force a shutdown of Firefox if the Websocket port cannot be aquired after 5s

Categories

(Remote Protocol :: Agent, defect, P2)

defect
Points:
2

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [webdriver:m15][webdriver:relnote])

Attachments

(1 file)

In Marionette, we use a PollPromise to retry the creation of the ServerSocket for 5 seconds to avoid immediate failure if another Firefox process is shutting down and still has the same socket in use. If we can't acquire the requested port, we force a shutdown of Firefox to prevent lingering processes.

Interestingly, we don't apply the same logic for the Remote Agent and its WebSocket port. We should probably introduce similar behavior to prevent Firefox instances from lingering if they can’t be controlled or shut down properly by the client.

This may be the cause of the issue seen with Puppeteer: https://github.com/puppeteer/puppeteer/pull/13245.

Severity: -- → S3
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m14]

This patch introduces a retry mechanism for binding the
Remote Agent's HTTP server to a port, improving resilience
in scenarios where the port might initially be unavailable.

If all attempts fail, the application is forced to quit.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED

We are in a soft freeze phase. So I'll wait with the landing of the patch until Monday afternoon.

Whiteboard: [webdriver:m14] → [webdriver:m15]
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9114d64794ba [remote] Add retry mechanism to the Remote Agent for binding the HTTP server. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Whiteboard: [webdriver:m15] → [webdriver:m15][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: