[Patch] Fix hang in safe_sendfile on SmartOS

Timo Sirainen tss at iki.fi
Mon Sep 7 22:22:19 UTC 2015


On 07 Sep 2015, at 23:19, Sebastian Wiedenroth <sebastian.wiedenroth at skylime.net> wrote:
> 
> 
>> Am 07.09.2015 um 21:34 schrieb Timo Sirainen <tss at iki.fi>:
>> 
>> On 07/16/2015 06:03 PM, Sebastian Wiedenroth wrote:
>>> Fix hang in safe_sendfile on SmartOS
>>> 
>>> The call to sendfile on SmartOS can fail with EOPNOTSUPP. This is a valid error
>>> code and documented in the man page. This error code needs to be handled or
>>> else dovecot will retry the sendfile call endlessly and hang.
>> 
>> Committed .. However, I think a more important bug is that it hangs.
>> It's definitely not supposed to hang. Which process was it that was
>> hanging How can I reproduce that? I can only get it to disconnect the
>> IMAP client.
> 
> 
> Thanks!
> 
> It was the managesieve process that was hanging.
> To trigger it we used sieve-connect [1] like this:
> 	sieve-connect -u demo at example.com mailbox.example.com

Thanks. I did find a bug in Pigeonhole with this when issuing a GET command :)

Also I see now why it's looping, more or less. sendfile() is still indicating that it's sending some data (by updating s_offset) even though it's returning a failure. I wonder if reverting the earlier EOPNOTSUPP change and applying this patch causes it to assert-crash instead of going to infinite loop? http://hg.dovecot.org/dovecot-2.2/rev/f6dd24658fb1



More information about the dovecot mailing list