[Dovecot] Dovecot v2.2.4 (ebbe00999da8) doveadm crash
Hello,
Current Dovecot v2.2 HG crashes using the following command:
$ doveadm mailbox status -A -t unseen 'virtual/unread'
Please see backtrace below and dovecot -n output attached.
Thanks, e-frog
gdb /usr/bin/doveadm 24023 GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu Copyright (C) 2013 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 "i686-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/doveadm...Reading symbols from /usr/lib/debug/usr/bin/doveadm...done. done. Attaching to program: /usr/bin/doveadm, process 24023
warning: unable to open /proc file '/proc/24023/status'
warning: unable to open /proc file '/proc/24023/status' ptrace: No such process. [New LWP 24023]
warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Core was generated by `doveadm mailbox status -A -t unseen virtual/unread'. Program terminated with signal 11, Segmentation fault. #0 i_stream_next_line (stream=0x0) at istream.c:382 382 istream.c: No such file or directory. (gdb) bt full #0 i_stream_next_line (stream=0x0) at istream.c:382 _stream = <optimized out> pos = <optimized out> #1 0xb754656b in auth_master_user_list_next (ctx=0xb91bfbd8) at auth-master.c:689 line = <optimized out> #2 0xb7634a0b in mail_storage_service_all_next (ctx=0xb91c4ba8, username_r=username_r@entry=0xbf8e6630) at mail-storage-service.c:1260 __FUNCTION__ = "mail_storage_service_all_next" #3 0xb7752d46 in doveadm_mail_cmd_get_next_user (ctx=0xb91be478, username_r=0xbf8e6630) at doveadm-mail.c:416 No locals. #4 0xb7753e95 in doveadm_mail_all_users (wildcard_user=0x0, argv=0xb91ba1ec, ctx=0xb91be478) at doveadm-mail.c:368 ret = <optimized out> input = {module = 0x0, service = 0xb77918f3 "doveadm", username = 0xb91bf8a0 "test1@local.lan", session_id = 0x0, 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} user_idx = 0 user = 0xb91bf8a0 "test1@local.lan" error = 0x10 <Address 0x10 out of bounds> #5 doveadm_mail_cmd (argv=0xb91ba1ec, argc=-1189371412, cmd=0xbf8e668c) at doveadm-mail.c:523 ctx = 0xb91be478 getopt_args = <optimized out> ret = <optimized out> c = <optimized out> wildcard_user = 0x0 error = <optimized out> #6 doveadm_mail_try_run (cmd_name=cmd_name@entry=0xb91ba200 "mailbox", argc=5, argc@entry=6, argv=argv@entry=0xb91ba1dc) at doveadm-mail.c:608 cmd = 0xbf8e668c #7 0xb7752903 in main (argc=6, argv=0xb91ba1dc) at doveadm.c:398 cmd_name = 0xb91ba200 "mailbox" i = <optimized out> quick_init = false c = <optimized out> (gdb)
On 16.7.2013, at 20.07, e-frog <e-frog@gmx.de> wrote:
Current Dovecot v2.2 HG crashes using the following command:
$ doveadm mailbox status -A -t unseen 'virtual/unread'
#0 i_stream_next_line (stream=0x0) at istream.c:382 382 istream.c: No such file or directory. (gdb) bt full #0 i_stream_next_line (stream=0x0) at istream.c:382 _stream = <optimized out> pos = <optimized out> #1 0xb754656b in auth_master_user_list_next (ctx=0xb91bfbd8) at auth-master.c:689 line = <optimized out>
Fixed the crash: http://hg.dovecot.org/dovecot-2.2/rev/0cab916b28c6
Although the real problem I think is that you didn't have permissions to connect to the auth-userdb socket.
On 30.07.2013 12:10, wrote Timo Sirainen:
On 16.7.2013, at 20.07, e-frog <e-frog@gmx.de> wrote:
Current Dovecot v2.2 HG crashes using the following command:
$ doveadm mailbox status -A -t unseen 'virtual/unread'
#0 i_stream_next_line (stream=0x0) at istream.c:382 382 istream.c: No such file or directory. (gdb) bt full #0 i_stream_next_line (stream=0x0) at istream.c:382 _stream = <optimized out> pos = <optimized out> #1 0xb754656b in auth_master_user_list_next (ctx=0xb91bfbd8) at auth-master.c:689 line = <optimized out>
Fixed the crash: http://hg.dovecot.org/dovecot-2.2/rev/0cab916b28c6
Thanks, with this change I get an error message instead of the crash: doveadm(test1@local.lan): Fatal: seteuid(0) failed: Operation not permitted
Although the real problem I think is that you didn't have permissions to connect to the auth-userdb socket.
Hmm, doveadm is running as user 'vmail' and auth-userdb socket has the following permissions:
srw------- 1 vmail root 0 Jul 30 13:12 auth-userdb
Which I think should work and actually has worked with all v2.2.x versions so far...
On 30.7.2013, at 15.08, e-frog <e-frog@gmx.de> wrote:
Fixed the crash: http://hg.dovecot.org/dovecot-2.2/rev/0cab916b28c6
Thanks, with this change I get an error message instead of the crash: doveadm(test1@local.lan): Fatal: seteuid(0) failed: Operation not permitted
Try once more with latest hg. Should be at least a different error now?
On 01.08.2013 13:20, wrote Timo Sirainen:
On 30.7.2013, at 15.08, e-frog <e-frog@gmx.de> wrote:
Fixed the crash: http://hg.dovecot.org/dovecot-2.2/rev/0cab916b28c6
Thanks, with this change I get an error message instead of the crash: doveadm(test1@local.lan): Fatal: seteuid(0) failed: Operation not permitted
Try once more with latest hg. Should be at least a different error now?
Hmm, now it's crashing again:
doveadm mailbox status -A -t unseen 'virtual/unread' test1@local.lan unseen=1 Segmentation fault
Please note that it seems to work for the first user but crashes for the second.
Core was generated by `doveadm mailbox status -A -t unseen virtual/unread'. Program terminated with signal 11, Segmentation fault. #0 i_stream_next_line (stream=0x0) at istream.c:382 382 istream.c: No such file or directory. (gdb) bt full #0 i_stream_next_line (stream=0x0) at istream.c:382 _stream = <optimized out> pos = <optimized out> #1 0xb752c711 in auth_master_user_list_next (ctx=0xb7edabc8) at auth-master.c:694 line = <optimized out> #2 0xb761aaeb in mail_storage_service_all_next (ctx=0xb7edfb98, username_r=username_r@entry=0xbf852880) at mail-storage-service.c:1294 __FUNCTION__ = "mail_storage_service_all_next" #3 0xb7736d46 in doveadm_mail_cmd_get_next_user (ctx=0xb7ed9468, username_r=0xbf852880) at doveadm-mail.c:416 No locals. #4 0xb7737e95 in doveadm_mail_all_users (wildcard_user=0x0, argv=0xb7ed51e4, ctx=0xb7ed9468) at doveadm-mail.c:368 ret = <optimized out> input = {module = 0x0, service = 0xb77758f3 "doveadm", username = 0xb7eda890 "test1@local.lan", session_id = 0x0, 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} user_idx = 0 user = 0xb7eda890 "test1@local.lan" error = 0x10 <Address 0x10 out of bounds> #5 doveadm_mail_cmd (argv=0xb7ed51e4, argc=-1209183772, cmd=0xbf8528dc) at doveadm-mail.c:523 ctx = 0xb7ed9468 getopt_args = <optimized out> ret = <optimized out> c = <optimized out> wildcard_user = 0x0 error = <optimized out> #6 doveadm_mail_try_run (cmd_name=cmd_name@entry=0xb7ed51f8 "mailbox", argc=5, argc@entry=6, argv=argv@entry=0xb7ed51d4) at doveadm-mail.c:608 cmd = 0xbf8528dc #7 0xb7736903 in main (argc=6, argv=0xb7ed51d4) at doveadm.c:398 cmd_name = 0xb7ed51f8 "mailbox" i = <optimized out> quick_init = false c = <optimized out>
participants (2)
-
e-frog
-
Timo Sirainen