Reliability and shutdown

Tracy Reed treed at ultraviolet.org
Fri May 11 21:06:22 BST 2012


I've been using offlineimap for about 5 months. It seems to be the right tool
for the job and does exactly what I want (bi-directional IMAP sync so I can
read mail locally). 

My only complaint is that it has been terribly unreliable.

The primary sympton is that it simply stops synching one or more accounts and I
miss time-sensitive emails for hours.  It is very difficult to reproduce the
problem or describe exactly what is going on. 

Versions:

CentOS 5.8
offlineimap 6.5.3.1 (from git)
Python 2.7.2

When I run offlineimap from cron I eventually (after a number of hours) end up
with several offlineimap processes running. And one or more accounts are not
being synched. Sometimes I try running it in a terminal set to autorefresh
instead of cron. Both methods seem to have issues.

Right now I somehow have two offlineimap processes running:

treed     3818  5326  4 May09 pts/10   01:57:13 /usr/local/bin/python /usr/local/bin/offlineimap
treed    21508  3818  0 May10 pts/10   00:00:00 /usr/local/bin/python /usr/local/bin/offlineimap

One seems to have the other as the ppid. Does it normally fork itself off? I
don't recall seeing this before.

Here are a couple of straces:

[treed at home ~]$ strace -p 3818
Process 3818 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 45000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)

[treed at home ~]$ strace -p 21508
Process 21508 attached - interrupt to quit
futex(0x6389390, FUTEX_WAIT_PRIVATE, 0, NULL
 <unfinished ...>

If I ctrl-c a running offlineimap it says:

Terminating NOW (this may take a few seconds)...

and then never exits. If I send it a USR2 signal it says it will terminate
after next sync and occasionally does so but often does not.

Is there some better way to troubleshoot this?

Here's my sanitized config:

[general]
accounts = user2 at domain4.com, user1 at domain1.com, user2 at domain2.com, user1 at domain3.com, user1 at domain2.com
ui = ttyui
fsync = true
status_backend = sqlite
maxsyncaccounts= 10

[Account user1 at domain2.com]
localrepository = user1-Local
remoterepository = user1-Remote
autorefresh = 2
quick = 30
holdconnectionopen = false
keepalive = 60
presynchook = imapfilter
postsynchook = notmuch new

[Repository user1-Local]
type = Maildir
localfolders = ~/Maildir/user1.domain2

[Repository user1-Remote]
type = IMAP
remotehost = imap.domain2.com
remoteuser = user1 at domain2.com
remotepass = pass1
ssl = yes
sslcacertfile = /etc/pki/tls/cert.pem

[Account user2 at domain2.com]
localrepository = Local
remoterepository = Remote
autorefresh = 2
quick = 30
holdconnectionopen = true
keepalive = 60
presynchook = imapfilter
postsynchook = notmuch new

[Repository Local]
type = Maildir
localfolders = ~/Maildir/user2.domain2

[Repository Remote]
type = IMAP
remotehost = imap.domain2.com
remoteuser = user2 at domain2.com
remotepass = pass2 
ssl = yes
sslcacertfile = /etc/pki/tls/cert.pem

[Account user1 at domain3.com]
localrepository = domain3-Local
remoterepository = domain3-Remote
autorefresh = 2
quick = 30
holdconnectionopen = false
keepalive = 60
presynchook = imapfilter
postsynchook = notmuch new

[Repository ed-Local]
type = Maildir
localfolders = ~/Maildir/ed

[Repository ed-Remote]
type = IMAP
remotehost = mail.domain3.com
remoteuser = user1 at domain3.com
remotepass = pass3
ssl = yes

[Account user1 at domain1.com]
localrepository = domain1-Local
remoterepository = domain1-Remote
autorefresh = 2
quick = 30
holdconnectionopen = false
keepalive = 60
presynchook = imapfilter
postsynchook = notmuch new

[Repository domain1-Local]
type = Maildir
localfolders = ~/Maildir/domain1

[Repository domain1-Remote]
type = IMAP
remotehost = mail.domain1.com
remoteuser = user1
remotepass = pass1
ssl = yes
#sslcacertfile = /home/user1/cacert.crt
maxconnections = 3

[Account user2 at domain4.com]
localrepository = domain4-Local
remoterepository = domain4-Remote
autorefresh = 2
quick = 30
holdconnectionopen = false
keepalive = 60
presynchook = imapfilter
postsynchook = notmuch new

[Repository domain4-Local]
type = Maildir
localfolders = ~/Maildir/domain4

[Repository domain4-Remote]
type = IMAP
remotehost = imap.domain4.com
remoteuser = user2 at domain4.com
remotepass = pass4
ssl = yes
maxconnections = 3

Any help in making this work reliably is greatly appreciated!

-- 
Tracy Reed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120511/016abe44/attachment.sig>


More information about the OfflineIMAP-project mailing list