Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On 28.11.2012 23:13, Dan White wrote: On 11/28/12 21:41 +0100, Dmitry Katsubo wrote: In there anybody in the maillist, who can further assist me with this issue? Please help to recover. The format of the mailboxes file is documented here: http://cyrusimap.org/docs/cyrus-imapd/2.4.16/internal/database-formats.php Your fields, within each record, should be separated by a space. Your '09' value at 00b1 is wrong. Same thing for 00f09. 0145 looks correct. You could try changing the file, offline, with hexedit or sed: cp mailboxes.db path/mailboxes.bak cat mailboxes.db | sed 's/default\t/default /g' mailboxes.new Thanks, Dan! That helped a lot. I think that problem was caused by buggy ctl_mboxlist, that exported mailboxes.db using tab separator, but then forgot to put spaces during import. Everything works fine now. Thank you again for help. -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
In there anybody in the maillist, who can further assist me with this issue? Please help to recover. On 13.11.2012 19:00, Dmitry Katsubo wrote: Thanks for help. Indeed the problem is rooted in how mailboxes.db is handled. The problem which I was trying to tackle here http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604468 was that partition name was ending with a tab, while the code expected the space. Here does the dump of header of my mailboxes.db: a1 02 8b 0d 73 6b 69 70 6c 69 73 74 20 66 69 6c |skiplist fil| 0010 65 00 00 00 00 00 00 01 00 00 00 02 00 00 00 14 |e...| 0020 00 00 00 07 00 00 00 46 00 00 15 f0 50 a1 8d b0 |...FP...| 0030 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 90 || 0040 00 00 00 90 00 00 01 14 00 00 01 14 00 00 01 14 || 0050 00 00 06 6c 00 00 06 6c 00 00 00 00 00 00 00 00 |...l...l| 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || * 0080 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff || 0090 00 00 00 01 00 00 00 0b 75 73 65 72 2e 64 6d 69 |user.dmi| 00a0 74 72 79 00 00 00 00 1b 30 20 64 65 66 61 75 6c |try.0 defaul| 00b0 74 09 64 6d 69 74 72 79 09 6c 72 73 77 69 70 63 |t.dmitry.lrswipc| 00c0 64 61 09 00 00 00 00 d0 00 00 01 14 ff ff ff ff |da..| 00d0 00 00 00 01 00 00 00 14 75 73 65 72 2e 64 6d 69 |user.dmi| 00e0 74 72 79 2e 41 72 63 68 69 76 65 73 00 00 00 1b |try.Archives| 00f0 30 20 64 65 66 61 75 6c 74 09 64 6d 69 74 72 79 |0 default.dmitry| 0100 09 6c 72 73 77 69 70 63 64 61 09 00 00 00 01 14 |.lrswipcda..| 0110 ff ff ff ff 00 00 00 01 00 00 00 19 75 73 65 72 |user| 0120 2e 64 6d 69 74 72 79 2e 41 72 63 68 69 76 65 73 |.dmitry.Archives| 0130 2e 32 30 31 30 00 00 00 00 00 00 1b 30 20 64 65 |.2010...0 de| 0140 66 61 75 6c 74 20 64 6d 69 74 72 79 09 6c 72 73 |fault dmitry.lrs| 0150 77 69 70 63 64 61 09 00 00 00 01 70 00 00 01 70 |wipcda.p...p| 0160 00 00 02 98 00 00 06 6c 00 00 06 6c ff ff ff ff |...l...l| ... If you tell me, how correctly should I export and import back mailboxes.db (perhaps with db_dump / db_load). Perhaps I was trapped by this issue: http://www.mail-archive.com/cyrus-devel@lists.andrew.cmu.edu/msg00305.html as I would have dumped/restored the mailbox one day. BTW ctl_mboxlist aborts now in my environment: # ctl_mboxlist -d Aborted That said, it shouldn't be crashing in 2.4.16! Well, there is a check for data length: while (*p != ' ' (p - data) datalen) { *q++ = *p++; } but still the pointer goes far beyond the expected point, perhaps causing the trouble in another place. -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On 11/28/12 21:41 +0100, Dmitry Katsubo wrote: In there anybody in the maillist, who can further assist me with this issue? Please help to recover. The format of the mailboxes file is documented here: http://cyrusimap.org/docs/cyrus-imapd/2.4.16/internal/database-formats.php On 13.11.2012 19:00, Dmitry Katsubo wrote: a1 02 8b 0d 73 6b 69 70 6c 69 73 74 20 66 69 6c |skiplist fil| 0010 65 00 00 00 00 00 00 01 00 00 00 02 00 00 00 14 |e...| 0020 00 00 00 07 00 00 00 46 00 00 15 f0 50 a1 8d b0 |...FP...| 0030 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 90 || 0040 00 00 00 90 00 00 01 14 00 00 01 14 00 00 01 14 || 0050 00 00 06 6c 00 00 06 6c 00 00 00 00 00 00 00 00 |...l...l| 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || * 0080 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff || 0090 00 00 00 01 00 00 00 0b 75 73 65 72 2e 64 6d 69 |user.dmi| 00a0 74 72 79 00 00 00 00 1b 30 20 64 65 66 61 75 6c |try.0 defaul| 00b0 74 09 64 6d 69 74 72 79 09 6c 72 73 77 69 70 63 |t.dmitry.lrswipc| 00c0 64 61 09 00 00 00 00 d0 00 00 01 14 ff ff ff ff |da..| 00d0 00 00 00 01 00 00 00 14 75 73 65 72 2e 64 6d 69 |user.dmi| 00e0 74 72 79 2e 41 72 63 68 69 76 65 73 00 00 00 1b |try.Archives| 00f0 30 20 64 65 66 61 75 6c 74 09 64 6d 69 74 72 79 |0 default.dmitry| 0100 09 6c 72 73 77 69 70 63 64 61 09 00 00 00 01 14 |.lrswipcda..| 0110 ff ff ff ff 00 00 00 01 00 00 00 19 75 73 65 72 |user| 0120 2e 64 6d 69 74 72 79 2e 41 72 63 68 69 76 65 73 |.dmitry.Archives| 0130 2e 32 30 31 30 00 00 00 00 00 00 1b 30 20 64 65 |.2010...0 de| 0140 66 61 75 6c 74 20 64 6d 69 74 72 79 09 6c 72 73 |fault dmitry.lrs| 0150 77 69 70 63 64 61 09 00 00 00 01 70 00 00 01 70 |wipcda.p...p| 0160 00 00 02 98 00 00 06 6c 00 00 06 6c ff ff ff ff |...l...l| ... Your fields, within each record, should be separated by a space. Your '09' value at 00b1 is wrong. Same thing for 00f09. 0145 looks correct. You could try changing the file, offline, with hexedit or sed: cp mailboxes.db path/mailboxes.bak cat mailboxes.db | sed 's/default\t/default /g' mailboxes.new -- Dan White Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On Tue, Nov 13, 2012, at 01:43 AM, Dmitry Katsubo wrote: On 27.10.2012 1:50, Dmitry Katsubo wrote: Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] Anyone who can help me with the issue? You have bogus data in your mailboxes.db - you need to make sure every line ends with a tab. If your dump and restore didn't add the tab, then it is broken. That said, it shouldn't be crashing in 2.4.16! Can I get a copy of your mailboxes.db? I'll take a look. Regards, Bron. Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On 13.11.2012 10:02, Bron Gondwana wrote: On Tue, Nov 13, 2012, at 01:43 AM, Dmitry Katsubo wrote: On 27.10.2012 1:50, Dmitry Katsubo wrote: Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] You have bogus data in your mailboxes.db - you need to make sure every line ends with a tab. If your dump and restore didn't add the tab, then it is broken. Hi Bron, Thanks for help. Indeed the problem is rooted in how mailboxes.db is handled. The problem which I was trying to tackle here http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604468 was that partition name was ending with a tab, while the code expected the space. Here does the dump of header of my mailboxes.db: a1 02 8b 0d 73 6b 69 70 6c 69 73 74 20 66 69 6c |skiplist fil| 0010 65 00 00 00 00 00 00 01 00 00 00 02 00 00 00 14 |e...| 0020 00 00 00 07 00 00 00 46 00 00 15 f0 50 a1 8d b0 |...FP...| 0030 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 90 || 0040 00 00 00 90 00 00 01 14 00 00 01 14 00 00 01 14 || 0050 00 00 06 6c 00 00 06 6c 00 00 00 00 00 00 00 00 |...l...l| 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 || * 0080 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff || 0090 00 00 00 01 00 00 00 0b 75 73 65 72 2e 64 6d 69 |user.dmi| 00a0 74 72 79 00 00 00 00 1b 30 20 64 65 66 61 75 6c |try.0 defaul| 00b0 74 09 64 6d 69 74 72 79 09 6c 72 73 77 69 70 63 |t.dmitry.lrswipc| 00c0 64 61 09 00 00 00 00 d0 00 00 01 14 ff ff ff ff |da..| 00d0 00 00 00 01 00 00 00 14 75 73 65 72 2e 64 6d 69 |user.dmi| 00e0 74 72 79 2e 41 72 63 68 69 76 65 73 00 00 00 1b |try.Archives| 00f0 30 20 64 65 66 61 75 6c 74 09 64 6d 69 74 72 79 |0 default.dmitry| 0100 09 6c 72 73 77 69 70 63 64 61 09 00 00 00 01 14 |.lrswipcda..| 0110 ff ff ff ff 00 00 00 01 00 00 00 19 75 73 65 72 |user| 0120 2e 64 6d 69 74 72 79 2e 41 72 63 68 69 76 65 73 |.dmitry.Archives| 0130 2e 32 30 31 30 00 00 00 00 00 00 1b 30 20 64 65 |.2010...0 de| 0140 66 61 75 6c 74 20 64 6d 69 74 72 79 09 6c 72 73 |fault dmitry.lrs| 0150 77 69 70 63 64 61 09 00 00 00 01 70 00 00 01 70 |wipcda.p...p| 0160 00 00 02 98 00 00 06 6c 00 00 06 6c ff ff ff ff |...l...l| ... If you tell me, how correctly should I export and import back mailboxes.db (perhaps with db_dump / db_load). Perhaps I was trapped by this issue: http://www.mail-archive.com/cyrus-devel@lists.andrew.cmu.edu/msg00305.html as I would have dumped/restored the mailbox one day. BTW ctl_mboxlist aborts now in my environment: # ctl_mboxlist -d Aborted That said, it shouldn't be crashing in 2.4.16! Well, there is a check for data length: while (*p != ' ' (p - data) datalen) { *q++ = *p++; } but still the pointer goes far beyond the expected point, perhaps causing the trouble in another place. -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On 27.10.2012 1:50, Dmitry Katsubo wrote: Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] Anyone who can help me with the issue? -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On 27.10.2012 7:20, Bron Gondwana wrote: On Sat, Oct 27, 2012, at 01:50 AM, Dmitry Katsubo wrote: Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] IMAP server and local delivery does not work. It looks like all these binaries share the same code that segfaults. How can I diagnose the problem further? Thanks for any hint. Additional info: * Debian sid * Linux kernel 2.6.32-5-486 * cyrus-imapd-2.4_2.4.16-1 * libc6-2.13-35 I haven't actually looked at the Debian packages recently. The best way to find the cause is to run with core size ulimit set so you get core dumps, and chroot to a directory where the cyrus user can write files during startup. Thanks for reply, Bron. I will generate core dumps with GDB at SEGFAULT point – will this suit you? Where should I upload them? That said - it's interesting that you get so many processes crashing. Do you have any syslog entries from immediately before the crash? I think that the problem is somehow connected to the one I have reported a while ago here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604468 My feeling is that all above processes are crashing as they share the same problematic code, and this can well be the code that works with mailboxes. If you can have a look the the patch I have attached to that bug report, I will appreciate. -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
segfault in ctl_cyrusdb/cyr_expire/lmtpd
Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] IMAP server and local delivery does not work. It looks like all these binaries share the same code that segfaults. How can I diagnose the problem further? Thanks for any hint. Additional info: * Debian sid * Linux kernel 2.6.32-5-486 * cyrus-imapd-2.4_2.4.16-1 * libc6-2.13-35 -- With best regards, Dmitry Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: segfault in ctl_cyrusdb/cyr_expire/lmtpd
On Sat, Oct 27, 2012, at 01:50 AM, Dmitry Katsubo wrote: Dear Cyrus developers, I am experiencing segfaults for cyrus-imapd v2.4.16 in my environment: Aug 29 11:51:35 ctl_cyrusdb[3713]: segfault at 0 ip b7255d76 sp bfdff308 error 6 in libc-2.13.so[b71de000+156000] Aug 29 11:51:35 cyr_expire[3728]: segfault at 0 ip b727dd76 sp bf8876e8 error 6 in libc-2.13.so[b7206000+156000] Aug 29 12:03:04 lmtpd[6190]: segfault at 0 ip b7063d76 sp bfcdde18 error 6 in libc-2.13.so[b6fec000+156000] Aug 29 12:03:04 lmtpd[6196]: segfault at 0 ip b71f4d76 sp bfdc4d48 error 6 in libc-2.13.so[b717d000+156000] Aug 29 12:03:04 lmtpd[6197]: segfault at 0 ip b70d4d76 sp bfcf8f48 error 6 in libc-2.13.so[b705d000+156000] Aug 29 12:03:37 lmtpd[7628]: segfault at 0 ip b70f8d76 sp bff07348 error 6 in libc-2.13.so[b7081000+156000] IMAP server and local delivery does not work. It looks like all these binaries share the same code that segfaults. How can I diagnose the problem further? Thanks for any hint. Additional info: * Debian sid * Linux kernel 2.6.32-5-486 * cyrus-imapd-2.4_2.4.16-1 * libc6-2.13-35 I haven't actually looked at the Debian packages recently. The best way to find the cause is to run with core size ulimit set so you get core dumps, and chroot to a directory where the cyrus user can write files during startup. That said - it's interesting that you get so many processes crashing. Do you have any syslog entries from immediately before the crash? Bron. -- Bron Gondwana br...@fastmail.fm Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus