Discussion:
Bug#268932: offlineimap: another crash during "re-syncing" my folders
(too old to reply)
Erich Schubert
2004-08-29 23:40:14 UTC
Permalink
Package: offlineimap
Version: 4.0.7
Followup-For: Bug #268932

Hi,
since the UIDs apparently have changed for some folders on the server,
i've followed the procedure from manual.txt.gz to re-get my folders.
During this sync process, the following error occurred:

Thread 'Folder sync Mucl[dsa]' terminated with exception:
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/offlineimap/threadutil.py", line 153, in run
Thread.run(self)
File "/usr/lib/python2.3/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.3/site-packages/offlineimap/accounts.py", line 227, in syncfolder
remotefolder.syncmessagesto(localfolder, [localfolder, statusfolder])
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 388, in syncmessagesto
self.syncmessagesto_flags(dest, applyto)
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 368, in syncmessagesto_flags
object.deletemessagesflags(delflaglist[flag], [flag])
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 189, in deletemessagesflags
self.deletemessageflags(uid, flags)
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line 180, in deletemessageflags
newflags = self.getmessageflags(uid)
File "/usr/lib/python2.3/site-packages/offlineimap/folder/LocalStatus.py", line 115, in getmessageflags
return self.messagelist[uid]['flags']
KeyError: 10665L


Last 50 debug messages logged for Folder sync Mucl[dsa] prior to exception:
imap: options2hash called with input: ['FLAGS', '(\\Seen)', 'UID', '10659']
imap: options2hash returning: {'FLAGS': '(\\Seen)', 'UID': '10659'}
imap: imapsplit() called with input: FLAGS (\Seen) UID 10660
imap: imapsplit() returning: ['FLAGS', '(\\Seen)', 'UID', '10660']
[...]

-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1+sws+acpi
Locale: LANG=de_DE.UTF-***@euro, LC_CTYPE=de_DE.UTF-***@euro

Versions of packages offlineimap depends on:
ii python2.3 2.3.4-11sid An interactive high-level object-o

-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
John Goerzen
2004-08-30 18:10:12 UTC
Permalink
tags 268932 moreinfo
thanks

Can you be more specific about what commands you had issued, and include
the a -d imap,maildir -1 log here?
Post by Erich Schubert
Package: offlineimap
Version: 4.0.7
Followup-For: Bug #268932
Hi,
since the UIDs apparently have changed for some folders on the
server, i've followed the procedure from manual.txt.gz to re-get my
File "/usr/lib/python2.3/site-packages/offlineimap/threadutil.py",
line 153, in run Thread.run(self)
File "/usr/lib/python2.3/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.3/site-packages/offlineimap/accounts.py",
line 227, in syncfolder remotefolder.syncmessagesto(localfolder,
[localfolder, statusfolder]) File
"/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py", line
388, in syncmessagesto self.syncmessagesto_flags(dest, applyto)
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py",
line 368, in syncmessagesto_flags
object.deletemessagesflags(delflaglist[flag], [flag])
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py",
line 189, in deletemessagesflags self.deletemessageflags(uid, flags)
File "/usr/lib/python2.3/site-packages/offlineimap/folder/Base.py",
line 180, in deletemessageflags newflags = self.getmessageflags(uid)
File
"/usr/lib/python2.3/site-packages/offlineimap/folder/LocalStatus.py",
line 115, in getmessageflags return self.messagelist[uid]['flags']
KeyError: 10665L
Last 50 debug messages logged for Folder sync Mucl[dsa] prior to
exception: imap: options2hash called with input: ['FLAGS',
FLAGS (\Seen) UID 10660 imap: imapsplit() returning: ['FLAGS',
'(\\Seen)', 'UID', '10660'] [...]
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1+sws+acpi
ii python2.3 2.3.4-11sid An interactive
high-level object-o
-- no debconf information
--
John Goerzen
Author, Foundations of Python Network Programming
http://www.complete.org/pynet
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Erich Schubert
2004-08-30 18:40:15 UTC
Permalink
Hi,
Post by John Goerzen
Can you be more specific about what commands you had issued, and include
the a -d imap,maildir -1 log here?
The command i had issued was just "offlineimap", maybe with the
Noninteractive.Basic UI, but i never use additional options.

Like with most offlineimap problems i've seen they are not reproducible.
It runs just fine now.

To the other mail:
offlineimap creates empty mails (probably just containing a number as
i've seen/reported before). That probably is not a direct consequence of
the mail server having no more disk space, but of some broken error
handling in offlineimap.
(the mails were left intact on the server, and i don't think there is
write access necessary for downloading them)

Greetings,
Erich Schubert
--
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
There are only 10 types of people in the world: //\
Those who understand binary and those who don't V_/_
Ohne Tränen hat die Seele keinen Regenbogen.
John Goerzen
2004-08-30 19:40:12 UTC
Permalink
Post by Erich Schubert
Hi,
Post by John Goerzen
Can you be more specific about what commands you had issued, and
include the a -d imap,maildir -1 log here?
The command i had issued was just "offlineimap", maybe with the
Noninteractive.Basic UI, but i never use additional options.
I was trying to get at the commands you used to resolve the uid validity
problem.
Post by Erich Schubert
Like with most offlineimap problems i've seen they are not
reproducible. It runs just fine now.
Sigh.
Post by Erich Schubert
offlineimap creates empty mails (probably just containing a number as
i've seen/reported before). That probably is not a direct consequence
of the mail server having no more disk space, but of some broken
error handling in offlineimap.
So you can reproduce this behavior at will?

I doubt this is broken error handling; OfflineIMAP should have crashed
if it failed to handle an error somewhere.
Post by Erich Schubert
(the mails were left intact on the server, and i don't think there is
write access necessary for downloading them)
Greetings,
Erich Schubert
--
John Goerzen
Author, Foundations of Python Network Programming
http://www.complete.org/pynet
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Erich Schubert
2004-08-30 20:00:13 UTC
Permalink
Hi,
Post by John Goerzen
I was trying to get at the commands you used to resolve the uid validity
problem.
rm -r ~/.mail/INBOX ~/.offlineimap/Account-NAME
~/.offlineimap/Repository-NAME
Post by John Goerzen
Sigh.
well, it transfers mails just once. I can't restore the previous state
that led to the error.
Post by John Goerzen
So you can reproduce this behavior at will?
No, but it occurred to me like 10 times this year.
Post by John Goerzen
I doubt this is broken error handling; OfflineIMAP should have crashed
if it failed to handle an error somewhere.
As i've written in an earlier bug reports it looks to me like some
function returns an integer instead of returning the mail contents.
Then this integer is written to the file instead of the real email
contents. The integer is not the UID but in all cases i have seen it was
a single digit integer.

Greetings,
Erich Schubert
--
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
The best things in life are free: Friendship and Love. //\
Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln. V_/_
Gerrit Pape
2004-08-31 08:10:10 UTC
Permalink
Post by Erich Schubert
As i've written in an earlier bug reports it looks to me like some
function returns an integer instead of returning the mail contents.
Then this integer is written to the file instead of the real email
contents. The integer is not the UID but in all cases i have seen it was
a single digit integer.
Hi, I can confirm this exact behavior on MacOSX Jaguar, and Debian
unstable with offlineimap, I think version 4.0.3. Gerrit.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
John Goerzen
2004-08-31 13:30:20 UTC
Permalink
Post by Gerrit Pape
Post by Erich Schubert
As i've written in an earlier bug reports it looks to me like some
function returns an integer instead of returning the mail contents.
Then this integer is written to the file instead of the real email
contents. The integer is not the UID but in all cases i have seen
it was a single digit integer.
Hi, I can confirm this exact behavior on MacOSX Jaguar, and Debian
unstable with offlineimap, I think version 4.0.3. Gerrit.
Are you able to obtain a debug log for the behavior?
--
John Goerzen
Author, Foundations of Python Network Programming
http://www.complete.org/pynet
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Gerrit Pape
2004-08-31 14:10:15 UTC
Permalink
Post by John Goerzen
Post by Gerrit Pape
Post by Erich Schubert
As i've written in an earlier bug reports it looks to me like some
function returns an integer instead of returning the mail contents.
Then this integer is written to the file instead of the real email
contents. The integer is not the UID but in all cases i have seen
it was a single digit integer.
Hi, I can confirm this exact behavior on MacOSX Jaguar, and Debian
unstable with offlineimap, I think version 4.0.3. Gerrit.
Are you able to obtain a debug log for the behavior?
I'll try my best, but, just as Erich, I cannot reliably reproduce it, it
happens casually (I currently have about 15 single-digit-mails in my
folders).

Regards, Gerrit.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Gerrit Pape
2004-09-15 15:30:15 UTC
Permalink
Post by Gerrit Pape
Post by John Goerzen
Post by Gerrit Pape
Hi, I can confirm this exact behavior on MacOSX Jaguar, and Debian
unstable with offlineimap, I think version 4.0.3. Gerrit.
Are you able to obtain a debug log for the behavior?
I'll try my best, but, just as Erich, I cannot reliably reproduce it, it
happens casually (I currently have about 15 single-digit-mails in my
folders).
Got it. It happened on a current Debian sarge system with offlineimap
4.0.7. The file
1095259196_0.10359.wilp,U=108118,FMD5=2446dd82f699e15ea9417f9e01ac6221:2,
was written to my debian-bugs maildir while syncing, with the single
digit ``5'' as content.

Look for the line
2004-09-15_14:39:56.82700 Copy message 108118 from debian-bugs: DEBUG[maildir]: savemessage: called to write with flags [] and content '5'
in the log file snippet temporarily available here:
http://people.debian.org/~pape/thu0Xie/@400000004148544b0b57adcc.s

Regards, Gerrit.
--
Open projects at http://smarden.org/pape/.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Continue reading on narkive:
Loading...