Timo Sirainen wrote:
On 16 Oct 2015, at 23:44, Nick Rosier <nick+dovecot@bunbun.be> wrote:
gdb --args doveadm index -u user@domain INBOX run <it should crash now> f 5 p src p ic_srcbuf p *src_size p srcleft I recompiled Dovecot with Debug but I suspect I will have to do it for all the required libraries as well; I did manage to find the offending message is in Trash but have not been able to pin-point which message it is. Just in case, here is the debugging info. I will see if I can compile all dependencies in debug mode as well.
Program received signal SIGABRT, Aborted. 0x000000080149f64a in thr_kill () from /lib/libc.so.7 (gdb) f 5 #5 0x0000000801143cd3 in i_panic (format=0x801191c30 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:275
I guessed the frame wrong. It's usually 5, but I guess in FreeBSD it's 6 then. So try the same commands, but "f 6" first before "f 5" (and if that doesn't work either, try f 7). Indeed Timo, this provides more info. Hope this helps to track down the bug.
GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run Starting program: /usr/local/bin/doveadm index -u xxx@xxx.xxx Trash doveadm(robots@rkfomh.net): Panic: file charset-iconv.c: line 85 (charset_to_utf8_try): assertion failed: (srcleft <= CHARSET_MAX_PENDING_BUF_SIZE)
Program received signal SIGABRT, Aborted. 0x000000080149f64a in thr_kill () from /lib/libc.so.7 (gdb) f 6 #6 0x0000000801138c2c in charset_to_utf8_try (t=0x6d0360, src=0x7e7cd6 "Your message\n\n From:+AAkAIgQgBEMEOgQ+BDIEPgQ0BDgEQgQ1BDsETAA- +BDgEPQREBD4EQAQ8BDAERgQ4BD4EPQQ9BD4EMwQ+AA- +BEYENQQ9BEIEQAQwACIA- <xxx@xxx.xxx>\n\n To:+AAkA-efg@clasinfo.com\n\n Subj:+AAkEGgQwBDQEM"..., src_size=0x7fffffffdf18, dest=0x788680, result=0x7fffffffdf2c) at charset-iconv.c:85 85 charset-iconv.c: No such file or directory. in charset-iconv.c Current language: auto; currently minimal (gdb) p src $1 = ( const unsigned char *) 0x7e7cd6 "Your message\n\n From:+AAkAIgQgBEMEOgQ+BDIEPgQ0BDgEQgQ1BDsETAA- +BDgEPQREBD4EQAQ8BDAERgQ4BD4EPQQ9BD4EMwQ+AA- +BEYENQQ9BEIEQAQwACIA- <xxx@xxx.xxx>\n\n To:+AAkA-efg@clasinfo.com\n\n Subj:+AAkEGgQwBDQEM"... (gdb) p ic_srcbuf $2 = 0x7e7d11 "A- +BDgEPQREBD4EQAQ8BDAERgQ4BD4EPQQ9BD4EMwQ+AA- +BEYENQQ9BEIEQAQwACIA- <xxx@xxx.xxx>\n\n To:+AAkA-efg@clasinfo.com\n\n Subj:+AAkEGgQwBDQEMARBBEIEQAQ+BDIESwQ5AA- +BEMERwQ1BEIA-\n Sent:+AAkA-2012-06-1"... (gdb) p *src_size $3 = 901 (gdb) p srcleft $4 = 842 (gdb)