[Dovecot] dovecot 2.0.beta6 dies when I try to delete a folder with thunderbird
When I try to delete a folder with Thunderbird 3.1 I get the following log entry and the folder is not deleted. Filesystem is ZFS.
Jun 27 15:32:36 azati dovecot: [ID 583609 mail.error] master: Error: service(imap): child 18215 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes) Jun 27 15:32:36 azati dovecot: [ID 583609 mail.error] master: Error: service(imap): child 18213 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
# 2.0.beta6: /etc/opt/dovecot/dovecot/dovecot.conf # OS: SunOS 5.10 i86pc zfs first_valid_uid = 100 mail_location = mdbox:/l/dovecot/%u/dbox namespace { inbox = yes location = prefix = separator = / type = private } passdb { driver = pam } protocols = imap service imap-login { inet_listener imap { port = 0 } } service imap { vsz_limit = 1073741824 } ssl = required ssl_cert = </etc/opt/dovecot/dovecot/certs/dovecot.pem ssl_key = </etc/opt/dovecot/dovecot/private/dovecot.pem userdb { driver = passwd } verbose_proctitle = yes
On Sun, 2010-06-27 at 15:34 +0200, Sven Kirmess wrote:
When I try to delete a folder with Thunderbird 3.1 I get the following log entry and the folder is not deleted. Filesystem is ZFS.
Jun 27 15:32:36 azati dovecot: [ID 583609 mail.error] master: Error: service(imap): child 18215 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
Can you reproduce this by talking imap protocol directly?
telnet localhost 143 a login user pass b delete mailboxname
or possibly
b rename mailboxname Trash/mailboxname
gdb backtrace would be helpful: http://dovecot.org/bugreport.html
I couldn't reproduce this, so it's also possible that it's already been fixed since beta6.
On Mon, Jun 28, 2010 at 22:20, Timo Sirainen <tss@iki.fi> wrote:
On Sun, 2010-06-27 at 15:34 +0200, Sven Kirmess wrote:
When I try to delete a folder with Thunderbird 3.1 I get the following log entry and the folder is not deleted. Filesystem is ZFS.
Jun 27 15:32:36 azati dovecot: [ID 583609 mail.error] master: Error: service(imap): child 18215 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
Can you reproduce this by talking imap protocol directly?
telnet localhost 143 a login user pass b delete mailboxname
or possibly
b rename mailboxname Trash/mailboxname
gdb backtrace would be helpful: http://dovecot.org/bugreport.html
I couldn't reproduce this, so it's also possible that it's already been fixed since beta6.
<http://wiki.dovecot.org/Debugging/Thunderbird> was very helpful. Thanks.
This is how I can reproduce it:
$ openssl s_client -connect localhost:993 -crlf
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in b list "Trash" *
- LIST (\HasNoChildren) "/" "Trash" b OK List completed. c list "test2" *
- LIST (\HasNoChildren) "/" "test2" c OK List completed. d rename "test2" "Trash/test2" closed
And I get this:
dovecot: [ID 583609 mail.error] master: Error: service(imap): child 25432 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
Deleting a mailbox is possible, but not moving it to Trash.
gdb backtrace would be helpful: http://dovecot.org/bugreport.html
I get this message in syslog:
core not dumped - set drop_priv_before_exec=yes
And when I set drop_priv_before_exec=yes in dovecot.conf I get this:
doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
Following http://dovecot.org/bugreport.html I set mail_drop_priv_before_exec=yes in dovecot.conf and get:
doveconf: Warning: Obsolete setting in /etc/opt/dovecot/dovecot/dovecot.conf:86: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
And "disable_plaintext_auth = no" seams to not work in beta6.
On Wed, 2010-06-30 at 21:57 +0200, Sven Kirmess wrote:
$ openssl s_client -connect localhost:993 -crlf
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in b list "Trash" *
- LIST (\HasNoChildren) "/" "Trash" b OK List completed. c list "test2" *
- LIST (\HasNoChildren) "/" "test2" c OK List completed. d rename "test2" "Trash/test2" closed
Works with me.
I get this message in syslog:
core not dumped - set drop_priv_before_exec=yes
And when I set drop_priv_before_exec=yes in dovecot.conf I get this:
doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
Yeah, it doesn't specify that it should be inside service imap {} section.
Following http://dovecot.org/bugreport.html I set mail_drop_priv_before_exec=yes in dovecot.conf and get:
doveconf: Warning: Obsolete setting in /etc/opt/dovecot/dovecot/dovecot.conf:86: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
I don't understand why some people get this error. I haven't been able to reproduce it.
Anyway, there's an easy way now that you can easily reproduce it:
- openssl s_client ..
- login
- gdb -p
pidof imap
cont - make it crash
- gdb should now have stopped, and you can give "bt" command.
On Wed, Jun 30, 2010 at 22:28, Timo Sirainen <tss@iki.fi> wrote:
On Wed, 2010-06-30 at 21:57 +0200, Sven Kirmess wrote:
$ openssl s_client -connect localhost:993 -crlf
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in b list "Trash" *
- LIST (\HasNoChildren) "/" "Trash" b OK List completed. c list "test2" *
- LIST (\HasNoChildren) "/" "test2" c OK List completed. d rename "test2" "Trash/test2" closed
Works with me.
I get this message in syslog:
core not dumped - set drop_priv_before_exec=yes
And when I set drop_priv_before_exec=yes in dovecot.conf I get this:
doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
Yeah, it doesn't specify that it should be inside service imap {} section.
Following http://dovecot.org/bugreport.html I set mail_drop_priv_before_exec=yes in dovecot.conf and get:
doveconf: Warning: Obsolete setting in /etc/opt/dovecot/dovecot/dovecot.conf:86: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
I don't understand why some people get this error. I haven't been able to reproduce it.
Anyway, there's an easy way now that you can easily reproduce it:
- openssl s_client ..
- login
- gdb -p
pidof imap
cont- make it crash
- gdb should now have stopped, and you can give "bt" command.
I can't make it crash. As soon as I attach gdb to the process it doesn't do anything. It just hangs.
$ openssl s_client a login ... a OK ...
ROOT@azati:dovecot> ps -ef|grep imap ski 10682 22251 0 16:40:16 ? 0:00 dovecot/imap dovenull 10679 22251 0 16:40:10 ? 0:00 dovecot/imap-login root 10684 10617 0 16:40:21 pts/3 0:00 grep imap ROOT@azati:dovecot> /opt/gdb/bin/gdb -p 10682 GNU gdb (GDB) 7.1 Copyright (C) 2010 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 "i386-pc-solaris2.10". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Attaching to process 10682 [New process 10682] Retry #1: Retry #2: Retry #3: Retry #4: 0xfecea5b5 in ?? () (gdb)
I typed the following in the openssl d rename "test2" "Trash/test2"
and it just hangs for 2 hours now.
On 10.7.2010, at 19.11, Sven Kirmess wrote:
- gdb -p
pidof imap
cont- make it crash
- gdb should now have stopped, and you can give "bt" command.
I can't make it crash. As soon as I attach gdb to the process it doesn't do anything. It just hangs.
You need to give gdb the "cont" command after attaching to it.
ROOT@azati:dovecot> /opt/gdb/bin/gdb -p 10682 .. 0xfecea5b5 in ?? ()
Also looks like gdb -p isn't working properly. You need to instead use
gdb /path/to/imap pid
Is that what you're looking for?
$ /opt/gdb/bin/gdb /l/sw/opt/dovecot-2.0.beta6/libexec/dovecot/imap 17030 GNU gdb (GDB) 7.1 Copyright (C) 2010 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 "i386-pc-solaris2.10". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /l/sw/opt/dovecot-2.0.beta6/libexec/dovecot/imap...done. Attaching to program `/l/sw/opt/dovecot-2.0.beta6/libexec/dovecot/imap', process 17030 [New process 17030] Retry #1: Retry #2: Retry #3: Retry #4: Reading symbols from /l/sw/opt/dovecot-2.0.beta6/lib/dovecot/libdovecot-storage.so.0...done. Loaded symbols for /l/sw/opt/dovecot-2.0.beta6/lib/dovecot/libdovecot-storage.so.0 Reading symbols from /l/sw/opt/dovecot-2.0.beta6/lib/dovecot/libdovecot.so.0...done. Loaded symbols for /l/sw/opt/dovecot-2.0.beta6/lib/dovecot/libdovecot.so.0 Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libsocket.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libsocket.so.1 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libsendfile.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libsendfile.so.1 Reading symbols from /lib/libc.so.1...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Loaded symbols for /lib/libc.so.1 Reading symbols from /usr/sfw/lib/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/sfw/lib/libgcc_s.so.1 Reading symbols from /lib/libaio.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libaio.so.1 Reading symbols from /lib/libmd.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libmd.so.1 Reading symbols from /lib/ld.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/ld.so.1 [Switching to Thread 1 (LWP 1)] 0xfecea5b5 in __pollsys () from /lib/libc.so.1 (gdb) cont Continuing.
Program received signal SIGSEGV, Segmentation fault. 0xfec65a6c in strlen () from /lib/libc.so.1 (gdb) bt full #0 0xfec65a6c in strlen () from /lib/libc.so.1 No symbol table info available. #1 0xfecc0522 in _ndoprnt () from /lib/libc.so.1 No symbol table info available. #2 0xfecc3657 in vsnprintf () from /lib/libc.so.1 No symbol table info available. #3 0xfeeb7835 in t_noalloc_strdup_vprintf (format=0x0, args=0x8047a74 "", size_r=0x8047a38) at strfuncs.c:120 tmp = 0x80479c0 <error reading variable> init_size = 263 ret = 0 __FUNCTION__ = <error reading variable> #4 0xfeeb78e7 in p_strdup_vprintf (pool=0xfeedd7c4, format=0xfef8ba6d <error reading variable>, args=0x8047a74 "") at strfuncs.c:139 tmp = 0x807a740 <error reading variable> buf = 0xfeedd7c4 <error reading variable> size = 134511208 #5 0xfeeb7c33 in t_strdup_printf (format=0xfef8ba6d <error reading variable>) at strfuncs.c:246 No locals. #6 0xfef4414c in fs_list_get_path (_list=0x80a1de0, name=0x80aa398 <error reading variable>, type=MAILBOX_LIST_PATH_TYPE_ALT_DIR) at mailbox-list-fs.c:202 set = 0x80a1e4c root_dir = 0x80a1ef8 <error reading variable> __FUNCTION__ = <error reading variable> #7 0xfef15957 in mailbox_list_get_path (list=0x0, name=0x80aa398 <error reading variable>, type=MAILBOX_LIST_PATH_TYPE_ALT_DIR) at mailbox-list.c:697 No locals. #8 0xfef44ab7 in fs_list_rename_mailbox (oldlist=0x80a1de0, oldname=0x80a8ab8 <error reading variable>, newlist=0x80a1de0, newname=0x80aa398 <error reading variable>, rename_children=true) at mailbox-list-fs.c:511 oldstorage = 0x80a25e8 oldpath = 0x807a718 <error reading variable> newpath = 0x807a740 <error reading variable> alt_newpath = 0x0 root_path = 0x0 p = 0x0 origin = 0x807a718 <error reading variable> path_type = MAILBOX_LIST_PATH_TYPE_DIR alt_path_type = MAILBOX_LIST_PATH_TYPE_ALT_DIR st = {st_dev = 134914968, st_pad1 = {134719256, 134511400, -18166663}, st_ino = 579455375300886656, st_mode = 11, st_nlink = 4276800613, ---Type <return> to continue, or q <return> to quit--- st_uid = -17967136, st_gid = -17972408, st_rdev = 134511464, st_pad2 = {-18120665, -17253787}, st_size = 577722270097604658, st_atim = {tv_sec = -18120836, tv_nsec = 134719272}, st_mtim = { tv_sec = 1409787720, tv_nsec = 2}, st_ctim = {tv_sec = 32, tv_nsec = 2}, st_blksize = 134719272, st_blocks = -78292241597474463, st_fstype = <error reading variable>, st_pad4 = {134511528, 134719280, 134511496, -18228439, -17135496, 0, 134511544, -17547514}} mode = 4277000160 gid = 12 rmdir_parent = false #9 0xfef549c1 in index_storage_mailbox_rename (src=0x80a8970, dest=0x80aa250, rename_children=true) at index-storage.c:493 guid = <error reading variable> #10 0xfef11fee in mailbox_rename (src=0x80a8970, dest=0x80aa250, rename_children=true) at mail-storage.c:798 No locals. #11 0x0805ab13 in cmd_rename (cmd=0x80a3958) at cmd-rename.c:62 status = MAILBOX_NAME_VALID old_ns = 0x8099ff8 new_ns = 0x8099ff8 old_box = 0x80a8970 new_box = 0x80aa250 oldname = 0x80a6208 <error reading variable> newname = 0x80a6210 <error reading variable> storage_oldname = 0x80a6208 <error reading variable> storage_newname = 0x80a6210 <error reading variable> oldlen = 5 #12 0x0805d95e in client_command_input (cmd=0x80a3958) at imap-client.c:646 client = 0x80a3420 command = 0x73 __FUNCTION__ = <error reading variable> #13 0x0805d919 in client_command_input (cmd=0x80a3958) at imap-client.c:696 client = 0x80a3420 command = 0x73 __FUNCTION__ = <error reading variable> #14 0x0805dae3 in client_handle_input (client=0x80a3420) at imap-client.c:736 size = 32 _data_stack_cur_id = 3 ret = 32 remove_io = false handled_commands = false __FUNCTION__ = <error reading variable> #15 0x0805e4ba in client_input (client=0x80a3420) at imap-client.c:788 cmd = 0xfeedc348 ---Type <return> to continue, or q <return> to quit--- output = 0x809a3b4 bytes = 32 __FUNCTION__ = <error reading variable> #16 0xfeeaa677 in io_loop_handler_run (ioloop=0x8083068) at ioloop-poll.c:205 ctx = 0x8083b30 pollfd = 0x2 tv = {tv_sec = 1799, tv_usec = 999206} io = 0x8083488 t_id = 2 msecs = 0 ret = 0 call = true #17 0xfeea9ea5 in io_loop_run (ioloop=0x8083068) at ioloop.c:350 No locals. #18 0xfee995e4 in master_service_run (service=0x8082bc8, callback=0) at master-service.c:480 No locals. #19 0x08065c54 in main (argc=1, argv=0x8047e70) at main.c:359 set_roots = {0x8066800, 0x0} service_flags = 0 storage_service_flags = 134754408 postlogin_socket_path = 0x0 username = 0x0 c = 0 (gdb) cont Continuing. procfs: couldn't find pid -1 in procinfo list. (gdb) quit A debugging session is active.
Inferior 1 [process 17030 ] will be detached.
Quit anyway? (y or n) y Quitting: procfs: couldn't find pid -1 in procinfo list.
On Sat, 2010-07-10 at 22:20 +0200, Sven Kirmess wrote:
#6 0xfef4414c in fs_list_get_path (_list=0x80a1de0, name=0x80aa398 <error reading variable>, type=MAILBOX_LIST_PATH_TYPE_ALT_DIR) at mailbox-list-fs.c:202 set = 0x80a1e4c root_dir = 0x80a1ef8 <error reading variable> __FUNCTION__ = <error reading variable>
I don't think this should be happening.. Did you use Sun Studio to compile it? See what it logs with attached patch.
On Sun, 2010-07-11 at 19:50 +0100, Timo Sirainen wrote:
On Sat, 2010-07-10 at 22:20 +0200, Sven Kirmess wrote:
#6 0xfef4414c in fs_list_get_path (_list=0x80a1de0, name=0x80aa398 <error reading variable>, type=MAILBOX_LIST_PATH_TYPE_ALT_DIR) at mailbox-list-fs.c:202 set = 0x80a1e4c root_dir = 0x80a1ef8 <error reading variable> __FUNCTION__ = <error reading variable>
I don't think this should be happening.. Did you use Sun Studio to compile it? See what it logs with attached patch.
Oh, never mind. There was actually a bug in there and it was already fixed in rc1.
On Sun, Jul 11, 2010 at 20:50, Timo Sirainen <tss@iki.fi> wrote:
On Sat, 2010-07-10 at 22:20 +0200, Sven Kirmess wrote:
#6 0xfef4414c in fs_list_get_path (_list=0x80a1de0, name=0x80aa398 <error reading variable>, type=MAILBOX_LIST_PATH_TYPE_ALT_DIR) at mailbox-list-fs.c:202 set = 0x80a1e4c root_dir = 0x80a1ef8 <error reading variable> __FUNCTION__ = <error reading variable>
I don't think this should be happening.. Did you use Sun Studio to compile it?
I've used gcc to compile it.
$ gcc --version gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Oh, never mind. There was actually a bug in there and it was already fixed in rc1.
RC2 no longer crashes, conformed. Thanks. :)
On Wed, 2010-06-30 at 21:57 +0200, Sven Kirmess wrote:
doveconf: Warning: Obsolete setting in /etc/opt/dovecot/dovecot/dovecot.conf:86: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
I'd like to figure out the cause of this too.. If you do:
cat > test.conf <<EOF mail_drop_priv_before_exec = yes ssl = no EOF doveconf -c test.conf > /dev/null
Does it still show you the Fatal: error? It should only log the first warning.
On Fri, Jul 2, 2010 at 14:12, Timo Sirainen <tss@iki.fi> wrote:
On Wed, 2010-06-30 at 21:57 +0200, Sven Kirmess wrote:
doveconf: Warning: Obsolete setting in /etc/opt/dovecot/dovecot/dovecot.conf:86: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file /etc/opt/dovecot/dovecot/dovecot.conf line 86: Unknown setting: drop_priv_before_exec
I'd like to figure out the cause of this too.. If you do:
cat > test.conf <<EOF mail_drop_priv_before_exec = yes ssl = no EOF doveconf -c test.conf > /dev/null
Does it still show you the Fatal: error? It should only log the first warning.
Sorry for the slow reply. The heat is killing me. :)
ROOT@azati:dovecot> cat test.conf mail_drop_priv_before_exec = yes ssl = no ROOT@azati:dovecot> /opt/dovecot/bin/doveconf -c test.conf >/dev/null doveconf: Warning: Obsolete setting in test.conf:1: mail_drop_priv_before_exec has been replaced by service { drop_priv_before_exec } doveconf: Fatal: Error in configuration file test.conf line 1: Unknown setting: drop_priv_before_exec ROOT@azati:dovecot> uname -a SunOS azati 5.10 Generic_141445-09 i86pc i386 i86pc ROOT@azati:dovecot>
Yes, still loggs the error. (This is beta 6 btw).
participants (2)
-
Sven Kirmess
-
Timo Sirainen