slirp4netns icon indicating copy to clipboard operation
slirp4netns copied to clipboard

slirp4netns seems to be leaking sockets

Open peterboba opened this issue 10 months ago • 4 comments

I see a lot of slirp4netns connections in FIN_WAIT2 state:

Image

slirp4netns version 1.3.1
commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
libslirp: 4.8.0
SLIRP_CONFIG_VERSION_MAX: 5
libseccomp: 2.5.3

I'm using slirp4netns with rootless containers. I'm wondering whether this is a possible misconfiguration or a bug. This seems to be easily reproducible when I start netcat to port 443 and send SIGTERM to nc process with kill. slirp4netns connection enters FIN_WAIT2 which is then never cleared.

peterboba avatar Jan 24 '25 18:01 peterboba

Probably this should be reported to https://gitlab.freedesktop.org/slirp/libslirp/-/issues ?

AkihiroSuda avatar Feb 09 '25 06:02 AkihiroSuda

I have the same and I can confirm that some IPs are days old (according to logs only connected once more than 3 days ago)

slirp4netns version 1.3.2
commit: 0f13345bcef588d2bb70d662d41e92ee8a816d85
libslirp: 4.9.0
SLIRP_CONFIG_VERSION_MAX: 6
libseccomp: 2.5.3

merkisoft avatar Apr 11 '25 06:04 merkisoft

Probably this should be reported to https://gitlab.freedesktop.org/slirp/libslirp/-/issues ?

finally I created one because this is still unresolved: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/86

merkisoft avatar Apr 16 '25 21:04 merkisoft

Could somebody test the patch proposed here? https://gitlab.freedesktop.org/slirp/libslirp/-/issues/86#note_2871410

sthibaul avatar Apr 19 '25 15:04 sthibaul