Skip to content

test_ent1117 wildcard port-probe test flakes with EADDRINUSE on CI #4445

Closed

Description

@vybe

Problem

tests/unit/test_ent1117_port_probe_bind_only.py::test_wildcard_probe_sees_a_bind_on_another_local_address fails intermittently in CI with OSError: [Errno 98] Address already in use.

The test binds a socket to (127.0.0.2, 0), takes the ephemeral port the kernel picked, and then binds 127.0.0.1 on that same port. The kernel only guarantees the port is free on the address that was asked (127.0.0.2), so the loopback bind fails whenever another socket on the runner already holds that port on 127.0.0.1. The same collision also makes the earlier is_port_available(port) is False assertion pass for the wrong reason (the 127.0.0.1 holder, not the held bind on the other address).

Seen twice in a row on #4443, whose tested tree was byte-identical to dev (the PR only moves the enterprise submodule pointer, which the unit job does not check out).

Fix

Pick a port that is free on 127.0.0.1 as well as held on the other address before asserting anything, retrying a bounded number of times.

Acceptance criteria

  • The test chooses a port whose 127.0.0.1 bind is confirmed free while the other-address bind is held
  • The test still fails when is_port_available binds 127.0.0.1 instead of the wildcard

Activity

  1. added
    status-in-progress
    on Nov 10, 2026
  2. added
    status-in-dev
    and removed
    status-in-progress
    on Nov 10, 2026
  3. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority-p2type-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions