http://bugzilla.spamassassin.org/show_bug.cgi?id=3917





------- Additional Comments From [EMAIL PROTECTED]  2004-11-20 01:11 -------
I think I have this tracked down to a Windows bug :-(

I rewrote the last server test I attached here in C, ported that to use winsock,
and duplicated the problem with no perl and no Cygwin involved.

According to Microsoft documentation the proper way to gracefully shut down a
tcp socket connection is to call shutdown and then wait for an indication that
any pending outgoing data has been sent. Leaving aside for now the question of
how to wait for such an indication, what I found was that if I send out 70000
bytes all at once then call shutdown, the connection is killed and data after
about 48000 bytes is lost. It doesn't matter what I do after the shutdown, so it
is not a matter of waiting for any indication.

The only way I found to avoid the data loss is to sleep before the call to
shutdown. I tried the select() function to look for something about the socket
that would indicate when it is ready for a clean shutdown and didn't find 
anything.

The only workaround that I can think of right now would be to modify the spamd
protocol to require an acknowledgment back from the client when it has recieved
the message. If the only reason to do that is to make allowances for Windows
being crappy as a server compared to other platforms, it is not something that I
am inclined to do.

I'm open to hearing any other ideas about this, especially from anhyone who has
more expertise in the vagaries of Windows sockets. Otherwise I'm afraid that
this will have to be closed as a WONTFIX and we'll have to document that spamd
cannot be practically run under Windows even using Cygwin.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to