SIGHUP / SIGUSR2 not equivalent to restart

Dave Abrahams dave at boostpro.com
Thu Sep 29 20:14:11 BST 2011


I just got back after being offline for a few hours.
I have something that pokes offlineimap with a SIGUSR2 when I
establish a network connection.  You can see it taking effect in the log
below (There are actually two of those; the first comes in when the
display wakes up at 1:57:05.  

However, I didn't receive any new mails until I did a SIGUSR1 and
relaunch, which you can also see at 3:00:21 where the pid changes.

It's my understanding that these ought to be equivalent operations for
most intents and purposes, and yet I've repeatedly seen situations where
I had to restart the process in order to get anywhere.

--8<---------------cut here---------------start------------->8---
12:58:13 pid 38102	Licensed under the GNU GPL v2+ (v2 or any later version).
12:58:13 pid 38102	***** Processing account BoostPro
12:58:13 pid 38102	***** Processing account Spam
12:58:13 pid 38102	***** Processing account ArchiveSync
12:58:13 pid 38102	***** Processing account PersonalGMail
12:58:13 pid 38102	Calling hook: echo offlineimap presync
12:58:13 pid 38102	Establishing connection to imap.gmail.com:993.
12:58:13 pid 38102	Copying folder structure from Gmail to Maildir
12:58:13 pid 38102	Establishing connection to imap.gmail.com:993.
12:58:13 pid 38102	 Copying folder structure from Gmail to Maildir
12:58:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemoteSpam'. Make sure you have configured the server name correctly and that you are online.
12:58:13 pid 38102	Establishing connection to imap.gmail.com:993.
12:58:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
12:58:13 pid 38102	Hook stdout: offlineimap presync
12:58:13 pid 38102	Hook stderr:
12:58:13 pid 38102	Sleeping for 43:00
12:58:13 pid 38102	Sleeping for 13:00
12:58:13 pid 38102	Hook return code: 0
12:58:13 pid 38102	Copying folder structure from Gmail to Maildir
12:58:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'PersonalGMailRemote'. Make sure you have configured the server name correctly and that you are online.
12:58:13 pid 38102	Establishing connection to imap.gmail.com:993.
12:58:13 pid 38102	Sleeping for 37:00
12:58:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
12:58:13 pid 38102	Sleeping for 17:00
1:11:13 pid 38102	***** Finished processing account ArchiveSync
1:11:13 pid 38102	Copying folder structure from Gmail to Maildir
1:11:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:11:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
1:11:13 pid 38102	Sleeping for 13:00
1:15:13 pid 38102	***** Finished processing account BoostPro
1:15:13 pid 38102	Calling hook: echo offlineimap presync
1:15:13 pid 38102	Hook stdout: offlineimap presync
1:15:13 pid 38102	Hook stderr:
1:15:13 pid 38102	Hook return code: 0
1:15:13 pid 38102	Copying folder structure from Gmail to Maildir
1:15:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:15:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
1:15:13 pid 38102	Sleeping for 17:00
1:57:05 PM	mac.sleepwatcher[6534]	Signaling offlineimap (38102)...
1:57:05 PM	mac.sleepwatcher[6534]	sleepwatcher: displaywakeup: /Users/dave/bin/sigusr2-offlineimap: 0
1:57:13 pid 38102	***** Finished processing account PersonalGMail
1:57:13 pid 38102	***** Finished processing account Spam
1:57:13 pid 38102	 ***** Finished processing account ArchiveSync
1:57:13 pid 38102	***** Finished processing account BoostPro
1:57:13 pid 38102	Copying folder structure from Gmail to Maildir
1:57:13 pid 38102	Calling hook: echo offlineimap presync
1:57:13 pid 38102	Copying folder structure from Gmail to Maildir
1:57:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:57:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:57:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:57:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'PersonalGMailRemote'. Make sure you have configured the server name correctly and that you are online.
1:57:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
1:57:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemoteSpam'. Make sure you have configured the server name correctly and that you are online.
1:57:13 pid 38102	 
1:57:13 pid 38102	Sleeping for 37:00
1:57:13 pid 38102	***** Finished processing account ArchiveSync
1:57:13 pid 38102	 Sleeping for 43:00
1:57:13 pid 38102	Hook stdout: offlineimap presync
1:57:13 pid 38102	Hook stderr:
1:57:13 pid 38102	Hook return code: 0
1:57:13 pid 38102	Copying folder structure from Gmail to Maildir
1:57:13 pid 38102	Establishing connection to imap.gmail.com:993.
1:57:13 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
1:57:13 pid 38102	***** Finished processing account BoostPro
2:54:49 PM	mac.sleepwatcher[6534]	Signaling offlineimap (38102)...
2:54:49 PM	mac.sleepwatcher[6534]	sleepwatcher: displaywakeup: /Users/dave/bin/sigusr2-offlineimap: 0
2:54:53 PM	org.crankd.plist[38316]	+ /Users/dave/bin/sigusr2-offlineimap
2:54:53 PM	org.crankd.plist[38316]	Signaling offlineimap (38102)...
2:54:57 pid 38102	***** Finished processing account PersonalGMail
2:54:57 pid 38102	***** Finished processing account Spam
2:54:57 pid 38102	Copying folder structure from Gmail to Maildir
2:54:57 pid 38102	Establishing connection to imap.gmail.com:993.
2:54:57 pid 38102	Establishing connection to imap.gmail.com:993.
2:54:58 pid 38102	Syncing [Gmail]/Spam: Gmail -> Maildir
2:54:58 pid 38102	Syncing INBOX: Gmail -> Maildir
2:55:00 pid 38102	Sleeping for 37:00
2:55:01 PM	org.crankd.plist[38316]	+ /Users/dave/bin/sigusr2-offlineimap
2:55:01 PM	org.crankd.plist[38316]	Signaling offlineimap (38102)...
2:55:02 pid 38102	Sleeping for 43:00
2:55:02 pid 38102	***** Finished processing account Spam
2:55:02 pid 38102	Establishing connection to imap.gmail.com:993.
2:55:02 pid 38102	Syncing [Gmail]/Spam: Gmail -> Maildir
2:55:03 pid 38102	Sleeping for 43:00
2:55:10 pid 38102	***** Finished processing account PersonalGMail
2:55:10 pid 38102	Copying folder structure from Gmail to Maildir
2:55:10 pid 38102	Syncing INBOX: Gmail -> Maildir
2:55:11 pid 38102	Sleeping for 37:00
3:00:13 pid 38102	***** Finished processing account Spam
3:00:17 pid 38102	Syncing INBOX: Gmail -> Maildir
3:00:21 pid 38102	***** Finished processing account PersonalGMail
3:00:21 pid 38102	ERROR: Exceptions occurred during the run!
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemoteSpam'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'PersonalGMailRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'PersonalGMailRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'ArchiveRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemoteSpam'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38102	ERROR: Could not resolve name 'imap.gmail.com' for repository 'BoostProRemote'. Make sure you have configured the server name correctly and that you are online.
3:00:21 pid 38659	OfflineIMAP 6.3.5-rc3
3:00:21 pid 38659	Copyright 2002-2011 John Goerzen & contributors.
3:00:21 pid 38659	Licensed under the GNU GPL v2+ (v2 or any later version).
3:00:21 pid 38659	***** Processing account BoostPro
3:00:21 pid 38659	***** Processing account Spam
3:00:21 pid 38659	***** Processing account ArchiveSync
3:00:21 pid 38659	***** Processing account PersonalGMail
3:00:21 pid 38659	Calling hook: echo offlineimap presync
3:00:21 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:21 pid 38659	Copying folder structure from Gmail to Maildir
3:00:21 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:21 pid 38659	Copying folder structure from Gmail to Maildir
3:00:21 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:21 pid 38659	Hook stdout: offlineimap presync
3:00:21 pid 38659	Hook stderr:
3:00:21 pid 38659	Hook return code: 0
3:00:21 pid 38659	Copying folder structure from Gmail to Maildir
3:00:21 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:22 pid 38659	Syncing [Gmail]/Spam: Gmail -> Maildir
3:00:22 pid 38659	Syncing INBOX: Gmail -> Maildir
3:00:23 pid 38659	Syncing INBOX: Gmail -> Maildir
3:00:23 pid 38659	Syncing [Gmail]/All Mail: Gmail -> Maildir
3:00:24 pid 38659	Sleeping for 37:00
3:00:25 pid 38659	Sleeping for 43:00
3:00:30 pid 38659	Copy message 42754 Gmail[INBOX] -> Maildir[]
3:00:30 pid 38659	Copy message 42755 Gmail[INBOX] -> Maildir[]
3:00:37 pid 38659	Copy message 42756 Gmail[INBOX] -> Maildir[]
3:00:37 pid 38659	Copy message 42757 Gmail[INBOX] -> Maildir[]
3:00:43 pid 38659	Copy message 42758 Gmail[INBOX] -> Maildir[]
3:00:43 pid 38659	Copy message 42759 Gmail[INBOX] -> Maildir[]
3:00:43 pid 38659	Copy message 42760 Gmail[INBOX] -> Maildir[]
3:00:43 pid 38659	Copy message 42761 Gmail[INBOX] -> Maildir[]
3:00:43 pid 38659	Copy message 42762 Gmail[INBOX] -> Maildir[]
3:00:44 pid 38659	Copy message 42763 Gmail[INBOX] -> Maildir[]
3:00:44 pid 38659	Copy message 42764 Gmail[INBOX] -> Maildir[]
3:00:44 pid 38659	Deleting 8 messages (42745:42752) in Maildir[]
3:00:44 pid 38659	Adding flag S to 1 messages on 
3:00:44 pid 38659	Copy message -1 Maildir[] -> Gmail[INBOX]
3:00:44 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:45 pid 38659	ERROR: command: APPEND => socket error: <class 'socket.error'> - [Errno 54] Connection reset by peer
3:00:46 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:46 pid 38659	ERROR: Saving msg in folder 'INBOX', repository 'BoostProRemote' failed. Server reponded: command: APPEND => socket error: <class 'socket.error'> - [Errno 54] Connection reset by peer
3:00:46 pid 38659	Message content was: Delivered-To: dave at boostpro.com
3:00:46 pid 38659	Received: by 10.52.162.166 with SMTP id yb6cs51861vdb;
3:00:46 pid 38659	        Fri, 19 Aug 2011 08:57:21 -0700 (PDT)
3:00:46 pid 38659	Received: by 1...ailed; fix conflicts and then commit the result.
3:00:46 pid 38659	Copy message -2 Maildir[] -> Gmail[INBOX]
3:00:47 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:47 pid 38659	ERROR: command: APPEND => socket error: <type 'exceptions.IOError'> - Too many read 0
3:00:48 pid 38659	Establishing connection to imap.gmail.com:993.
3:00:49 pid 38659	ERROR: Saving msg in folder 'INBOX', repository 'BoostProRemote' failed. Server reponded: command: APPEND => socket error: <type 'exceptions.IOError'> - Too many read 0
3:00:49 pid 38659	Message content was: Delivered-To: dave at boostpro.com
3:00:49 pid 38659	Received: by 10.52.168.97 with SMTP id zv1cs24464vdb;
3:00:49 pid 38659	        Wed, 31 Aug 2011 13:22:48 -0700 (PDT)
3:00:49 pid 38659	Received: by 10....com
3:00:49 pid 38659	------------=_1314822362-17042-3--
3:00:49 pid 38659	Adding flag S to 2 messages on INBOX
3:00:49 pid 38659	Calling hook: /Users/dave/bin/imap-postsync localhost dave --soft-errors
3:01:05 pid 38659	Copy message 264752 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]Copy message 264753 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:06 pid 38659	Copy message 264756 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:06 pid 38659	Copy message 264757 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:06 pid 38659	Copy message 264762 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264764 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264765 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264766 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264769 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264772 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264773 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:09 pid 38659	Copy message 264775 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264776 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264777 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264778 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264785 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264788 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264789 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264790 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264796 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264797 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264801 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264804 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:10 pid 38659	Copy message 264805 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:11 pid 38659	Copy message 264807 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:11 pid 38659	Copy message 264808 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:11 pid 38659	Copy message 264809 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:11 pid 38659	Copy message 264810 Gmail[[Gmail]/All Mail] -> Maildir[.[Gmail].All Mail]
3:01:12 pid 38659	Adding flag S to 2 messages on .[Gmail].All Mail
3:01:12 pid 38659	Sleeping for 13:00
--8<---------------cut here---------------end--------------->8---

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com






More information about the OfflineIMAP-project mailing list