[Dovecot] imap segfault in mail-index-sync.c
Our support team seems to have caused another crash.
They treat this mailbox like a shared one, so there may be a few people accessing it at once. They are mostly using dovecot, but some could be using uw-imap. These are the only two ways that this box is accessed. I know that this doesn't really work with mbox, but it doesn't appear to corrupt the mailbox. It seems to be a good stress test...
In this case, it looks like several of them are logged in at once.
Here's the log entry and backtrace of the imap process which segfaulted. I'll put a section of logs covering this time at the end, in case it helps.
The problem appears to be here in mail-index-sync.c:
#define MAIL_INDEX_IS_SYNCS_SAME(index)
((index)->sync_log_file_seq == (index)->hdr->log_file_seq &&
(index)->sync_log_file_offset == (index)->hdr->log_file_ext_offset)
index->hdr is NULL
dovecot: Apr 09 20:52:07 Error: 27413 IMAP(support): Fixed index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: recent_messages_count 12 -> 0 dovecot: Apr 09 20:52:11 Error: 27413 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: Extension introduction for unknown id 1 dovecot: Apr 09 20:52:11 Error: 27413 IMAP(support): Corrupted index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: File too small dovecot: Apr 09 20:52:12 Error: child 27413 (imap) killed with signal 11
Core was generated by `imap'. Program terminated with signal 11, Segmentation fault.
(gdb) bt #0 0x08082836 in mail_index_sync_begin (index=0x80c1dc8, ctx_r=0x1, view_r=0x1, log_file_seq=4294967295, log_file_offset=Unhandled dwarf expression opcode 0x93 ) at mail-index-sync.c:322 #1 0x0806e7f3 in mbox_sync (mbox=0x80c29a8, flags=Variable "flags" is not available. ) at mbox-sync.c:1459 #2 0x080683f6 in mbox_storage_close (box=0x80c29a8) at mbox-storage.c:955 #3 0x0808c59d in mailbox_close (box=0x1) at mail-storage.c:300 #4 0x080593da in client_destroy (client=0x80bb968) at client.c:72 #5 0x080596d6 in _client_input (context=0x80bb968) at client.c:387 #6 0x0809d74a in io_loop_handler_run (ioloop=0x80ba5b0) at ioloop-poll.c:184 #7 0x0809ce69 in io_loop_run (ioloop=0x80ba5b0) at ioloop.c:218 #8 0x080604a7 in main (argc=1, argv=0xbffffa44, envp=0xbffffa4c) at main.c:228 (gdb) p index->hdr $11 = (const struct mail_index_header *) 0x0
Here's the rest of the logs:
dovecot: Apr 09 20:51:59 Error: 27337 IMAP(support): Fixed index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: recent_messages_count 12 -> 0 dovecot: Apr 09 20:52:01 Error: 27337 IMAP(support): Cached message offset lost for seq 11 in mbox file /mailhome/new/m/2/support/mbox dovecot: Apr 09 20:52:07 Error: 27413 IMAP(support): Fixed index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: recent_messages_count 12 -> 0 dovecot: Apr 09 20:52:11 Error: 25454 IMAP(support): mbox sync: Expunged message reappeared in mailbox /mailhome/new/m/2/support/mbox (UID 323634 < 324043) dovecot: Apr 09 20:52:11 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: Append with UID 323479, but next_uid = 324043 dovecot: Apr 09 20:52:11 Error: 27413 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: Extension introduction for unknown id 1 dovecot: Apr 09 20:52:11 Error: 27413 IMAP(support): Corrupted index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: File too small dovecot: Apr 09 20:52:12 Error: child 27413 (imap) killed with signal 11 dovecot: Apr 09 20:52:13 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 1 dovecot: Apr 09 20:52:15 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 1 dovecot: Apr 09 20:52:17 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 1 dovecot: Apr 09 20:52:18 Error: 27467 IMAP(support): Corrupted index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: File too small dovecot: Apr 09 20:52:18 Error: 27467 IMAP(support): Corrupted index file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index: File too small dovecot: Apr 09 20:52:19 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:19 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 1 dovecot: Apr 09 20:52:19 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (2 >= 2) dovecot: Apr 09 20:52:21 Error: 25454 IMAP(support): Corrupted index cache file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.cache: indexid changed dovecot: Apr 09 20:52:21 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:21 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 1 dovecot: Apr 09 20:52:21 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (96) > file size (24) dovecot: Apr 09 20:52:21 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (3 >= 3) dovecot: Apr 09 20:52:23 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:23 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 2 dovecot: Apr 09 20:52:23 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (96) > file size (24) dovecot: Apr 09 20:52:23 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (4 >= 4) dovecot: Apr 09 20:52:25 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 3 dovecot: Apr 09 20:52:27 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:27 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 3 dovecot: Apr 09 20:52:27 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:27 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (5 >= 5) dovecot: Apr 09 20:52:29 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:29 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 4 dovecot: Apr 09 20:52:29 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:29 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (6 >= 6) dovecot: Apr 09 20:52:31 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:31 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 5 dovecot: Apr 09 20:52:31 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:31 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (7 >= 7) dovecot: Apr 09 20:52:33 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:33 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 6 dovecot: Apr 09 20:52:33 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:33 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (8 >= 8) dovecot: Apr 09 20:52:35 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:35 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 7 dovecot: Apr 09 20:52:35 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (84) > file size (24) dovecot: Apr 09 20:52:35 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (9 >= 9) dovecot: Apr 09 20:52:38 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:38 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 8 dovecot: Apr 09 20:52:38 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (140) > file size (24) dovecot: Apr 09 20:52:38 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (10 >= 10) dovecot: Apr 09 20:52:39 Error: 27552 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 10 dovecot: Apr 09 20:52:40 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:40 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 9 dovecot: Apr 09 20:52:40 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:40 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (11 >= 11) dovecot: Apr 09 20:52:42 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:52:42 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 10 dovecot: Apr 09 20:52:42 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: start_offset (44) > file size (24) dovecot: Apr 09 20:52:42 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (12 >= 12) dovecot: Apr 09 20:52:42 Error: 27552 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:12 Error: 27552 IMAP(support): file_dotlock_open() failed with file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: Resource temporarily unavailable dovecot: Apr 09 20:53:12 Error: 27552 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:12 Error: 27552 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:12 Error: 27552 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:12 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:53:12 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:12 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (13 >= 13) dovecot: Apr 09 20:53:14 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:16 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:53:16 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 11 dovecot: Apr 09 20:53:16 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 12 dovecot: Apr 09 20:53:16 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (14 >= 14) dovecot: Apr 09 20:53:18 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid indexid (1113094338 != 1113087252) dovecot: Apr 09 20:53:18 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 12 dovecot: Apr 09 20:53:18 Error: 25454 IMAP(support): Lost transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log seq 13 dovecot: Apr 09 20:53:18 Error: 25454 IMAP(support): Corrupted transaction log file /mailhome/new/m/2/support/.imap/INBOX/dovecot.index.log: invalid new transaction log sequence (15 >= 15)
participants (1)
-
Todd Burroughs