Jason Lewis
2019-Mar-26 23:25 UTC
v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
Hi Aki, debian jessie backports has been moved to archive.debian.org and initially I was unable to install dovecot-dbg because of that. But I've managed to resolve that issue now. This was the command I ran: doveadm -D -f flow fetch imap.envelope mailbox crm-spam.2008.g Backtrace follows. Jason jason at debian:~$ gdb /usr/bin/doveadm /home/jason/core GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/doveadm...Reading symbols from /usr/lib/debug/.build-id/8a/e850dc3cde00618eb0c3386b7404fe984c8118.debug...done. done. [New LWP 23099] Core was generated by `/usr/bin/doveadm -D -f flow fetch imap.envelope mailbox crm-spam.2008.g'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f3a7bf58067 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt full #0 0x00007f3a7bf58067 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 resultvar = 0 pid = 23099 selftid = 23099 #1 0x00007f3a7bf59448 in __GI_abort () at abort.c:89 save_stage = 2 act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction 0x0}, sa_mask = {__val = {1024, 93886903596007, 93886903463748, 139889164438341, 93886903464748, 0, 93886931979560, 513, 12274393185022739456, 93886931979560, 139889168940995, 93886931979560, 140727948500176, 4294967040, 139889168941353, 93886931979560}}, sa_flags = 2083919594, sa_restorer = 0x7ffdc7615d01} sigs = {__val = {32, 0 <repeats 15 times>}} #2 0x00007f3a7c3669a6 in default_fatal_finish (type=<optimized out>, status=status at entry=0) at failures.c:201 backtrace = 0x5563c13acd60 "/usr/lib/dovecot/libdovecot.so.0(+0x989ae) [0x7f3a7c3669ae] -> /usr/lib/dovecot/libdovecot.so.0(+0x98a28) [0x7f3a7c366a28] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f3a7c2fc67e] -> /usr/lib/d"... #3 0x00007f3a7c366a28 in default_fatal_handler (ctx=0x7ffdc7615d20, format=<optimized out>, args=<optimized out>) at failures.c:215 status = 0 #4 0x00007f3a7c2fc67e in i_panic (format=format at entry=0x7f3a7c399088 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:275 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area 0x7ffdc7615e20, reg_save_area = 0x7ffdc7615d60}} #5 0x00007f3a7c34a97d in rfc822_parser_deinit (ctx=0x7ffdc7615e38, ctx=0x7ffdc7615e38) at rfc822-parser.h:23 No locals. #6 message_address_parse_real (pool=pool at entry=0x5563c13e75d0, data=data at entry=0x5563c13f3910 "To: bluefrog at dickson.st, jason at dickson.st, lewisjason at dickson.st, 05 Jul 2008 16:39:47 -0500 PDT6Q--q=dns; c=nofws;d sender) smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) hea"..., size=size at entry=64, max_addresses=max_addresses at entry=4294967295, fill_missing=fill_missing at entry=true) at message-address.c:323 ctx = {pool = 0x5563c13e75d0, parser = { data = 0x5563c13f3951 " 05 Jul 2008 16:39:47 -0500 PDT6Q--q=dns; c=nofws;d sender) smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) header.From=Matt_Cooley at postnewsweektech.com", end = 0x5563c13f3950 ", 05 Jul 2008 16:39:47 -0500 PDT6Q--q=dns; c=nofws;d sender) smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) header.From=Matt_Cooley at postnewsweektech.com", last_comment 0x5563c13acb78}, first_addr = 0x5563c13e7910, last_addr = 0x5563c13e7a28, addr = {next = 0x0, name = 0x0, route = 0x0, mailbox = 0x0, domain = 0x0, invalid_syntax = false}, str = 0x5563c13acc50, fill_missing = true} #7 0x00007f3a7c34a9e5 in message_address_parse (pool=pool at entry=0x5563c13e75d0, data=0x5563c13f3910 "To: bluefrog at dickson.st, jason at dickson.st, lewisjason at dickson.st, 05 Jul 2008 16:39:47 -0500 PDT6Q--q=dns; c=nofws;d sen---Type <return> to continue, or q <return> to quit--- der) smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) hea"..., size=64, max_addresses=max_addresses at entry=4294967295, fill_missing=fill_missing at entry=true) at message-address.c:338 _data_stack_cur_id = 4 addr = <optimized out> #8 0x00007f3a7c33e374 in imap_envelope_parse_header (pool=0x5563c13e75d0, data=data at entry=0x5563c13e6ff0, hdr=hdr at entry=0x5563c13d55a0) at imap-envelope.c:147 d = <optimized out> field = IMAP_ENVELOPE_TO addr_p = 0x5563c13e7798 str_p = 0x0 #9 0x00007f3a7c6a222e in index_mail_parse_header (part=<optimized out>, hdr=0x5563c13d55a0, mail=0x5563c13e6de0) at index-mail-headers.c:298 _mail = 0x5563c13e6de0 data = 0x5563c13e6f60 field_idx = <optimized out> count = <optimized out> __FUNCTION__ = "index_mail_parse_header" #10 0x00007f3a7c34779f in read_header (mstream=0x5563c13efef0) at istream-header-filter.c:246 orig_matched = true matched = true max_buffer_size = <optimized out> ret = <optimized out> hdr = 0x5563c13d55a0 highwater_offset = <optimized out> ret2 = <optimized out> hdr_ret = 1 #11 i_stream_header_filter_read (stream=0x5563c13efef0) at istream-header-filter.c:425 mstream = 0x5563c13efef0 #12 0x00007f3a7c3717e3 in i_stream_read (stream=stream at entry=0x5563c13eff60) at istream.c:174 _stream = 0x5563c13efef0 old_size = 42 ret = <optimized out> __FUNCTION__ = "i_stream_read" #13 0x00007f3a7c37222d in i_stream_read_data (stream=0x5563c13eff60, data_r=data_r at entry=0x7ffdc7616158, size_r=size_r at entry=0x7ffdc7616160, ---Type <return> to continue, or q <return> to quit--- threshold=threshold at entry=42) at istream.c:569 ret = <optimized out> read_more = false __FUNCTION__ = "i_stream_read_data" #14 0x00007f3a7c34d3d2 in message_parse_header_next (ctx=0x5563c13d9a50, hdr_r=hdr_r at entry=0x7ffdc76161c0) at message-header-parser.c:84 line = 0x5563c13d9a50 msg = 0x5563c13f1a57 "Subject: ADV: Order Reminder: #317330373\r\n>\r\n" i = <optimized out> size = 42 startpos = 41 colon_pos = 7 parse_size = <optimized out> skip = 0 ret = <optimized out> continued = false continues = false last_no_newline = <optimized out> last_crlf = <optimized out> no_newline = false crlf_newline = false __FUNCTION__ = "message_parse_header_next" #15 0x00007f3a7c34dd7f in message_parse_header (input=<optimized out>, hdr_size=hdr_size at entry=0x0, flags=flags at entry=(MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP | MESSAGE_HEADER_PARSER_FLAG_DROP_CR), callback=callback at entry=0x7f3a7c6a19f0 <imap_envelope_parse_callback>, context=context at entry=0x5563c13e6de0) at message-header-parser.c:391 hdr_ctx = 0x5563c13d9a50 hdr = 0x0 ret = <optimized out> __FUNCTION__ = "message_parse_header" #16 0x00007f3a7c6a3448 in index_mail_headers_get_envelope (mail=mail at entry=0x5563c13e6de0) at index-mail-headers.c:513 cache_field_envelope = <optimized out> header_ctx = 0x0 stream = 0x5563c13eff60 old_offset = 0 ---Type <return> to continue, or q <return> to quit--- str = 0x0 #17 0x00007f3a7c6a76c1 in index_mail_get_special (_mail=_mail at entry=0x5563c13e6de0, field=<optimized out>, value_r=value_r at entry=0x7ffdc7616380) at index-mail.c:1432 mail = 0x5563c13e6de0 data = 0x5563c13e6f60 cache_fields = <optimized out> error = 0x7f3a7c6ac092 <search_more+882> "\204\300A\213\207", <incomplete sequence \310> str = 0x4a __FUNCTION__ = "index_mail_get_special" #18 0x00007f3a7c65ddd3 in maildir_mail_get_special (_mail=0x5563c13e6de0, field=<optimized out>, value_r=0x7ffdc7616380) at maildir-mail.c:585 mail = 0x5563c13e6de0 mbox = 0x5563c13d4550 path = <optimized out> fname = 0x0 end = <optimized out> guid = <optimized out> uidl = <optimized out> order = <optimized out> st = {st_dev = 93886932064256, st_ino = 93886932171200, st_nlink = 93886932027904, st_mode = 3241904640, st_uid = 21859, st_gid = 3345048439, __pad0 = 32765, st_rdev = 93886932027792, st_size = 93886932027552, st_blksize = 139889172202932, st_blocks = 93886932171288, st_atim = {tv_sec 139889159904424, tv_nsec = 93886932064256}, st_mtim = {tv_sec 93886932064256, tv_nsec = 93886932217312}, st_ctim = {tv_sec -6172350888686812160, tv_nsec = 93886932027904}, __glibc_reserved {93886932171200, 93886932218232, 140727948501888}} __FUNCTION__ = "maildir_mail_get_special" #19 0x00007f3a7c62ea8d in mail_get_special (mail=<optimized out>, field=field at entry=MAIL_FETCH_IMAP_ENVELOPE, value_r=value_r at entry=0x7ffdc7616380) at mail.c:343 p = <optimized out> __FUNCTION__ = "mail_get_special" #20 0x00005563bf88dca8 in fetch_imap_envelope (ctx=<optimized out>) at doveadm-mail-fetch.c:410 value = 0x5563c13b88a0 "\200\210;\301cU" #21 0x00005563bf88ed7e in cmd_fetch_mail (ctx=<optimized out>) at doveadm-mail-fetch.c:587 field__foreach_end = 0x5563c13aa338 field = 0x5563c13aa320 ---Type <return> to continue, or q <return> to quit--- mail = 0x5563c13e6de0 ret = 0 #22 cmd_fetch_box (info=<optimized out>, ctx=<optimized out>) at doveadm-mail-fetch.c:616 _data_stack_cur_id = 3 iter = 0x5563c13d44d0 ret = 0 #23 cmd_fetch_run (_ctx=0x5563c13b88a0, user=0x5a3b) at doveadm-mail-fetch.c:639 _data_stack_cur_id = 2 iter = 0x5563c13d4390 info = 0x5563c13aa338 #24 0x00005563bf88a57c in doveadm_mail_next_user (ctx=ctx at entry=0x5563c13b88a0, cctx=cctx at entry=0x7ffdc7616720, error_r=error_r at entry=0x7ffdc7616530) at doveadm-mail.c:404 input = {module = 0x0, service = 0x5563bf8c2554 "doveadm", username = 0x5563c13b157e "jason", session_id = 0x0, session_id_prefix = 0x0, session_create_time = 0, local_ip {family = 0, u = {ip6 = {__in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = { s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 {s_addr = 0}}}, local_port = 0, remote_port = 0, userdb_fields = 0x0, flags_override_add = (unknown: 0), flags_override_remove (unknown: 0), no_userdb_lookup = 0, debug = 0} error = 0x20 <error: Cannot access memory at address 0x20> ip = <optimized out> ret = <optimized out> __FUNCTION__ = "doveadm_mail_next_user" #25 0x00005563bf88afe3 in doveadm_mail_single_user (ctx=ctx at entry=0x5563c13b88a0, cctx=cctx at entry=0x7ffdc7616720, error_r=error_r at entry=0x7ffdc7616530) at doveadm-mail.c:435 __FUNCTION__ = "doveadm_mail_single_user" #26 0x00005563bf88b0da in doveadm_mail_cmd_exec (ctx=ctx at entry=0x5563c13b88a0, cctx=cctx at entry=0x7ffdc7616720, wildcard_user=wildcard_user at entry=0x0) at doveadm-mail.c:596 ret = <optimized out> error = 0x41 <error: Cannot access memory at address 0x41> #27 0x00005563bf88bf5f in doveadm_cmd_ver2_to_mail_cmd_wrapper (cctx=0x7ffdc7616720) at doveadm-mail.c:1061 mctx = 0x5563c13b88a0 wildcard_user = <optimized out> fieldstr = 0x5563c13a9c70 "" ---Type <return> to continue, or q <return> to quit--- i = <optimized out> mail_cmd = {alloc = 0x5563bf88d9e0 <cmd_fetch_alloc>, name 0x5563bf8c39e7 "fetch", usage_args = 0x5563bf8c3bd8 "[-u <user>|-A] [-S <socket_path>] <fields> <search query>"} #28 0x00005563bf89b390 in doveadm_cmd_run_ver2 (argc=4, argv=0x5563c13b13c0, cctx=cctx at entry=0x7ffdc7616720) at doveadm-cmd.c:525 param = <optimized out> pargv = {arr = {buffer = 0x5563c13a99c8, element_size = 104}, v = 0x5563c13a99c8, v_modifiable = 0x5563c13a99c8} opts = {arr = {buffer = <optimized out>, element_size = 32}, v <optimized out>, v_modifiable = <optimized out>} pargc = 7 c = <optimized out> li = 21859 pool = 0x5563c13a96f8 optbuf = <optimized out> __FUNCTION__ = "doveadm_cmd_run_ver2" #29 0x00005563bf89b3e7 in doveadm_cmd_try_run_ver2 (cmd_name=<optimized out>, argc=4, argv=0x5563c13b13c0, cctx=0x7ffdc7616720) at doveadm-cmd.c:448 cmd = <optimized out> #30 0x00005563bf87af44 in main (argc=4, argv=0x5563c13b13c0) at doveadm.c:379 cctx = {cmd = 0x5563c13be098, argc = 7, argv = 0x5563c13a9a00, username = 0x5563c13b157e "jason", cli = true, tcp_server = false, local_ip = {family = 0, u = {ip6 = {__in6_u = {__u6_addr8 '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = { s_addr = 0}}}, local_port = 0, remote_port = 0, conn = 0x0} cmd_name = 0x5563c13b1404 "fetch" quick_init = false c = <optimized out> (gdb) Aki Tuomi wrote on 26/3/19 7:28 pm:> What's non-trivial about apt-get install dovecot-dbg? > > Aki > > On 26.3.2019 5.38, Jason Lewis via dovecot wrote: >> After some investigation, it turns out it is non trivial to install >> dovecot-dbg on debian jessie. >> >> Sorry I can't investigate further. >> >> Jason >> >> Aki Tuomi wrote on 25/3/19 6:12 pm: >>> Can you install dovecot-dbg and try gdb again? >>> >>> Aki >>> >>> On 25.3.2019 3.20, Jason Lewis via dovecot wrote: >>> >-- Jason Lewis http://emacstragic.net
Timo Sirainen
2019-Mar-27 13:16 UTC
v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
On 27 Mar 2019, at 1.25, Jason Lewis via dovecot <dovecot at dovecot.org> wrote:> > Hi Aki, > > debian jessie backports has been moved to archive.debian.org and > initially I was unable to install dovecot-dbg because of that. But I've > managed to resolve that issue now. > > This was the command I ran: > doveadm -D -f flow fetch imap.envelope mailbox crm-spam.2008.g > > Backtrace follows.I've a feeling Debian's security fix backports didn't work properly:> #5 0x00007f3a7c34a97d in rfc822_parser_deinit (ctx=0x7ffdc7615e38, > ctx=0x7ffdc7615e38) at rfc822-parser.h:23rfc822_parser_deinit() wasn't added until v2.2.31. I think it was added as part of a security fix.> data=data at entry=0x5563c13f3910 "To: bluefrog at dickson.st, > jason at dickson.st, lewisjason at dickson.st, 05 Jul 2008 16:39:47 -0500 > PDT6Q--q=dns; c=nofws;d sender) > smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) > hea"..., size=size at entry=64,I tried fetching a mail with these contents in v2.2.27, v2.2.33 and master. They all worked fine.
Jason Lewis
2019-Mar-28 00:08 UTC
v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
Thanks Timo. Given the age of these dovecot packages, and this being on debian oldstable, what should we do next? I'm inclined to just delete the email in question and move on. Jason Timo Sirainen wrote on 28/3/19 12:16 am:> On 27 Mar 2019, at 1.25, Jason Lewis via dovecot <dovecot at dovecot.org> wrote: >> >> Hi Aki, >> >> debian jessie backports has been moved to archive.debian.org and >> initially I was unable to install dovecot-dbg because of that. But I've >> managed to resolve that issue now. >> >> This was the command I ran: >> doveadm -D -f flow fetch imap.envelope mailbox crm-spam.2008.g >> >> Backtrace follows. > > I've a feeling Debian's security fix backports didn't work properly: > >> #5 0x00007f3a7c34a97d in rfc822_parser_deinit (ctx=0x7ffdc7615e38, >> ctx=0x7ffdc7615e38) at rfc822-parser.h:23 > > rfc822_parser_deinit() wasn't added until v2.2.31. I think it was added as part of a security fix. > >> data=data at entry=0x5563c13f3910 "To: bluefrog at dickson.st, >> jason at dickson.st, lewisjason at dickson.st, 05 Jul 2008 16:39:47 -0500 >> PDT6Q--q=dns; c=nofws;d sender) >> smtp.mail=Matt_Cooley at postnewsweektech.com; domainkeys=pass (test mode) >> hea"..., size=size at entry=64, > > I tried fetching a mail with these contents in v2.2.27, v2.2.33 and master. They all worked fine. >-- Jason Lewis http://emacstragic.net
Hendrik Boom
2019-Mar-28 17:03 UTC
v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
On Wed, Mar 27, 2019 at 10:25:02AM +1100, Jason Lewis via dovecot wrote:> Hi Aki, > > debian jessie backports has been moved to archive.debian.org and > initially I was unable to install dovecot-dbg because of that. But I've > managed to resolve that issue now.Just curious -- what deb line did you use in /etc/apt/sources.lst to refer to the archived repositories? -- hendrik
Jason Lewis
2019-Mar-28 22:23 UTC
v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
Hi Hendrik, Hendrik Boom via dovecot wrote on 29/3/19 4:03 am:> On Wed, Mar 27, 2019 at 10:25:02AM +1100, Jason Lewis via dovecot wrote: >> Hi Aki, >> >> debian jessie backports has been moved to archive.debian.org and >> initially I was unable to install dovecot-dbg because of that. But I've >> managed to resolve that issue now. > > Just curious -- what deb line did you use in /etc/apt/sources.lst to > refer to the archived repositories? > > -- hendrik >my sources.list: deb http://deb.debian.org/debian jessie main contrib non-free deb http://archive.debian.org/debian jessie-backports main contrib non-free deb http://security.debian.org jessie/updates main contrib non-free deb-src http://deb.debian.org/debian jessie main contrib non-free deb-src http://archive.debian.org/debian jessie-backports main contrib non-free deb-src http://security.debian.org jessie/updates main contrib non-free Jason -- Jason Lewis http://emacstragic.net
Maybe Matching Threads
- v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
- v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
- v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
- v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)
- v2.2.27 Panic: file rfc822-parser.h: line 23 (rfc822_parser_deinit): assertion failed: (ctx->data <= ctx->end)