Skip to content

Mjcarroll/windows socket exhaustion#1241

Draft
mjcarroll wants to merge 3 commits into
rollingfrom
mjcarroll/windows_socket_exhaustion
Draft

Mjcarroll/windows socket exhaustion#1241
mjcarroll wants to merge 3 commits into
rollingfrom
mjcarroll/windows_socket_exhaustion

Conversation

@mjcarroll

Copy link
Copy Markdown
Member

Description

A few fixes to try to clear up Windows socket exhaustion issues.

Fixes #1229

Is this user-facing behavior change?

No

Did you use Generative AI?

Assissted-by: Antigravity CLI (Gemini 3.5 Flash)

Additional Information

mjcarroll added 2 commits June 5, 2026 13:51
Try to cure windows socket exhaustion issues we are seeing in CI

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
@mjcarroll mjcarroll marked this pull request as draft June 5, 2026 19:04
@mjcarroll mjcarroll self-assigned this Jun 5, 2026
…event socket exhaustion

Check if daemon is already running in spawn_daemon() before trying to bind. This preserves the single-daemon constraint while allowing allow_reuse_address to be True and enabling SO_REUSEADDR socket option on all platforms (including Windows). This fixes WSAEADDRINUSE / WinError 10055 socket exhaustion during TCP TIME_WAIT states.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Assisted-by: Gemini CLI:Gemini 3.5 Flash [view_file, grep_search, list_dir, search_web, run_command, replace_file_content]
@mjcarroll mjcarroll force-pushed the mjcarroll/windows_socket_exhaustion branch from 91681f8 to 0b73f57 Compare June 8, 2026 01:09

@fujitatomoya fujitatomoya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix looks good, but i am not 100% sure if this solves the problem for the windows...

starting CI to see if what is gonna happen 👀

@fujitatomoya

Copy link
Copy Markdown
Collaborator

Pulls: #1241
Gist: https://gist.githubusercontent.com/fujitatomoya/324ba7fba40e3b3d41f4cb589cfc8be5/raw/e543dce3b77ebe61c2292766d4fc87e5692a5f50/ros2.repos
BUILD args: --packages-above-and-dependencies ros2cli ros2multicast
TEST args: --packages-above ros2cli ros2multicast
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19500

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@mjcarroll

Copy link
Copy Markdown
Member Author

fix looks good, but i am not 100% sure if this solves the problem for the windows...

starting CI to see if what is gonna happen 👀

Yeah, at this point I'm kind of just attempting things to see if it makes a difference. It does seem that the real underlying cause is that we are running out of sockets on Windows. Based on my reading, sockets will still live for a few minutes after a process terminates, so I'm experimenting with more aggressively cleaning them up before we shutdown.

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.

🧑‍🌾 ros2cli_daemon tests failing in win rel because it can't spawn daemons

2 participants