[Users] [Bug 2416] spin loop checking pop3
noreply at thewildbeast.co.uk
noreply at thewildbeast.co.uk
Tue Jun 4 10:10:14 CEST 2013
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2416
Stefan Tauner <stefan.tauner at student.tuwien.ac.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefan.tauner at student.tuwie
| |n.ac.at
--- Comment #1 from Stefan Tauner <stefan.tauner at student.tuwien.ac.at> ---
I am not entirely sure if this is related, but I notice something very similar
with my claws-mail 3.8.0. One of "my" POP3 servers seems to often shutdown (or
pretend that). This happens very often after issuing the UIDL command like
this:
[09:30:06] POP3< +OK Dovecot ready.
[09:30:06] POP3> STLS
[09:30:06] POP3< +OK Begin TLS negotiation now.
[09:30:07] POP3> USER <redacted>
[09:30:07] POP3< +OK
[09:30:07] POP3> PASS ********
[09:30:07] POP3< +OK Logged in.
[09:30:07] POP3> STAT
[09:30:08] POP3< +OK 26698 552720155
[09:30:08] POP3> UIDL
[09:30:08] POP3< -ERR Server shutting down.
** command not supported
[09:30:08] POP3> LAST
At least sometimes when this happens, claws-mail starts spinning in an endless
loop that blocks the UI loop apparently. The GUI is only updated by certain
events (resorting the message list seems to be consistently work in this
situation) and I could only get this log after disconnecting from any network
and wait for a timeout.
When i attach strace to the process there is an endless loop doing the
following (I am not sure where it starts):
select(21, [20], NULL, NULL, {0, 0}) = 1 (in [20], left {0, 0})
recvfrom(5, 0x16689b4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily
unavailable)
poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN},
{fd=4, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN},
{fd=15, events=POLLIN|POLLPRI}, {fd=19, events=POLLIN}, {fd=7, events=POLLIN}],
9, 0) = 0 (Timeout)
read(6, 0x7fffdcc488b0, 16) = -1 EAGAIN (Resource temporarily
unavailable)
fcntl(20, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
recvfrom(5, 0x16689b4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily
unavailable)
poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN},
{fd=4, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN},
{fd=15, events=POLLIN|POLLPRI}, {fd=19, events=POLLIN}, {fd=7, events=POLLIN}],
9, 0) = 0 (Timeout)
read(6, 0x7fffdcc488b0, 16) = -1 EAGAIN (Resource temporarily
unavailable)
I have not looked at the code, but it seems rather obvious that one wants to
add a timeout for those "temporarily" unavailable resources. The return value
needs to be checked for EAGAIN and maybe EWOULDBLOCK and after a number of
tries (maybe after adding a short sleep) the loop has to be exited.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Users
mailing list