Debian Bug report logs - #396443
Assertion error on message causes offlineimap to fail

version graph

Package: offlineimap; Maintainer for offlineimap is Ilias Tsitsimpis <iliastsi@debian.org>; Source for offlineimap is src:offlineimap (PTS, buildd, popcon).

Reported by: Micah Anderson <micah@debian.org>

Date: Tue, 31 Oct 2006 21:24:08 UTC

Severity: important

Tags: patch

Found in version offlineimap/4.0.14

Fixed in version offlineimap/5.99.2

Done: John Goerzen <jgoerzen@complete.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, John Goerzen <jgoerzen@complete.org>:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to Micah Anderson <micah@debian.org>:
New Bug report received and forwarded. Copy sent to John Goerzen <jgoerzen@complete.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Micah Anderson <micah@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Assertion error on message causes offlineimap to fail
Date: Tue, 31 Oct 2006 11:49:10 -0700
[Message part 1 (text/plain, inline)]
Package: offlineimap
Version: 4.0.14
Severity: important

Two times today I have found my offlineimap to have died with this same
situation. It appears as if certain types of messages (both spam in my
situation), cause offlineimap to choke. When it does it cannot proceed.
This means that when I run offlineimap, it pulls in messages from some
folders, then it hits the folder with the bad message and dies, leaving
undownloaded mail on the server. The only fix to this problem is to find
the problem message on the server and remove it by hand. This isn't such
a huge deal for me, since I run the server, but other people have to
come to me to ask me to delete these messages, and until I do they
cannot download their email.

I have captured the output by running script during one of these
incidents, this has been attached. Additionally, I have also attach the 
problematic message.

Thanks!
Micah

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-vserver-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages offlineimap depends on:
ii  python                        2.4.3-11   An interactive high-level object-o
ii  python-support                0.5.4      automated rebuilding support for p

offlineimap recommends no packages.

-- no debconf information
[typescript (text/plain, attachment)]
[badmsg (message/rfc822\0117bit, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to John Goerzen <jgoerzen@complete.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #10 received at 396443@bugs.debian.org (full text, mbox, reply):

From: John Goerzen <jgoerzen@complete.org>
To: Micah Anderson <micah@debian.org>, 396443@bugs.debian.org
Subject: Re: Bug#396443: Assertion error on message causes offlineimap to fail
Date: Tue, 31 Oct 2006 17:06:23 -0600
On Tue, Oct 31, 2006 at 11:49:10AM -0700, Micah Anderson wrote:
> Two times today I have found my offlineimap to have died with this same
> situation. It appears as if certain types of messages (both spam in my
> situation), cause offlineimap to choke. When it does it cannot
> proceed.

Hi Micah,

This looks like a server-side issue.  Could you run offlineimap -d
imap -1 and send me the last few lines of IMAP protocol trace please?

-- John



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to John Goerzen <jgoerzen@complete.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #15 received at 396443@bugs.debian.org (full text, mbox, reply):

From: John Goerzen <jgoerzen@complete.org>
To: Micah Anderson <micah@riseup.net>
Cc: 396443@bugs.debian.org
Subject: Re: Bug#396443: Assertion error on message causes offlineimap to fail
Date: Tue, 31 Oct 2006 18:56:28 -0600
I think the problem is that the message has an invalid date.

It seems that some spammer is creating those lately.  I've seen a rash
of these reports.

I will merge this with the others and will try to develop a fix ASAP.
Unfortunately things are quite busy just now, but hopefully it won't be
more than a few days.


-- John



Information forwarded to debian-bugs-dist@lists.debian.org, John Goerzen <jgoerzen@complete.org>:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to Jon Dowland <bugs@alcopop.org>:
Extra info received and forwarded to list. Copy sent to John Goerzen <jgoerzen@complete.org>. (full text, mbox, link).


Message #20 received at 396443@bugs.debian.org (full text, mbox, reply):

From: Jon Dowland <bugs@alcopop.org>
To: 396443@bugs.debian.org
Subject: AssertionError error reproduced
Date: Thu, 9 Nov 2006 14:22:49 +0000
Hi,

I can reproduce this AssertionError, again with spam:

Thread 'New msg sync from alcopop/spam' terminated with exception:^M$
Traceback (most recent call last):^M$
  File "/var/lib/python-support/python2.4/offlineimap/threadutil.py", line 153,
    Thread.run(self)^M$
  File "threading.py", line 422, in run^M$
    self.__target(*self.__args, **self.__kwargs)^M$
  File "/var/lib/python-support/python2.4/offlineimap/folder/Base.py", line 207,    successuid = tryappend.savemessage(uid, message, flags)^M$
  File "/var/lib/python-support/python2.4/offlineimap/folder/IMAP.py", line 228,    date, content)[0] == 'OK')^M$
AssertionError^M$

I've caught all the output of 'offlineimap -u Noninteractive.Basic -d
imap -1', the result is 393K gzipped.

Please let me know if this (or an excerpt) would be useful to you.


-- 
Jon Dowland



Information forwarded to debian-bugs-dist@lists.debian.org, John Goerzen <jgoerzen@complete.org>:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to Mike Gerber <mike@sprachgewalt.de>:
Extra info received and forwarded to list. Copy sent to John Goerzen <jgoerzen@complete.org>. (full text, mbox, link).


Message #25 received at 396443@bugs.debian.org (full text, mbox, reply):

From: Mike Gerber <mike@sprachgewalt.de>
To: 396443@bugs.debian.org
Subject: Sample message to trigger bug
Date: Wed, 31 Jan 2007 06:28:12 +0100
[Message part 1 (text/plain, inline)]
The attached message triggers the bug for me.

Cheers,
Mike
[sample.msg (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, John Goerzen <jgoerzen@complete.org>:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to Mike Gerber <mike@sprachgewalt.de>:
Extra info received and forwarded to list. Copy sent to John Goerzen <jgoerzen@complete.org>. (full text, mbox, link).


Message #30 received at 396443@bugs.debian.org (full text, mbox, reply):

From: Mike Gerber <mike@sprachgewalt.de>
To: 396443@bugs.debian.org, control@bugs.debian.org
Subject: Suggested patch
Date: Wed, 31 Jan 2007 06:57:15 +0100
[Message part 1 (text/plain, inline)]
tags 396443 patch
thanks

This is against: 

ii  offlineimap    4.0.14         IMAP/Maildir synchronization and reader supp

The patch seems to work for me, might need some Python wizard and better 
testing, though.

--- IMAP.py.orig        2007-01-31 06:51:04.000000000 +0100
+++ IMAP.py     2007-01-31 06:51:30.000000000 +0100
@@ -201,6 +201,12 @@
             try:
                 if datetuple[0] < 1981:
                     raise ValueError
+
+                # Check for invalid date
+                datetuple_check = time.localtime(time.mktime(datetuple))
+                if datetuple[:2] != datetuple_check[:2]:
+                    raise ValueError
+
                 # This could raise a value error if it's not a valid
                 # format.
                 date = imaplib.Time2Internaldate(datetuple) 
             except (ValueError, OverflowError):

[signature.asc (application/pgp-signature, inline)]

Tags added: patch Request was from Mike Gerber <mike@sprachgewalt.de> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, John Goerzen <jgoerzen@complete.org>:
Bug#396443; Package offlineimap. (full text, mbox, link).


Acknowledgement sent to jgoerzen@complete.org:
Extra info received and forwarded to list. Copy sent to John Goerzen <jgoerzen@complete.org>. (full text, mbox, link).


Message #37 received at 396443@bugs.debian.org (full text, mbox, reply):

From: jgoerzen@complete.org
To: <396443@bugs.debian.org>
Cc: <control@bugs.debian.org>
Subject: New commit
Date: Tue, 31 Jul 2007 15:29:28 -0500
tags 396443 pending
thanks

A commit relevant to this bug has occurred.

  Revision: 580

Tue Jul 31 15:25:05 CDT 2007  John Goerzen <jgoerzen@complete.org>
  * Additional date validity check
  patch from Mike Gerber
  
  Two times today I have found my offlineimap to have died with this same
  situation. It appears as if certain types of messages (both spam in my
  situation), cause offlineimap to choke. When it does it cannot proceed.
  This means that when I run offlineimap, it pulls in messages from some
  folders, then it hits the folder with the bad message and dies, leaving
  undownloaded mail on the server. The only fix to this problem is to find
  the problem message on the server and remove it by hand. This isn't such
  a huge deal for me, since I run the server, but other people have to
  come to me to ask me to delete these messages, and until I do they
  cannot download their email.
  
  I have captured the output by running script during one of these
  incidents, this has been attached. Additionally, I have also attach the 
  problematic message.
  
  The patch seems to work for me, might need some Python wizard and better 
  testing, though.
  
  fixes deb#396443

More details are available at:
    http://software.complete.org/offlineimap/changeset/580



Tags added: pending Request was from jgoerzen@complete.org to control@bugs.debian.org. (Tue, 31 Jul 2007 20:30:05 GMT) (full text, mbox, link).


Reply sent to John Goerzen <jgoerzen@complete.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Micah Anderson <micah@debian.org>:
Bug acknowledged by developer. (full text, mbox, link).


Message #44 received at 396443-close@bugs.debian.org (full text, mbox, reply):

From: John Goerzen <jgoerzen@complete.org>
To: 396443-close@bugs.debian.org
Subject: Bug#396443: fixed in offlineimap 5.99.2
Date: Tue, 31 Jul 2007 21:02:11 +0000
Source: offlineimap
Source-Version: 5.99.2

We believe that the bug you reported is fixed in the latest version of
offlineimap, which is due to be installed in the Debian FTP archive:

offlineimap_5.99.2.dsc
  to pool/main/o/offlineimap/offlineimap_5.99.2.dsc
offlineimap_5.99.2.tar.gz
  to pool/main/o/offlineimap/offlineimap_5.99.2.tar.gz
offlineimap_5.99.2_all.deb
  to pool/main/o/offlineimap/offlineimap_5.99.2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 396443@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
John Goerzen <jgoerzen@complete.org> (supplier of updated offlineimap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 31 Jul 2007 05:27:05 -0500
Source: offlineimap
Binary: offlineimap
Architecture: source all
Version: 5.99.2
Distribution: unstable
Urgency: low
Maintainer: John Goerzen <jgoerzen@complete.org>
Changed-By: John Goerzen <jgoerzen@complete.org>
Description: 
 offlineimap - IMAP/Maildir synchronization and reader support
Closes: 396443 433739
Changes: 
 offlineimap (5.99.2) unstable; urgency=low
 .
   * Add build-dep on gs.  Closes: #433739.
   * Additional date check.  Closes: #396443.
Files: 
 3159523536188e376a93d5776fe78e33 697 mail optional offlineimap_5.99.2.dsc
 18912c9f7bc5a24f660906ca5c84e6f4 90287 mail optional offlineimap_5.99.2.tar.gz
 ba8de448b0b50b155c34e2c1d0e54e27 140054 mail optional offlineimap_5.99.2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGr5wGTvSuJuBy3ggRAnkoAJ9oSEWg+SLXJlbfiQCimgUZLwgoSwCgiEkJ
MUOMpo7ec71k+AjQMrlLqwc=
=MgKK
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 31 Oct 2007 07:27:36 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 7 19:25:23 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.