Skip to content

fix(launcher): skip download lock when bind is denied - #1248

Open
arimu1 wants to merge 1 commit into
go-rod:mainfrom
arimu1:fix/skip-download-lock-on-permission-denied
Open

arimu1 wants to merge 1 commit into
go-rod:mainfrom
arimu1:fix/skip-download-lock-on-permission-denied

Conversation

@arimu1

@arimu1 arimu1 commented Sep 26, 2026 •

Copy link
Copy Markdown

Summary

  • Before calling leakless.LockPort in Browser.Get, probe binding 127.0.0.1:<LockPort>.
  • When the probe fails with EACCES or EPERM, skip the TCP download lock so Get does not hang in restricted container networks.
  • When binding is allowed (including EADDRINUSE), behavior is unchanged: rod still delegates to leakless.LockPort and its retry loop for cross-process download serialization.

This does not change leakless's EADDRINUSE retry behavior; it only skips the lock when binding the lock port is not permitted.

Fixes #1232

Test plan

  • go test ./lib/launcher -run 'TestDownloadPortLock|TestIsPermanentPortBindDenied'
  • Full go test ./lib/launcher (note: TestManaged fails locally on main as well — context deadline / handshake assertion; unrelated to this change)

Probe the leakless lock port before calling LockPort so EACCES/EPERM
environments do not hang Browser.Get forever. EADDRINUSE still uses
leakless retry for cross-process download serialization.

Fixes go-rod#1232

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LockPort hangs forever when port binding is denied (no timeout/error)

1 participant