https://bugzilla.redhat.com/show_bug.cgi?id=1207174



--- Comment #12 from Petr Pisar <[email protected]> ---
Good catch. It's true that there is no "close($second)" call in the parent
(server) process.
But all sockets are implicitly closed on a process exit. That means that the
reproducer cannot
accumulate open sockets.

Historically, it was recommended to set SO_REUSEADDR for any listening socket.
The reason was that after closing a socket,
kernel keeps the port reserved (TIME-WAIT state) to prevent from other users to
reuse the port early and catch a traffic
from a previous connection. Maybe as TCP sequence numbers became more
fortified, this idea lost its ground, but Linux
still keeps the closed sockets in quarantine (see "ss -tanp" output). Reading
socket(7) showed that there is a new
SO_REUSEPORT option for enabling multiple sockets simultaneously listing on the
same port and SO_REUSEADDR is probably
only left for the closed sockets and early-reusing bind(3).

Adding "ReuseAddr => 1," to the IO::Socket::INET6->new(Listen => 2, ...) call
helps. Adding close($second)
at the end of the parent process does not help.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to