[Dovecot] dovecot Digest, Vol 116, Issue 11

Erik A Johnson johnsone at usc.edu
Thu Dec 6 06:30:55 EET 2012



On December 5, 2012 2:07:14 AM PST, Ben Morrow <ben at morrow.me.uk> wrote:
> At  1AM -0800 on  5/12/12 Erik A Johnson wrote:
>> FYI, the tcpdump I sent previously was with one of our
>> previously-discussed patches in place:
>> 
>>    if (!proxy->client_proxy && net_geterror(proxy->fd_ssl) == EBADF) {
>> 
>> I'm attaching that dump again (as
>> tcpdump_output_witholdpatch_headeronly.txt), as well as a dump without
>> any of the patches (tcpdump_output_withoutpatches_headeronly.txt) in
>> case there is any difference.
> 
> Well, they're certainly different. Are you sure the second trace
> (withoutpatches) was of a session which went into an infinite loop?
> The only thing peculiar about that trace is that the server closes the
> connection after receiving the first packet from the client, but it does
> so perfectly properly: it ACKs the client's data packet, and does the
> FIN-FIN/ACK exchance properly. You will notice there are no [R] packets,
> which indicate something odd is happening at the server end.

I'm pretty sure, but I've run it again, confirmed that the imap-login process is using 100% of a CPU until I kill it, and have attached the tcpdump.  Looks like one packet from SERVER to CLIENT shifted slightly in chronology, but otherwise the same.

>>> #ifdef SO_ISDEFUNCT
>>> +                if (getsockopt(proxy->fd_ssl, SOL_SOCKET, SO_ISDEFUNCT,
>>> +                    (void *)&err, sizeof(err)) == 0 && err) {
>>> +                        errstr = t_strdup_printf(
>>> +                            "%s: socket is defunct", func_name);
>>> +                        break;
>>> +                }
>>> +#endif
>> 
>> Nope, SO_ISDEFUNCT isn't defined.
> 
> Oh, sorry, that needs
> 
>    #include <sys/socket.h>
> 
> at the top. If that doesn't work, then which version of the OS are you
> building for? AFAICT the DEFUNCT socket flag has been present since at
> least 10.5, but the SO_ISDEFUNCT option was only introduced in 10.7.
> This is irritating, actually: it means that to properly fix this on all
> versions of Mac OS Dovecot would need to include the previous ENOTCONN
> code #ifndef SO_ISDEFUNCT.

I've got both 10.7 and 10.8 SDKs in Xcode and neither have SO_ISDEFUNCT defined in sys/socket.h (or anywhere else in the usr/include directories) -- there's a SS_DEFUNCT mask defined in sys/socketvar.h -- is that what you're looking for?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tcpdump_output_withoutpatches_again_headersonly.txt
URL: <http://dovecot.org/pipermail/dovecot/attachments/20121205/a324156c/attachment-0002.txt>


More information about the dovecot mailing list