Cannot interrupt offlineimap 6.3.4 from keyboard
Tony E. Bennett
tony.e.bennett at gmail.com
Tue Aug 30 15:44:27 BST 2011
Sebastian Spaeth <Sebastian at SSpaeth.de> writes:
> On Mon, 29 Aug 2011 14:38:37 -0400, Tony E. Bennett <tony.e.bennett at gmail.com> wrote:
>>
>> I'm in the process of upgrading from v6.0.3. The new version
>> ignores ^C. In fact, it can only be killed with 'kill -9 PID'.
>>
>> Platform is OSX. I've tried both python 2.6.1 and python 2.6.6.
>> Have also tried with and without explicit 'socktimeout = 60'.
>> No difference.
>>
>> Is this a known issue? Something to do w/ 'ui' perhaps?
>
> I do CTRL-C all the time and it works fine here. One area where things
> can hang is while attempting to read from the IMAP server, as the
> underlying imaplib2 doesn't seem to handle or honor CTRL-C. The ui could
> have something to do with it, as I usually don't test blinkenlights
> extensively. I am happy with TTYUI.
I've now confirmed it also fails for me when using ttyui.
> It can only be killed with -9 implies it never exits for you and hangs
> somewhere? Or does "only" ctrl-c not work?
'kill PID' also fails to kill the process. Ditto 'kill -2 PID', etc,
so it is not a termio problem - the signals are being ignored.
I've tried it a bit more and it sort-of "worked" 1 time: I hit ^c
after about 20 emails were sync'ed (out of total of 50) from gmail to
a local dovecot server. offlineimap continued to sync the next 30
emails and *then* cleaned up and terminated correctly:
...
Copy message 45066 from INBOX:
Copy message 45066 Gmail[INBOX] -> MappedIMAP[INBOX]
^C
Copy message 44961 from INBOX:
Copy message 44961 Gmail[INBOX] -> MappedIMAP[INBOX]
Copy message 37644 from INBOX:
Copy message 37644 Gmail[INBOX] -> MappedIMAP[INBOX]
Copy message 44279 from INBOX:
Copy message 44279 Gmail[INBOX] -> MappedIMAP[INBOX]
...
Copy message 45055 from INBOX:
Copy message 45055 Gmail[INBOX] -> MappedIMAP[INBOX]
Folder sync [Gmail-tbennett]:
Deleting 1 messages (45060) in MappedIMAP[INBOX]
Account sync Gmail-tbennett:
***** Finished processing account Gmail-tbennett
Interestingly, there were other folders to sync after INBOX
but offlineimap terminated cleanly without progressing to
the next folder.
So it appears signals are held-off at a *folder* level.
(I did not noticed this before as the folder I was sync'ing
yesterday was very large and I resorted to 'kill -9' after
30sec or so)
Also, in this case where it terminated after end of the folder
this message from init.py was at the *end* of the log file:
except KeyboardInterrupt:
ui.terminate(1, errormsg = 'CTRL-C pressed, aborting...')
return
Maybe an OSX specific problem?
> Debugging this is a bit tough without further information as it plainly
> works here.
Any suggestions for further analysis?
thanks
--tony
>
> Sebastian
> _______________________________________________
> OfflineIMAP-project mailing list
> OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
> OfflineIMAP homepage: http://software.complete.org/offlineimap
More information about the OfflineIMAP-project
mailing list