[PATCH] Re: fix hang because of infinite loop reading EOF
Haojun Bao
baohaojun at gmail.com
Fri Mar 4 01:36:41 GMT 2011
Nicolas Sebrecht <nicolas.s-dev at laposte.net> writes:
> On Thu, Mar 03, 2011 at 09:04:02AM +0100, Sebastian Spaeth wrote:
>> On Thu, 03 Mar 2011 10:46:33 +0800, Haojun Bao <baohaojun at gmail.com> wrote:
>> > Offlineimap sometimes hangs when downloading gmail with large
>> > attachment.
>> >
>> > This is because of several infinite loop when reading the socket while
>> > the EOF has happened. It can be seen from 2 facts:
>
> Thank you for the spot! Your analyse is interresting.
>
Thank you!
> ....
> I think you're right. This is what the CLOSE_WAIT status seems to say,
> at least. It would nice to know what is causing this CLOSE_WAIT status
> in the first place.
Yes. It would be nice indeed. But maybe it's just because of the Greeeat
Firrre Waaall. I'm behind it, so all kinds of network problems can
happen.
>
> Anyway, if a read() can't be done due to a closed socket, it would
> probably be better to raise a dedicated error and not let the driver do
> unexpected things with the data. We could then catch it and decide what
> to do on such error from the socket manager.
More information about the OfflineIMAP-project
mailing list