oliver-zehentleitner / maity

web e2e: start_hub and the MailCatcher can get the same port (free_port closes its port before the hub binds it)

Sign in to report

tsk-6f6gd56ntkda Cancelled

Found by review A2188 on PR 2131, web-e2e job 137502570723, step 12. mail_factor_round calls free_port, which picks a port and closes it (web/tools/e2e.py:3213), then MailCatcher binds port 0 (e2e.py:3214, :502). The OS can give the catcher the port the hub is about to take, and the hub health check at e2e.py:450 is then answered by the catcher: http.client.BadStatusLine 220 e2e catcher. The re-run on the same head passed (job 137518897184). Fix: let start_hub keep or bind its port, or start the catcher first and pick the hub port after it, or have MailCatcher refuse the hub port. Acceptance: no shared port between the hub and the catcher by construction.