autorefresh sync hangs after laptop suspend
Patrick Totzke
patricktotzke at googlemail.com
Wed Apr 27 09:29:34 BST 2011
Hi all,
finally! I was able to document an error that kept on bugging me.
I hope it's just a misconfiguration on my part, will attach my config:
It seems that with "autorefresh = 1" set, offlineimap's next sync
after I awoke my netbook from suspend stalls.
Attached is the (std)output of the running instance:
There are a few peculiarities there:
1 the first round of syncs (two accounts) seems ok
2 from around line 60 on, the "UoE" account is not synced anymore.
3 around line 300, there is a stacktrace that results from a connection loss due to hibernation
(repeats 3x)
4 afterwards sync seems to work for 2 cyles, although only for the one account still syncing
5 the last sync stalls.
For problem 2, it might be that there are some race conditions with my postsynchook "notmuch new"
but on the other hand, thats usually quite fast:
~$ time notmuch new
No new mail.
real0m0.051s
user0m0.020s
sys0m0.028s
As with 4 and 5, I'm completely baffled.
I'll attach my ~/.offlineimaprc (only address lines obstructed).
For remotepasseval I use a script "getpwd" that extracts my pwd
from a encrypted file without interaction via gpg and my keyagent.
This works and should not be a problem: Even if Offlineimap
evaluates this before each sync, my keyring is unlocked and
decryption works in the same term offlineimap runs.
Cheers and thanks for any comments,
/p
-------------- next part --------------
1 ...
2 Next refresh in 60 seconds
3 Account sync GMail:
4 Next refresh in 40 seconds
5 Account sync UoE:
6 Next refresh in 50 seconds
7 Account sync GMail:
8 Next refresh in 30 seconds
9 Account sync UoE:
10 Next refresh in 40 seconds
11 Account sync GMail:
12 Next refresh in 20 seconds
13 Account sync UoE:
14 Next refresh in 30 seconds
15 Account sync GMail:
16 Next refresh in 10 seconds
17 Account sync UoE:
18 Next refresh in 20 seconds
19 Account sync GMail:
20 ***** Finished processing account GMail
21 Copying folder structure from IMAP to Maildir
22 Folder sync [GMail]:
23 Syncing Drafts: IMAP -> Maildir
24 Syncing INBOX: IMAP -> Maildir
25 Syncing Trash: IMAP -> Maildir
26 Syncing Sent: IMAP -> Maildir
27 Account sync GMail:
28 Calling hook: notmuch new
29 Hook stdout: No new mail.
30
31 Hook stderr:
32
33 Hook return code: 0
34 Next refresh in 60 seconds
35 Account sync UoE:
36 Next refresh in 10 seconds
37 Account sync GMail:
38 Next refresh in 50 seconds
39 Account sync UoE:
40 ***** Finished processing account UoE
41 Copying folder structure from IMAP to Maildir
42 Folder sync [UoE]:
43 Syncing Drafts: IMAP -> Maildir
44 Syncing Call4Papers: IMAP -> Maildir
45 Syncing Junk: IMAP -> Maildir
46 Syncing Sent Items: IMAP -> Maildir
47 Syncing Sent: IMAP -> Maildir
48 Syncing INBOX: IMAP -> Maildir
49 Syncing Trash: IMAP -> Maildir
50 Syncing lists/agda: IMAP -> Maildir
51 Syncing lists/automata-team: IMAP -> Maildir
52 Syncing lists/lfcs: IMAP -> Maildir
53 Syncing lists/phd-students: IMAP -> Maildir
54 Syncing lists/seminars: IMAP -> Maildir
55 Syncing lists/sicsa: IMAP -> Maildir
56 Syncing lists/students: IMAP -> Maildir
57 Account sync UoE:
58 Calling hook: notmuch new
59 Hook stdout: No new mail.
60
61 Hook stderr:
62
63 Hook return code: 0
64 Next refresh in 60 seconds
65 Account sync GMail:
66 Next refresh in 40 seconds
67 Account sync UoE:
68 Next refresh in 50 seconds
69 Account sync GMail:
70 Next refresh in 30 seconds
71 Account sync UoE:
72 Next refresh in 40 seconds
73 Account sync GMail:
74 Next refresh in 20 seconds
75 Account sync UoE:
76 Next refresh in 30 seconds
77 Account sync GMail:
78 Next refresh in 10 seconds
79 Account sync UoE:
80 Next refresh in 20 seconds
81 Account sync GMail:
82 ***** Finished processing account GMail
83 Copying folder structure from IMAP to Maildir
84 Folder sync [GMail]:
85 Syncing Drafts: IMAP -> Maildir
86 Syncing INBOX: IMAP -> Maildir
87 Syncing Trash: IMAP -> Maildir
88 Syncing Sent: IMAP -> Maildir
89 Account sync GMail:
90 Calling hook: notmuch new
91 Hook stdout: No new mail.
92
93 Hook stderr:
94
95 Hook return code: 0
96 Next refresh in 60 seconds
97 Account sync UoE:
98 Next refresh in 10 seconds
99 Account sync GMail:
100 Next refresh in 50 seconds
101 Account sync UoE:
102 ***** Finished processing account UoE
103 Copying folder structure from IMAP to Maildir
104 Account sync GMail:
105 Next refresh in 40 seconds
106 Next refresh in 30 seconds
107 Next refresh in 20 seconds
108 Next refresh in 10 seconds
109 ***** Finished processing account GMail
110 Copying folder structure from IMAP to Maildir
111 Folder sync [GMail]:
112 Syncing Drafts: IMAP -> Maildir
113 Syncing INBOX: IMAP -> Maildir
114 Syncing Trash: IMAP -> Maildir
115 Syncing Sent: IMAP -> Maildir
116 Account sync GMail:
117 Calling hook: notmuch new
118 Hook stdout: No new mail.
119
120 Hook stderr:
121
122 Hook return code: 0
123 Next refresh in 60 seconds
124 Next refresh in 50 seconds
125 Next refresh in 40 seconds
126 Next refresh in 30 seconds
127 Next refresh in 20 seconds
128 Next refresh in 10 seconds
129 ***** Finished processing account GMail
130 Copying folder structure from IMAP to Maildir
131 Folder sync [GMail]:
132 Syncing Drafts: IMAP -> Maildir
133 Syncing INBOX: IMAP -> Maildir
134 Syncing Trash: IMAP -> Maildir
135 Syncing Sent: IMAP -> Maildir
136 Account sync GMail:
137 Calling hook: notmuch new
138 Hook stdout: No new mail.
139
140 Hook stderr:
141
142 Hook return code: 0
143 Next refresh in 60 seconds
144 Next refresh in 50 seconds
145 Next refresh in 40 seconds
146 Next refresh in 30 seconds
147 Next refresh in 20 seconds
148 Next refresh in 10 seconds
149 ***** Finished processing account GMail
150 Copying folder structure from IMAP to Maildir
151 Folder sync [GMail]:
152 Syncing Drafts: IMAP -> Maildir
153 Syncing Trash: IMAP -> Maildir
154 Syncing INBOX: IMAP -> Maildir
155 Syncing Sent: IMAP -> Maildir
156 Account sync GMail:
157 Calling hook: notmuch new
158 Hook stdout: No new mail.
159
160 Hook stderr:
161
162 Hook return code: 0
163 Next refresh in 60 seconds
164 Next refresh in 50 seconds
165 Next refresh in 40 seconds
166 Next refresh in 30 seconds
167 Next refresh in 20 seconds
168 Next refresh in 10 seconds
169 ***** Finished processing account GMail
170 Copying folder structure from IMAP to Maildir
171 Folder sync [GMail]:
172 Syncing Drafts: IMAP -> Maildir
173 Syncing INBOX: IMAP -> Maildir
174 Syncing Sent: IMAP -> Maildir
175 Syncing Trash: IMAP -> Maildir
176 Account sync GMail:
177 Calling hook: notmuch new
178 Hook stdout: No new mail.
179
180 Hook stderr:
181
182 Hook return code: 0
183 Next refresh in 60 seconds
184 Next refresh in 50 seconds
185 Next refresh in 40 seconds
186 Next refresh in 30 seconds
187 Next refresh in 20 seconds
188 Next refresh in 10 seconds
189 ***** Finished processing account GMail
190 Copying folder structure from IMAP to Maildir
191 Folder sync [GMail]:
192 Syncing Drafts: IMAP -> Maildir
193 Syncing Sent: IMAP -> Maildir
194 Syncing Trash: IMAP -> Maildir
195 Syncing INBOX: IMAP -> Maildir
196 Account sync GMail:
197 Calling hook: notmuch new
198 Hook stdout: No new mail.
199
200 Hook stderr:
201
202 Hook return code: 0
203 Next refresh in 60 seconds
204 Next refresh in 50 seconds
205 Next refresh in 40 seconds
206 Next refresh in 30 seconds
207 Next refresh in 20 seconds
208 Next refresh in 10 seconds
209 ***** Finished processing account GMail
210 Copying folder structure from IMAP to Maildir
211 Folder sync [GMail]:
212 Syncing Drafts: IMAP -> Maildir
213 Syncing INBOX: IMAP -> Maildir
214 Syncing Sent: IMAP -> Maildir
215 Syncing Trash: IMAP -> Maildir
216 Account sync GMail:
217 Calling hook: notmuch new
218 Hook stdout: No new mail.
219
220 Hook stderr:
221
222 Hook return code: 0
223 Next refresh in 60 seconds
224 Next refresh in 50 seconds
225 Next refresh in 40 seconds
226 Next refresh in 30 seconds
227 Next refresh in 20 seconds
228 Next refresh in 10 seconds
229 ***** Finished processing account GMail
230 Copying folder structure from IMAP to Maildir
231 Folder sync [GMail]:
232 Syncing Drafts: IMAP -> Maildir
233 Syncing INBOX: IMAP -> Maildir
234 Syncing Trash: IMAP -> Maildir
235 Syncing Sent: IMAP -> Maildir
236 Account sync GMail:
237 Calling hook: notmuch new
238 Hook stdout: No new mail.
239
240 Hook stderr:
241
242 Hook return code: 0
243 Next refresh in 60 seconds
244 Next refresh in 50 seconds
245 Next refresh in 40 seconds
246 Next refresh in 30 seconds
247 Next refresh in 20 seconds
248 Next refresh in 10 seconds
249 ***** Finished processing account GMail
250 Copying folder structure from IMAP to Maildir
251 Folder sync [GMail]:
252 Syncing Drafts: IMAP -> Maildir
253 Syncing INBOX: IMAP -> Maildir
254 Syncing Sent: IMAP -> Maildir
255 Syncing Trash: IMAP -> Maildir
256 Account sync GMail:
257 Calling hook: notmuch new
258 Hook stdout: No new mail.
259
260 Hook stderr:
261
262 Hook return code: 0
263 Next refresh in 60 seconds
264 Next refresh in 50 seconds
265 Next refresh in 40 seconds
266 Next refresh in 30 seconds
267 Next refresh in 20 seconds
268 Next refresh in 10 seconds
269 ***** Finished processing account GMail
270 Copying folder structure from IMAP to Maildir
271 Folder sync [GMail]:
272 Syncing INBOX: IMAP -> Maildir
273 Syncing Drafts: IMAP -> Maildir
274 Syncing Sent: IMAP -> Maildir
275 Syncing Trash: IMAP -> Maildir
276 Account sync GMail:
277 Calling hook: notmuch new
278 Hook stdout: No new mail.
279
280 Hook stderr:
281
282 Hook return code: 0
283 Next refresh in 60 seconds
284 Next refresh in 50 seconds
285 Next refresh in 40 seconds
286 Next refresh in 30 seconds
287 Next refresh in 20 seconds
288 Next refresh in 10 seconds
289 ***** Finished processing account GMail
290 Copying folder structure from IMAP to Maildir
291 WARNING: Error occured attempting to sync account GMail: Traceback (most recent call last):
292 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 207, in syncrunner
293 self.sync(siglistener)
294 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 246, in sync
295 remoterepos.syncfoldersto(localrepos, [statusrepos])
296 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 121, in syncfoldersto
297 srcfolders = src.getfolders()
298 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 249, in getfolders
299 listresult = listfunction(directory = self.imapserver.reference)[1]
300 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 761, in list
301 return self._simple_command(name, directory, pattern, **kw)
302 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1483, in _simple_command
303 return self._command_complete(self._command(name, *args), kw)
304 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1259, in _command_complete
305 typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
306 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 161, in get_response
307 raise typ(exc_fmt % str(val))
308 abort: command: LIST => socket error: <class 'socket.error'> - [Errno 110] Connection timed out
309
310 Next refresh in 60 seconds
311 Next refresh in 50 seconds
312 Next refresh in 40 seconds
313 Next refresh in 30 seconds
314 Next refresh in 20 seconds
315 Next refresh in 10 seconds
316 ***** Finished processing account GMail
317 Copying folder structure from IMAP to Maildir
318 WARNING: Error occured attempting to sync account GMail: Traceback (most recent call last):
319 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 207, in syncrunner
320 self.sync(siglistener)
321 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 246, in sync
322 remoterepos.syncfoldersto(localrepos, [statusrepos])
323 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 121, in syncfoldersto
324 srcfolders = src.getfolders()
325 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 249, in getfolders
326 listresult = listfunction(directory = self.imapserver.reference)[1]
327 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 761, in list
328 return self._simple_command(name, directory, pattern, **kw)
329 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1483, in _simple_command
330 return self._command_complete(self._command(name, *args), kw)
331 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1259, in _command_complete
332 typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
333 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 161, in get_response
334 raise typ(exc_fmt % str(val))
335 abort: command: LIST => socket error: <class 'socket.error'> - [Errno 110] Connection timed out
336
337 Next refresh in 60 seconds
338 Next refresh in 50 seconds
339 Next refresh in 40 seconds
340 Next refresh in 30 seconds
341 Next refresh in 20 seconds
342 Next refresh in 10 seconds
343 ***** Finished processing account GMail
344 Copying folder structure from IMAP to Maildir
345 WARNING: Error occured attempting to sync account GMail: Traceback (most recent call last):
346 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 207, in syncrunner
347 self.sync(siglistener)
348 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 246, in sync
349 remoterepos.syncfoldersto(localrepos, [statusrepos])
350 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 121, in syncfoldersto
351 srcfolders = src.getfolders()
352 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 249, in getfolders
353 listresult = listfunction(directory = self.imapserver.reference)[1]
354 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 761, in list
355 return self._simple_command(name, directory, pattern, **kw)
356 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1483, in _simple_command
357 return self._command_complete(self._command(name, *args), kw)
358 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1259, in _command_complete
359 typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
360 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 161, in get_response
361 raise typ(exc_fmt % str(val))
362 abort: command: LIST => socket error: <class 'socket.error'> - [Errno 110] Connection timed out
363
364 Next refresh in 60 seconds
365 Next refresh in 50 seconds
366 Next refresh in 40 seconds
367 Next refresh in 30 seconds
368 Next refresh in 20 seconds
369 Next refresh in 10 seconds
370 ***** Finished processing account GMail
371 Copying folder structure from IMAP to Maildir
372 WARNING: Error occured attempting to sync account GMail: Traceback (most recent call last):
373 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 207, in syncrunner
374 self.sync(siglistener)
375 File "/usr/local/lib/python2.7/dist-packages/offlineimap/accounts.py", line 246, in sync
376 remoterepos.syncfoldersto(localrepos, [statusrepos])
377 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/Base.py", line 121, in syncfoldersto
378 srcfolders = src.getfolders()
379 File "/usr/local/lib/python2.7/dist-packages/offlineimap/repository/IMAP.py", line 249, in getfolders
380 listresult = listfunction(directory = self.imapserver.reference)[1]
381 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 761, in list
382 return self._simple_command(name, directory, pattern, **kw)
383 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1483, in _simple_command
384 return self._command_complete(self._command(name, *args), kw)
385 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 1259, in _command_complete
386 typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
387 File "/usr/local/lib/python2.7/dist-packages/offlineimap/imaplib2.py", line 161, in get_response
388 raise typ(exc_fmt % str(val))
389 abort: command: LIST => socket error: <class 'socket.error'> - [Errno 110] Connection timed out
390
391 Next refresh in 60 seconds
392 Next refresh in 50 seconds
393 Next refresh in 40 seconds
394 Next refresh in 30 seconds
395 Next refresh in 20 seconds
396 Next refresh in 10 seconds
397 ***** Finished processing account GMail
398 Copying folder structure from IMAP to Maildir
399 Establishing connection to imap.gmail.com:993.
400 Folder sync [GMail]:
401 Syncing Drafts: IMAP -> Maildir
402 Syncing Trash: IMAP -> Maildir
403 Establishing connection to imap.gmail.com:993.
404 Syncing Sent: IMAP -> Maildir
405 Syncing INBOX: IMAP -> Maildir
406 Establishing connection to imap.gmail.com:993.
407 Account sync GMail:
408 Calling hook: notmuch new
409 Hook stdout: No new mail.
410
411 Hook stderr:
412
413 Hook return code: 0
414 Next refresh in 60 seconds
415 Next refresh in 50 seconds
416 Next refresh in 40 seconds
417 Next refresh in 30 seconds
418 Next refresh in 20 seconds
419 Next refresh in 10 seconds
420 ***** Finished processing account GMail
421 Copying folder structure from IMAP to Maildir
422 Folder sync [GMail]:
423 Syncing Drafts: IMAP -> Maildir
424 Syncing Sent: IMAP -> Maildir
425 Syncing Trash: IMAP -> Maildir
426 Syncing INBOX: IMAP -> Maildir
427 Establishing connection to imap.gmail.com:993.
428 Account sync GMail:
429 Calling hook: notmuch new
430 Hook stdout: No new mail.
431
432 Hook stderr:
433
434 Hook return code: 0
435 Next refresh in 60 seconds
436 Next refresh in 50 seconds
437 Next refresh in 40 seconds
438 Next refresh in 30 seconds
439 Next refresh in 20 seconds
440 Next refresh in 10 seconds
441 ***** Finished processing account GMail
442 Copying folder structure from IMAP to Maildir
443 Folder sync [GMail]:
444 Syncing Drafts: IMAP -> Maildir
445 Syncing Sent: IMAP -> Maildir
446 Syncing Trash: IMAP -> Maildir
447 Syncing INBOX: IMAP -> Maildir
448 Account sync GMail:
449 Calling hook: notmuch new
450 Hook stdout: No new mail.
451
452 Hook stderr:
453
454 Hook return code: 0
455 Next refresh in 60 seconds
456 Next refresh in 50 seconds
457 Next refresh in 40 seconds
458 Next refresh in 30 seconds
459 Next refresh in 20 seconds
460 Next refresh in 10 seconds
461 ***** Finished processing account GMail
462 Copying folder structure from IMAP to Maildir
463 Folder sync [GMail]:
464 Syncing Drafts: IMAP -> Maildir
465 Syncing Sent: IMAP -> Maildir
466 Syncing Trash: IMAP -> Maildir
467 Syncing INBOX: IMAP -> Maildir
468 Account sync GMail:
469 Calling hook: notmuch new
470 Hook stdout: No new mail.
471
472 Hook stderr:
473
474 Hook return code: 0
475 Next refresh in 60 seconds
476 Next refresh in 50 seconds
477 Next refresh in 40 seconds
478 Next refresh in 30 seconds
479 Next refresh in 20 seconds
480 Next refresh in 10 seconds
481 ***** Finished processing account GMail
482 Copying folder structure from IMAP to Maildir
-------------- next part --------------
[general]
accounts = GMail, UoE
maxsyncaccounts = 3
pythonfile = ~/.offlineimap.py
[Account GMail]
localrepository = gmaildir
remoterepository = gmailimap
autorefresh = 1
postsynchook = notmuch new
[Repository gmaildir]
type = Maildir
localfolders = /home/pazz/mail/gmail/
[Repository gmailimap]
type = IMAP
remotehost = imap.gmail.com
remoteuser = patricktotzke Öt gmail.com
remotepasseval = getpwd("Gmail")
nametrans = lambda foldername: re.sub ('^\[Google\ Mail\]', 'bak',
re.sub ('sent_mail', 'sent',
re.sub ('starred', 'flagged',
re.sub (' ', '_', foldername))))
folderfilter = lambda foldername: not re.match('^\[Google\ Mail\]\/.*',foldername)
ssl = yes
maxconnections = 6
holdconnectionopen = yes
[Account UoE]
localrepository = uoedir
remoterepository = uoeimap
autorefresh = 1
postsynchook = notmuch new
[Repository uoedir]
type = Maildir
localfolders = /home/pazz/mail/uoe/
[Repository uoeimap]
type = IMAP
remotehost = imap.sms.ed.ac.uk
remoteuser = s0976898
remotepasseval = getpwd("UoE")
ssl = yes
maxconnections = 6
holdconnectionopen = yes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .offlineimap.py
Type: text/x-python
Size: 277 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110427/bcd2ccb2/attachment-0002.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110427/bcd2ccb2/attachment.sig>
More information about the OfflineIMAP-project
mailing list