Debian Bug report logs - #588348
offlineimap: Looses mails if PYTHONOPTIMIZE is set

version graph

Package: offlineimap; Maintainer for offlineimap is Dmitrijs Ledkovs <xnox@debian.org>; Source for offlineimap is src:offlineimap.

Reported by: Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>

Date: Wed, 7 Jul 2010 15:42:01 UTC

Severity: critical

Tags: patch

Found in version offlineimap/6.2.0.2

Fixed in version offlineimap/6.2.0.2-2

Done: Serafeim Zanikolas <sez@debian.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, Debian QA Group <packages@qa.debian.org>:
Bug#588348; Package offlineimap. (Wed, 07 Jul 2010 15:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>:
New Bug report received and forwarded. Copy sent to Debian QA Group <packages@qa.debian.org>. (Wed, 07 Jul 2010 15:42:05 GMT) Full text and rfc822 format available.

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

From: Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: offlineimap: Looses mails if PYTHONOPTIMIZE is set
Date: Wed, 07 Jul 2010 12:17:24 +0000
Package: offlineimap
Version: 6.2.0.2
Severity: critical
Justification: causes serious data loss


offlineimap calls critical code paths only via assert.
If PYTHONOPTIMIZE is set, python will - besides other optimisations - ignore all assert statements.
In combination, this caused my entire "sent" folder to get lost as I tried to sync it with a courier-imap server (on which the folder had just been created).

I had reported a similar issue in 2008 (Bug #80: improper use of assert statement), though at that time it just duplicated mails instead of loosing them.

(Python) upstream considers assert a mere debugging tool. See e.g. "Language Reference" section 6.3, first paragraph:

> Assert statements are a convenient way to insert debugging assertions into a program:

The same section also explains that enabling optimization will cause assert statements not to be evaluated.

Thus this is definitely a bug in offlineimap. assert should not be used to invoke regular code paths.


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.31.6-xo1.5-2-00377-g7f5e423 (PREEMPT)
Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages offlineimap depends on:
ii  python                        2.6.5-5    An interactive high-level object-o
ii  python-support                1.0.8      automated rebuilding support for P

offlineimap recommends no packages.

Versions of packages offlineimap suggests:
pn  python-kerberos               <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#588348; Package offlineimap. (Sun, 11 Jul 2010 19:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian QA Group <packages@qa.debian.org>. (Sun, 11 Jul 2010 19:09:06 GMT) Full text and rfc822 format available.

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

From: Jakub Wilk <jwilk@debian.org>
To: Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>, 588348@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#588348: offlineimap: Looses mails if PYTHONOPTIMIZE is set
Date: Sun, 11 Jul 2010 19:20:38 +0200
[Message part 1 (text/plain, inline)]
tags 588348 + patch
thanks

* Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>, 2010-07-07, 12:17:
>offlineimap calls critical code paths only via assert.

I attach an ugly, untested work-around for this bug.

-- 
Jakub Wilk
[588348.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Jakub Wilk <jwilk@debian.org> to control@bugs.debian.org. (Sun, 11 Jul 2010 19:09:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#588348; Package offlineimap. (Sat, 17 Jul 2010 21:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johann Felix Soden <johfel@gmx.de>:
Extra info received and forwarded to list. Copy sent to Debian QA Group <packages@qa.debian.org>. (Sat, 17 Jul 2010 21:54:03 GMT) Full text and rfc822 format available.

Message #17 received at 588348@bugs.debian.org (full text, mbox):

From: Johann Felix Soden <johfel@gmx.de>
To: 588348@bugs.debian.org
Cc: Jakub Wilk <jwilk@debian.org>
Subject: Bug#588348: better patch for PYTHONOPTIMIZE bug
Date: Sat, 17 Jul 2010 23:50:58 +0200
[Message part 1 (text/plain, inline)]
The attached patch solves the problem in a better way:
It replaces all asserts with "if ...: raise AssertionError"
constructions. It needs also testing.
[replaceAsserts.diff (text/x-patch, attachment)]

Added tag(s) pending. Request was from Serafeim Zanikolas <sez@debian.org> to control@bugs.debian.org. (Mon, 02 Aug 2010 18:33:05 GMT) Full text and rfc822 format available.

Reply sent to Serafeim Zanikolas <sez@debian.org>:
You have taken responsibility. (Tue, 03 Aug 2010 13:03:11 GMT) Full text and rfc822 format available.

Notification sent to Sascha Silbe <sascha-debian-bugs-offlineimap-2010-07-07@silbe.org>:
Bug acknowledged by developer. (Tue, 03 Aug 2010 13:03:11 GMT) Full text and rfc822 format available.

Message #24 received at 588348-close@bugs.debian.org (full text, mbox):

From: Serafeim Zanikolas <sez@debian.org>
To: 588348-close@bugs.debian.org
Subject: Bug#588348: fixed in offlineimap 6.2.0.2-2
Date: Tue, 03 Aug 2010 13:02:18 +0000
Source: offlineimap
Source-Version: 6.2.0.2-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_6.2.0.2-2.debian.tar.gz
  to main/o/offlineimap/offlineimap_6.2.0.2-2.debian.tar.gz
offlineimap_6.2.0.2-2.dsc
  to main/o/offlineimap/offlineimap_6.2.0.2-2.dsc
offlineimap_6.2.0.2-2_all.deb
  to main/o/offlineimap/offlineimap_6.2.0.2-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 588348@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Serafeim Zanikolas <sez@debian.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: SHA256

Format: 1.8
Date: Mon, 02 Aug 2010 20:00:41 +0200
Source: offlineimap
Binary: offlineimap
Architecture: source all
Version: 6.2.0.2-2
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Serafeim Zanikolas <sez@debian.org>
Description: 
 offlineimap - IMAP/Maildir synchronization and reader support
Closes: 588348
Changes: 
 offlineimap (6.2.0.2-2) unstable; urgency=low
 .
   * QA upload.
   * Apply patch to replace assert statements with proper tests. Thanks to
     Johann Felix Soden <johfel@gmx.de> (Closes: #588348).
   * Convert to dpkg-source 3.0 (quilt) format
   * Depend on ${misc:Depends} for debhelper.
   * Drop unnecessary Build-Depends-Indep on python-dev
   * Bump Standards-Version to 3.9.0 (no changes).
   * Use proper copyright symbol in debian/copyright.
   * Register FAQ with doc-base, and add Suggests: doc-base
Checksums-Sha1: 
 18d19304e9a0bda8376b7cfce6301068736cc7a9 1991 offlineimap_6.2.0.2-2.dsc
 94eab89a7612979bb5bcb351dea747d0e7407122 21328 offlineimap_6.2.0.2-2.debian.tar.gz
 3b00710abd6f86bc3ebe232b085ef76513b76425 158008 offlineimap_6.2.0.2-2_all.deb
Checksums-Sha256: 
 54debe53ea26ccd1825f096f3aa085c35845d85be840519c8880f8d15165dacc 1991 offlineimap_6.2.0.2-2.dsc
 0f7e676e68498315938ac84d1149b682202f0309a72eb424c3cb1ce4758dd3af 21328 offlineimap_6.2.0.2-2.debian.tar.gz
 ee66ab971b947284cbefc801d9f70f6e3b93b9757062c81da0277428dc8105a1 158008 offlineimap_6.2.0.2-2_all.deb
Files: 
 eeec3de298bb598f71bc951885c0dae0 1991 mail optional offlineimap_6.2.0.2-2.dsc
 3780f4aff6399df1d53646a93ea0efae 21328 mail optional offlineimap_6.2.0.2-2.debian.tar.gz
 17eb3c6b9849d916db83d4d6439bbf41 158008 mail optional offlineimap_6.2.0.2-2_all.deb

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

iQIcBAEBCAAGBQJMWBCgAAoJEE+fbVUO1hIqfFsQANYSyAzS3mWCiBBqz5DjSrpZ
HSAPB4QwGIRmit25HgVTTCVp9BeV+KRXsL5eoiXcqWdrjl3cOGvll74XyD6foUpc
x8MccCRXWz6i/hnQUuNAyNQrnW0FovbosMy4Ek/siIlModhluHeTALOjaGd/WLjG
pmIhBmZ/HOpg2wj3p+7MLounIsktwttQUsxlOEDGBI8wyDSiK3NOJdjXBEd4R6l1
6VGnLEC8ghPm7vw949QPlHLGNkkrURf6f9gTwDKlR12Fm8vjyzYbTnTg4T11uf2G
mcQUrtyLuI6trwpz/t3UuG0q1WiayJ2VkzfGF777khsfo2EDqyXSXmbZMfncjYAE
7PAWcb2IUF8WS9ecyGKNQeiCh45fqu/UUzU+pqUr0RFV3n73nup7z0cxfKf3CE2h
QFKEe9U2MJjjQ+u/MQUywhlGnrSLXWSEJWfNjqZR83hy/LpUZ5HM5nanEMlnAys7
HOLFfZD/wwuEsqfy56tnWr740S8CYM5UQvpEi2t7pdb/9sOpjerlGIljxFAYpix+
d8Z4QCvKLDfponCs2T3gSb+0iw72gZbzfAMckQ2FsCbp+JzK0c6grTYr/P+Q0rdN
vvEokzQoqwT88DlSSQ3Ky2SZIqbfQQGxwJFqJP/NS/WvkbSBV5xg1CraBz1nMLCo
IKMxsTMdoBvoTiXINWtg
=rxWX
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 11 Sep 2010 07:33:01 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 23:57:16 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.