[dovecot] Assert in imap-bodystructure.c
First let me thank you for my initial newby question about poping from a pop3 server and delivering into my Dovecot maildir folders.
Now I'm getting an assertion in imap-bodystructure.c and one of my imap folders is now inaccessable. I think the two are related. Whenever I select the folder from my email client (kmail) I get two log entries in the dovecot log of the format: "imap-master: <date>Error: child <pid> (imap) killed with signal 6"
Also in the log are several lines with an assertion failure. I've included a portion of the log below.
I am running dovecot 0.99.5.
Thanks, Brad
imap-master: Jan 06 08:38:44Error: child 22222 (imap) killed with signal 6 imap(brad): Jan 06 08:46:28Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL) imap-master: Jan 06 08:46:28Error: child 22262 (imap) killed with signal 6 imap(brad): Jan 06 08:53:01Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL) imap(brad): Jan 06 08:53:01Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL) imap-master: Jan 06 08:53:01Error: child 22273 (imap) killed with signal 6 imap-master: Jan 06 08:53:01Error: child 22270 (imap) killed with signal 6
On Mon, 2003-01-06 at 19:03, Brad Figg wrote:
imap(brad): Jan 06 08:46:28Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL)
Annoying, you're the second person now who sees this. Is this Linux/x86 system? Maildir?
Would it be possible for you to send me that mail folder's indexes? They contain some headers of the mails (from, to, subject, ..) and are located in ~/Maildir/.folder/.imap.index* or ~/mail/.imap/folder/.imap.index*. I didn't find any obvious reason for this problem last I looked, so getting those indexes would help to find why they're corrupted.
Anyway, fixing this would most likely work by just deleting those index files. If that didn't help either, it's some mail in there that Dovecot doesn't like for some reason.
On Mon, 2003-01-06 at 19:40, Timo Sirainen wrote:
On Mon, 2003-01-06 at 19:03, Brad Figg wrote:
imap(brad): Jan 06 08:46:28Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL)
Annoying, you're the second person now who sees this. Is this Linux/x86 system? Maildir?
OK, I think I've fixed it now. Some data was saved incorrectly to index files for messages with attachments. This showed up mostly with BODY and BODYSTRUCTURE fetches giving incorrect replies or crashing with messages that had multiple nested MIME parts.
I never saw this since Dovecot starts caching the BODY data to index files after the client has issued BODY query a couple of times. After that there was no problems with them, so this happened mostly with new users.
Also I fixed this properly now, instead of crashing at such invalid data in indexes we'll print a nice error message to log file and the indexes will be rebuilt.
So, "strange bug" count again at zero. Maybe time for a new release soon..
On Monday 06 January 2003 09:40 am, you wrote:
On Mon, 2003-01-06 at 19:03, Brad Figg wrote:
imap(brad): Jan 06 08:46:28Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL)
Annoying, you're the second person now who sees this. Is this Linux/x86 system? Maildir?
Would it be possible for you to send me that mail folder's indexes? They contain some headers of the mails (from, to, subject, ..) and are located in ~/Maildir/.folder/.imap.index* or ~/mail/.imap/folder/.imap.index*. I didn't find any obvious reason for this problem last I looked, so getting those indexes would help to find why they're corrupted.
Anyway, fixing this would most likely work by just deleting those index files. If that didn't help either, it's some mail in there that Dovecot doesn't like for some reason.
I removed the .imap.index* files. I can now see most of the email in that folder. The email that I can see are messages that I moved via drag-n-drop from my email client. The messages that I can't see are ones that procmail put in the folder. There is a difference in the message name format between the two. Messages that I can see are named like "1041543929.7991_300.norbert:2,S". The ones I can not see are named like "1041620504.14350.norbert:2,S". Any ideas why this is happening and how I fix it?
Thanks, Brad
On Monday 06 January 2003 12:19 pm, Brad Figg wrote:
On Monday 06 January 2003 09:40 am, you wrote:
On Mon, 2003-01-06 at 19:03, Brad Figg wrote:
imap(brad): Jan 06 08:46:28Panic: file imap-bodystructure.c: line 346 (part_write_body): assertion failed: (part->children->next == NULL)
Annoying, you're the second person now who sees this. Is this Linux/x86 system? Maildir?
Would it be possible for you to send me that mail folder's indexes? They contain some headers of the mails (from, to, subject, ..) and are located in ~/Maildir/.folder/.imap.index* or ~/mail/.imap/folder/.imap.index*. I didn't find any obvious reason for this problem last I looked, so getting those indexes would help to find why they're corrupted.
Anyway, fixing this would most likely work by just deleting those index files. If that didn't help either, it's some mail in there that Dovecot doesn't like for some reason.
I removed the .imap.index* files. I can now see most of the email in that folder. The email that I can see are messages that I moved via drag-n-drop from my email client. The messages that I can't see are ones that procmail put in the folder. There is a difference in the message name format between the two. Messages that I can see are named like "1041543929.7991_300.norbert:2,S". The ones I can not see are named like "1041620504.14350.norbert:2,S". Any ideas why this is happening and how I fix it?
I should have pointed out that I have other folders that have messages that were put in via drag-n-drop and via procmail and I can see all of them. And that before the folder just quit working I could see all of the email in the folder that I removed the index files from. It's like the indexes didn't handle all of the messages in the folder correctly.
Thanks again, Brad
On Mon, 2003-01-06 at 22:19, Brad Figg wrote:
I removed the .imap.index* files. I can now see most of the email in that folder. The email that I can see are messages that I moved via drag-n-drop from my email client. The messages that I can't see are ones that procmail put in the folder. There is a difference in the message name format between the two. Messages that I can see are named like "1041543929.7991_300.norbert:2,S". The ones I can not see are named like "1041620504.14350.norbert:2,S". Any ideas why this is happening and how I fix it?
File names don't matter to Dovecot at all, so it's not that. Are file permissions correct? Do you see anything in log files? Maybe your email client is caching the messages incorrectly and just doesn't want to see the other mails? If there's nothing in logs, I'd blame the client then. You could verify it by talking directly to dovecot:
x login user pass x select inbox x fetch 1:* envelope
participants (2)
-
Brad Figg
-
Timo Sirainen