GMAIL hangs

Sebastian Spaeth Sebastian at
Tue Apr 26 14:12:25 BST 2011

I continue to happily sync with my IMAP server and offlineimap.6.3.3 and
it works flawlessly. However, when I try to sync with Gmail, it reliably
hangs after syncing a couple of emails (say after between 20-200 emails).

While I suspect Gmail of many things, it seems that in these cases gmail
actually has finished sending the email just fine, and we are somehow
still stuck, waiting for things to happen. A typical debug log would
stall here...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debug.log
URL: <>
-------------- next part --------------

The debug logs that I have taken are all a bit different, in that some
of them just stop like the above one, and some stop a bit later (which
might well have to do with how we buffer our log output), but they all
have in common that gmail actually finished sending the message body
that we are interested in. Somehow, we or imaplib2 is still busy waiting
for something though and looking at the halted process with strace shows
futex(0x7f9ba80008e0, FUTEX_WAIT_PRIVATE, 0, NULL

So we are indeed locking and waiting for something to release a futex.

I am pretty positive that this is an imaplib2 issue that we are
seeing. And we should perhaps investigate this thoroughly. I don't feel
comfortable going forward the imaplib2 route if it means constant hangs
with gmail (unless they are clearly faults on gmail's side).


More information about the OfflineIMAP-project mailing list