I am still getting panics. Today I'm seeing this panic only when 'eM Client' connects. Not other imap clients. It's almost as if there's a malformed message in my mailbox which might be causing this. I spent some time trying to do things like delete the last 20 messages or so but no luck.
I tried to enable debugging in 10-logging but i get nothing at all in the log file /var/log/dovecot. Yes I've restarted dovecot.
I'm running the version from here: https://repo.dovecot.org/ce-2.3-latest/debian/bullseye
Any ideas??
Mar 26 19:23:14 strange dovecot: imap(mgrant)<2743779><EQ/3kpgUgvxRaQEP>: Panic: file istream-header-filter.c: line 663 (i_stream_header_filter_snapshot_free): assertion failed: (snapshot->mstream->snapshot_pending) Mar 26 19:23:14 strange dovecot: imap(mgrant)<2743779><EQ/3kpgUgvxRaQEP>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7f9d301ed482] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f9d301ed59e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1041fb) [0x7f9d301fa1fb] -> /usr/lib/dovecot/libdovecot.so.0(+0x104291) [0x7f9d301fa291] -> /usr/lib/dovecot/libdovecot.so.0(+0x56670) [0x7f9d3014c670] -> /usr/lib/dovecot/libdovecot.so.0(+0x51ec5) [0x7f9d30147ec5] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_snapshot_free+0x18) [0x7f9d30205c68] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_unref+0x4c) [0x7f9d30205d0c] -> /usr/lib/dovecot/libdovecot.so.0(message_parse_header_deinit+0x15) [0x7f9d301d60e5] -> /usr/lib/dovecot/libdovecot.so.0(+0xe29b1) [0x7f9d301d89b1] -> /usr/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x45) [0x7f9d301d84d5] -> /usr/lib/dovecot/libdovecot.so.0(message_parser_parse_header+0x51) [0x7f9d301d8611] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mail_parse_headers_internal+0x11a) [0x7f9d3039c8ca] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mail_parse_headers+0x4c) [0x7f9d3039c9ec] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xd885a) [0x7f9d303a185a] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xd8a89) [0x7f9d303a1a89] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_special+0x122) [0x7f9d303a1d92] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_get_special+0xa) [0x7f9d3031cfba] -> dovecot/imap(+0x26808) [0x55f5622cd808] -> dovecot/imap(+0x240a4) [0x55f5622cb0a4] -> dovecot/imap(imap_fetch_more+0x39) [0x55f5622cc4a9] -> dovecot/imap(cmd_fetch+0x39f) [0x55f5622bc8af] -> dovecot/imap(command_exec+0xa4) [0x55f5622c95b4] -> dovecot/imap(+0x2052f) [0x55f5622c752f] -> dovecot/imap(+0x205da) [0x55f5622c75da] -> dovecot/imap(+0x208ed) [0x55f5622c78ed] -> dovecot/imap(client_handle_input+0x1b5) [0x55f5622c7ab5] -> dovecot/imap(client_input+0x70) [0x55f5622c8020] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f9d30210429] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) [0x7f9d30211b12] Mar 26 19:23:14 strange dovecot: imap(mgrant)<2743779><EQ/3kpgUgvxRaQEP>: Fatal: master: service(imap): child 2743779 killed with signal 6 (core dumps disabled - https://dovecot.org/bugreport.html#coredumps)
I could really use some help debugging issue. It seems like dovecot is panicing because of some specific message(s) in my inbox. I can't find any easy way to get either my mail client or dovecot to tell me what it doesn't like. The mail client just says dovecot disconnects in the middle of the conversation. Meanwhile, dovecot panics.
Is there some way to turn on imap logging so dovecot tells me step by step which message got requested and which one it's sending to the client?
I've run 'doveadm -v force-resync -u me@myserver.com me' many times. It returns very fast. I don't know if that's normal or not. Regardless, it does not help.
Is there some method to go through a mailbox (it's an mbox single-file mailbox) and sort out any problems?
Clearly dovecot is freaked by something in there, I just can't figure out what.
I can not migrate the entire server to maildir. I would be willing to migrate just my inbox to maildir to see if this fixes it. Any help on how to do this? Can this be done such that my ~/mail/* files remain as mbox files?
Michael Grant
Am 27.03.24 um 18:49 schrieb Michael Grant via dovecot:
I could really use some help debugging issue.
Timo gave some debugging tips in a similar case cf. https://dovecot.org/pipermail/dovecot/2023-March/126229.html
In case you know how to use gdb, that should work and might get a reproducer so this error can be mended for everybody.
------ Original Message ------ From "Daniel Lange" <DLange@debian.org> To "Michael Grant" <mgrant@grant.org> Cc "dovecot@dovecot.org" <dovecot@dovecot.org> Date 27/03/2024 18:14:11 Subject Re: panics
Am 27.03.24 um 18:49 schrieb Michael Grant via dovecot:
I could really use some help debugging issue.
Timo gave some debugging tips in a similar case cf. https://dovecot.org/pipermail/dovecot/2023-March/126229.html
In case you know how to use gdb, that should work and might get a reproducer so this error can be mended for everybody.
This was helpful thanks. I do know how to use gpb, but hoping it won't come to this. I was thinking of how to do that anyway. There must be way to start dovecot (in gdb) so it does not fork and runs on a non-standard port so I could configure the imap client to contact it on, for example, port 1993. If someone knows how to do that, let me know.
I used 'doveadm backup' to convert the mbox inbox to Maildir. It had several errors. I removed the cache, tried again, and it seems now to be a clean Maildir.
Is it possible to specify a Maildir inbox but an mbox ~/mail folder (e.g. ~/mail/Trash, ~/mail/Junk ...etc as mbox files)? Is that possible to configure in a line in the dovecot userpasswd file on a per user basis?
On 27/03/2024 21:10 EET Michael Grant via dovecot <dovecot@dovecot.org> wrote:
------ Original Message ------
From "Daniel Lange" <DLange@debian.org> To "Michael Grant" <mgrant@grant.org> Cc "dovecot@dovecot.org" <dovecot@dovecot.org> Date 27/03/2024 18:14:11 Subject Re: panics
Am 27.03.24 um 18:49 schrieb Michael Grant via dovecot:
I could really use some help debugging issue.
Timo gave some debugging tips in a similar case cf. https://dovecot.org/pipermail/dovecot/2023-March/126229.html
In case you know how to use gdb, that should work and might get a reproducer so this error can be mended for everybody.
This was helpful thanks. I do know how to use gpb, but hoping it won't come to this. I was thinking of how to do that anyway. There must be way to start dovecot (in gdb) so it does not fork and runs on a non-standard port so I could configure the imap client to contact it on, for example, port 1993. If someone knows how to do that, let me know.
I used 'doveadm backup' to convert the mbox inbox to Maildir. It had several errors. I removed the cache, tried again, and it seems now to be a clean Maildir.
Is it possible to specify a Maildir inbox but an mbox ~/mail folder (e.g. ~/mail/Trash, ~/mail/Junk ...etc as mbox files)? Is that possible to configure in a line in the dovecot userpasswd file on a per user basis?
gdb /usr/lib/dovecot/imap r -u username
Aki
Am 27.03.24 um 18:49 schrieb Michael Grant via dovecot:
I could really use some help debugging issue.
Timo gave some debugging tips in a similar case cf. https://dovecot.org/pipermail/dovecot/2023-March/126229.html
In case you know how to use gdb, that should work and might get a reproducer so this error can be mended for everybody.
This was helpful thanks. I do know how to use gdb, but hoping it won't come to this. I was thinking of how to do that anyway. There must be way to start dovecot (in gdb) so it does not fork and runs on a non-standard port so I could configure the imap client to contact it on, for example, port 1993. If someone knows how to do that, let me know.
gdb /usr/lib/dovecot/imap r -u username
I tried what you said above. It seems to start IMAP running on stdin connected to my username.
It's not clear to me how to debug this like that. Any recommendation?
In the client, I can easily set a different port like 1993. What I was imagining was to start dovecot (or imap?) in gdb then connect with the client, authenticate as myself, let it sync up it's folders, and then watch the crash and poke around and try to print out the message and folder.
Would it be easy for you to maybe print out the message and folder in the assertion that is failing? Maybe this is easier for me to recompile dovecot with that instead of trying to get into debug in the correct child and all?
participants (4)
-
Aki Tuomi
-
Daniel Lange
-
mgrant@grant.org
-
Michael Grant