http://bugzilla.spamassassin.org/show_bug.cgi?id=3997
------- Additional Comments From [EMAIL PROTECTED] 2005-04-12 05:49 ------- Jonathan, I still don't understand how the source code and your explanation and your tcpdump results fit together, or why the problem goes away in your environment when you disable persistent_udp. Looking at the code in send_udp, it creates a new socket when it is called the first time, and it saves it in $self->{'sockets'}{'UDP'}. The only code that refers to $self->{'sockets'}{'UDP'} is in send_udp, which will continue to use the socket that is stored there. bg_send always creates a new socket object. Even after the call to send_udp, the subsequent call to bg_send still creates a new IO::Socket object. I'm not sure what you are saying about the port. Every socket created in send_udp and in bgsend uses $self->{'srcport'} || undef for the source port in creating the IO::Socket object. That appears to be undef in this case, because no SpamAssassin code sets srcport. As far as I can tell the bug has to be happening at an even lower level than Net::DNS, that is a bug in IO::Socket. I don't know what happens there. If IO::Socket::new is called to create a UDP socket with a local port of undef, is the new socket always supposed to select an unused local port from which to send?. If that's the case, then your tcpdump is showing something going wrong with that, not bgsend reusing a socket. The fact that disabling persistent_udp makes the problem go away for you but not for Daniel may only indicate that there is a different pattern of creation of different numbers of sockets when you turn off persistent_udp. It is important that you have found a reproducable way of turning the problem on and off on your system. If my theory that the problem is in IO::Socket or lower is correct, then you should see the following if you add this debugging output: In send_udp and in bgsend add debugging output that shows the value of Localport that is passed into the IO::Socket constructor, and that shows $sock->sockport() of the socket that is returned by the constructor. When the bug happens, I bet that you will see that IO::Socket is being called with an undef Localport, but the source port is being reused even though the first UDP packet has not yet received its reply on that port. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.