Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed asserting during APPEND #1612

Closed
brong opened this issue Nov 14, 2012 · 8 comments
Closed

Failed asserting during APPEND #1612

brong opened this issue Nov 14, 2012 · 8 comments
Assignees

Comments

@brong
Copy link
Member

brong commented Nov 14, 2012

From: Jan Schneider
Bugzilla-Id: 3754
Version: 2.4.16
Owner: Bron Gondwana

@brong
Copy link
Member Author

brong commented Nov 14, 2012

From: Jan Schneider

APPENDing a message results in "Fatal error: Internal error: assertion failed: mailbox.c: 2180: !message_guid_isnull(&record->guid)"

The line number seems off, this is an Ubuntu/Debian build that probably has patches. The assertion still exists in the pristine sources though: http://git.cyrusimap.org/cyrus-imapd/tree/imap/mailbox.c#n2729

See also: http://lists.andrew.cmu.edu/pipermail/info-cyrus/2011-July/035131.html

This is some example log:

S: * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE XIMAPPROXY] neo Cyrus IMAP v2.4.16-Debian-2.4.16-1 server ready
C: [LOGIN Command - username: jan]
S: * OK [XPROXYREUSE] IMAP connection reused by imapproxy
S: 1 OK User logged in
C: 2 APPEND "INBOX.Kalender" ~{1949+}
From: jan
To: jan
Date: Fri, 26 Oct 2012 17:55:19 +0200
Subject: =?ISO-8859-15?Q?mxstore(50ac99d9-4ca6-4622-ac1c-8706f41a5a26)<eidFld::<()-0x0-0x0-0x0><SE:0=\r\nx205564><RK:679ce160d94ef346bb321bdbd6054cbd>>?=
User-Agent: Horde_Kolab_Storage @Version@
MIME-Version: 1.0
X-Kolab-Type: application/x-vnd.kolab.event
Content-Type: multipart/mixed; name="Kolab Groupware Data";
boundary="=_wEolIxPcj3hQirJnZXryomA"
Content-Disposition: attachment; filename="Kolab Groupware Data"

This message is in MIME format.

--=_wEolIxPcj3hQirJnZXryomA
Content-Type: text/plain; name="Kolab Groupware Information"; charset=utf-8
Content-Disposition: inline; filename="Kolab Groupware Information"
Content-Transfer-Encoding: quoted-printable

Dies ist ein Kolab-Groupware-Objekt. Um dieses Objekt anzuzeigen, ben=C3=B6=
tigen Sie ein E-Mail-Programm, das das Kolab-Groupware-Format unterst=C3=BC=
tzt. Eine Liste solcher Programme finden Sie unter http://www.kolab.org/con=
tent/kolab-clients
--=_wEolIxPcj3hQirJnZXryomA
Content-Type: application/x-vnd.kolab.event; name=kolab.xml
Content-Disposition: inline; x-kolab-type=xml; filename=kolab.xml
Content-Transfer-Encoding: quoted-printable

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<event version=3D"1.0">
<uid>mxstore(50ac99d9-4ca6-4622-ac1c-8706f41a5a26)&lt;eidFld::&lt;()-0x0-0x0-0x0&gt;&lt;SE:0x205564&gt;&lt;RK:679ce160d94ef346bb321bdbd6054cbd&gt;&gt;</uid>
<body></body>
<categories></categories>
<creation-date>2012-10-26T17:55:19Z</creation-date>
<last-modification-date>2012-10-26T15:55:19Z</last-modification-date>
<sensitivity>public</sensitivity>
<product-id>Horde_Kolab_Format_Xml-@Version@ (api version: 1)</product-id=
>
<summary>qwer</summary>
<location></location>
<start-date>2012-10-26T17:55:00</start-date>
<show-time-as>busy</show-time-as>
<end-date>2012-10-26T18:55:00</end-date>
</event>

--=_wEolIxPcj3hQirJnZXryomA--
C:
S: * BYE Fatal error: Internal error: assertion failed: mailbox.c: 2180: !message_guid_isnull(&record->guid)

@brong
Copy link
Member Author

brong commented Nov 14, 2012

From: Bron Gondwana

Does this happen on every append, or just this one?

If every append, then it looks like your cyrus isn't compiled correctly - it should be calculating the sha1 of the message file and creating a GUID. If you're using a recent Cyrus, it should (I'm pretty sure) be using an inbuilt sha1 function if it can't link with openssl.

Bron.

@brong
Copy link
Member Author

brong commented Nov 14, 2012

From: Jan Schneider

Happens with every APPEND. And started after updating to Ubuntu Quantal which updated to 2.4.16.

@brong
Copy link
Member Author

brong commented Nov 14, 2012

From: Bron Gondwana

Definitely looks like a miscompiled Cyrus then :( I suggest filing a bug in launchpad. I'll have a look to see if we can make it impossible to break like this in the Cyrus code as well.

@brong
Copy link
Member Author

brong commented Nov 14, 2012

From: Jan Schneider

For cross-reference: https://bugs.launchpad.net/bugs/1078734

@brong
Copy link
Member Author

brong commented Nov 21, 2012

From: Jan Schneider

*** Bug 3755 has been marked as a duplicate of this bug. ***

@brong
Copy link
Member Author

brong commented Nov 21, 2012

From: Jeroen van Meeuwen (Kolab Systems)

(In reply to comment #3)
> Definitely looks like a miscompiled Cyrus then :( I suggest filing a bug in
> launchpad.

It seems not limited to mis-compiled Cyrus, or both Debian/Ubuntu as well as Enterprise Linux 6/Fedora packages are mis-compiled.

@brong
Copy link
Member Author

brong commented Nov 21, 2012

From: Bron Gondwana

Fixed in git:

commit 0f9eb85
Author: Bron Gondwana <brong@opera.com>
Date: Wed Nov 21 11:41:04 2012 +0100

Bug #3754 - parse GUID for binary appends as well

diff --git a/imap/message.c b/imap/message.c
index e97be01..4daddf9 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -371,6 +371,8 @@ int message_parse_binary_file(FILE *infile, struct body **body)
message_parse_body(&msg, *body,
DEFAULT_CONTENT_TYPE, (struct boundary *)0);

  • message_guid_generate(&(*body)->guid, msg.base, msg.len);
  • lseek(fd, 0L, SEEK_SET);
    n = retry_write(fd, msg.base, msg.len);

(will also push to master)

@brong brong closed this as completed Dec 1, 2012
@brong brong self-assigned this Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant