[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#596291: offlineimap getting stuck when run with multiple threads/connections



This one time, at band camp, Stephen Gran said:
> Copy message 3166 from lists.clamav-users:
>    Copy message 3166 IMAP[lists.clamav-users] -> Maildir[lists.clamav-users], LocalStatus[lists.clamav-users]
> Copy message 3166 from lists.clamav-users:
>    DEBUG[imap]:   49:23.94 > GAHI1199 UID FETCH 3166 (BODY.PEEK[])
> 
> The server is just sat in:
> epoll_wait(5, {}, 4, 5000)              = 0

I've managed to correlate the server side and the client side a bit
more:

Copy message 2099 from debian.amd64.2007:
   Copy message 2099 IMAP[debian.amd64.2007] -> Maildir[debian.amd64.2007], LocalStatus[debian.amd64.2007]
Copy message 2100 from debian.amd64.2007:
   Copy message 2100 IMAP[debian.amd64.2007] -> Maildir[debian.amd64.2007], LocalStatus[debian.amd64.2007]


But the server sees:

[pid 12586] read(0, "BHAJ7358 UID FETCH 2099 (BODY.PEEK[])\r\n"..., 3029) = 39
[pid 12586] write(1, "* 2099 FETCH (UID 2099 BODY[] {5143}\r\nReturn-path: <...., 4094) = 4094
[pid 12586] write(1, "BHAJ7358 OK Fetch completed.\r\n"..., 1120) = 1120
[pid 12586] epoll_wait(5,  <unfinished ...>
[pid 12568] <... epoll_wait resumed> {}, 14, 1000) = 0
[pid 12568] epoll_wait(10,  <unfinished ...>
[pid 12586] <... epoll_wait resumed> {}, 3, 517) = 0
[pid 12586] epoll_wait(5,  <unfinished ...>
[pid 12568] <... epoll_wait resumed> {}, 14, 1000) = 0

and there it hangs.  So it looks like the client thinks it's sent a
FETCH, but the server never sees it.  Hope this is helpful.

I have so far been unable to reproduce this when running offlineimap
under strace, which suggests a timing dependant bug (kind of as
suspected, but still not all that helpful, I realize).  The earlier
strace (and the strace I see when attaching after it hangs) does suggest
that a lock is not being releaesed somewhere, but I can't immediately
see anything obviously wrong with the logic in the code.

Cheers,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: