[Dovecot] Dovecot v2.0.rc2 (875598cd7e26): Core dump upon client login
Latest HG dies upon client login. Rolling back to 2.0.rc2 (7dd7adba1c9e) restores functionality. Dump attached.
Jul 17 07:31:04 spectre dovecot: master: Dovecot v2.0.rc2 (875598cd7e26) starting up […] Jul 17 07:32:06 spectre dovecot: master: Error: service(imap): child 29169 killed with signal 11 (core dumped)
GNU gdb 6.8-debian Copyright (C) 2008 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"...
warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/dovecot/libdovecot-storage.so.0...Reading symbols from /usr/lib/debug/usr/lib/dovecot/libdovecot-storage.so.0.0.0...done. done. Loaded symbols for /usr/lib/dovecot/libdovecot-storage.so.0 Reading symbols from /usr/lib/dovecot/libdovecot.so.0...Reading symbols from /usr/lib/debug/usr/lib/dovecot/libdovecot.so.0.0.0...done. done. Loaded symbols for /usr/lib/dovecot/libdovecot.so.0 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux-x86-64.so.2...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /usr/lib/dovecot/modules/lib01_acl_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib01_acl_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib01_acl_plugin.so Reading symbols from /usr/lib/dovecot/modules/lib02_imap_acl_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib02_imap_acl_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib02_imap_acl_plugin.so Reading symbols from /usr/lib/dovecot/modules/lib10_quota_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib10_quota_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib10_quota_plugin.so Reading symbols from /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so Reading symbols from /usr/lib/dovecot/modules/lib15_notify_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib15_notify_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib15_notify_plugin.so Reading symbols from /usr/lib/dovecot/modules/lib20_mail_log_plugin.so...Reading symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib20_mail_log_plugin.so...done. done. Loaded symbols for /usr/lib/dovecot/modules/lib20_mail_log_plugin.so Core was generated by `dovecot/imap'. Program terminated with signal 11, Segmentation fault. [New process 29301] #0 notify_transaction_commit (t=0x1ae5a40, changes_r=0x7fff65c9cd10) at notify-storage.c:164 164 notify-storage.c: No such file or directory. in notify-storage.c #0 notify_transaction_commit (t=0x1ae5a40, changes_r=0x7fff65c9cd10) at notify-storage.c:164 lt = (struct notify_transaction_context *) 0x0 #1 0x00007f4518416aed in mailbox_transaction_commit_get_changes (_t=<value optimized out>, changes_r=0x7fff65c9cd10) at mail-storage.c:1194 _data_stack_cur_id = 4 t = (struct mailbox_transaction_context *) 0x1ae5a40 ret = <value optimized out> #2 0x00007f4518416b26 in mailbox_transaction_commit (t=0x28) at mail-storage.c:1178 changes = {pool = 0xbc1, uid_validity = 7456, saved_uids = {arr = {buffer = 0x1ae4960, element_size = 0}, v = 0x1ae4960, v_modifiable = 0x1ae4960}, ignored_modseq_changes = 28149240} ret = <value optimized out> #3 0x0000000000412823 in imap_fetch_deinit (ctx=0x1ad85e0) at imap-fetch.c:568 handler = (const struct imap_fetch_context_handler *) 0x1aedca8 #4 0x000000000040a823 in cmd_fetch_finish (ctx=0x28) at cmd-fetch.c:144 cmd = (struct client_command_context *) 0x1ad83b8 tagged_reply = 0x419c38 "OK Fetch completed." ok_message = 0x419c38 "OK Fetch completed." #5 0x000000000040ad0a in cmd_fetch (cmd=0x1ad83b8) at cmd-fetch.c:236 client = <value optimized out> ctx = (struct imap_fetch_context *) 0x1ad85e0 args = (const struct imap_arg *) 0x1adac10 next_arg = <value optimized out> list_arg = (const struct imap_arg *) 0x7f45181b8c0d search_args = (struct mail_search_args *) 0x1ae49b8 messageset = 0x1adad00 "5195:*" ret = <value optimized out> #6 0x000000000041035c in client_command_input (cmd=0x1ad83b8) at imap-client.c:652 client = (struct client *) 0x1ad7c58 command = <value optimized out> __FUNCTION__ = "client_command_input" #7 0x000000000041040d in client_command_input (cmd=0x1ad83b8) at imap-client.c:702 client = (struct client *) 0x1ad7c58 command = (struct command *) 0x8 __FUNCTION__ = "client_command_input" #8 0x0000000000410585 in client_handle_input (client=0x1ad7c58) at imap-client.c:743 _data_stack_cur_id = 3 ret = 66 remove_io = <value optimized out> handled_commands = false __FUNCTION__ = "client_handle_input" #9 0x0000000000410fb2 in client_input (client=0x1ad7c58) at imap-client.c:794 cmd = <value optimized out> output = (struct ostream *) 0x1ad8238 bytes = <value optimized out> __FUNCTION__ = "client_input" #10 0x00007f45181b3ceb in io_loop_handler_run (ioloop=<value optimized out>) at ioloop-epoll.c:212 ctx = (struct ioloop_handler_context *) 0x1aab7d0 event = (const struct epoll_event *) 0x1aab840 list = (struct io_list *) 0x1ad8310 io = (struct io_file *) 0x1ad82d0 tv = {tv_sec = 1799, tv_usec = 999737} t_id = 2 msecs = <value optimized out> ret = 1 call = <value optimized out> #11 0x00007f45181b2e68 in io_loop_run (ioloop=0x1aab5c0) at ioloop.c:350 No locals. #12 0x00007f45181a27d3 in master_service_run (service=0x1aab490, callback=0x28) at master-service.c:495 No locals. #13 0x0000000000419171 in main (argc=1, argv=0x1aab370) at main.c:358 service_flags = <value optimized out> storage_service_flags = <value optimized out> postlogin_socket_path = 0x0 username = 0x0 c = <value optimized out> set_roots = {0x41c360, 0x0}
# dovecot -n (older HG)
# 2.0.rc2 (7dd7adba1c9e): /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian 5.0.5 auth_verbose = yes mail_location = mdbox:~/mdbox mail_plugins = acl quota managesieve_notify_capability = mailto managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date spamtest spamtestplus virustest namespace { hidden = no inbox = yes location = prefix = separator = / type = private } namespace { list = yes location = maildir:/var/vmail/public:LAYOUT=fs:INDEX=~/public prefix = Public/ separator = / subscriptions = no type = public } passdb { args = username_format=%u /var/vmail/auth.d/%d/passwd driver = passwd-file } plugin { acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300 mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename quota = dict:user::file:%h/mdbox/dovecot-quota quota_rule = *:storage=1GB quota_rule2 = Trash:storage=+10%% sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_global_dir = /var/vmail/conf.d/%d/sieve } protocols = imap lmtp service auth-worker { user = doveauth } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } user = doveauth } service imap-login { inet_listener imap { address = 1.2.3.4 port = 143 } inet_listener imaps { port = 0 } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } ssl_cert = </etc/ssl/certs/host_domain_tld.crt ssl_key = </etc/ssl/private/host_domain_tld.key syslog_facility = local1 userdb { args = username_format=%u /var/vmail/auth.d/%d/passwd driver = passwd-file } verbose_proctitle = yes protocol lmtp { mail_plugins = $mail_plugins sieve } protocol imap { mail_plugins = $mail_plugins imap_acl imap_quota mail_log notify }
On Sat, 2010-07-17 at 08:20 +0200, Thomas Leuxner wrote:
Latest HG dies upon client login. Rolling back to 2.0.rc2 (7dd7adba1c9e) restores functionality. Dump attached.
I can't reproduce this even when using your config. It also shouldn't be crashing where your bt shows it crashing. Try if make clean and reinstall helps? If not, running via valgrind could show something helpful.
Am 19.07.2010 um 19:02 schrieb Timo Sirainen:
I can't reproduce this even when using your config. It also shouldn't be crashing where your bt shows it crashing. Try if make clean and reinstall helps? If not, running via valgrind could show something helpful.
Think I isolated the issue. Removing the 'acl' statement in [90-acl.conf] the crash goes away. Tested with (f178792fb820):
plugin { acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300 }
On Mon, 2010-07-19 at 19:37 +0200, Thomas Leuxner wrote:
Am 19.07.2010 um 19:02 schrieb Timo Sirainen:
I can't reproduce this even when using your config. It also shouldn't be crashing where your bt shows it crashing. Try if make clean and reinstall helps? If not, running via valgrind could show something helpful.
Think I isolated the issue. Removing the 'acl' statement in [90-acl.conf] the crash goes away. Tested with (f178792fb820):
plugin { acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300 }
I guess the crashing mailbox also has some ACLs then?
Am 19.07.2010 um 19:39 schrieb Timo Sirainen:
On Mon, 2010-07-19 at 19:37 +0200, Thomas Leuxner wrote:
Am 19.07.2010 um 19:02 schrieb Timo Sirainen:
I can't reproduce this even when using your config. It also shouldn't be crashing where your bt shows it crashing. Try if make clean and reinstall helps? If not, running via valgrind could show something helpful.
Think I isolated the issue. Removing the 'acl' statement in [90-acl.conf] the crash goes away. Tested with (f178792fb820):
plugin { acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300 }
I guess the crashing mailbox also has some ACLs then?
Indeed. Actually now that you mention I can crash it at will listing any ACL protected folder, folders without ACL survive. The reason for the startup crash was a global INBOX ACL also used.
On Mon, 2010-07-19 at 19:47 +0200, Thomas Leuxner wrote:
Indeed. Actually now that you mention I can crash it at will listing any ACL protected folder, folders without ACL survive. The reason for the startup crash was a global INBOX ACL also used.
Well, I can't.. Can you crash it by running from command line:
/usr/local/libexec/dovecot/imap -u username a select INBOX b fetch 1 body.peek[]
or some other command that crashes it?
Am 19.07.2010 um 19:55 schrieb Timo Sirainen:
Well, I can't.. Can you crash it by running from command line:
/usr/local/libexec/dovecot/imap -u username a select INBOX b fetch 1 body.peek[]
or some other command that crashes it?
Not sure of the dangerous command as the server survives these. Using 'Mail.App' or 'Mutt' on the other hand can produce core dumps at will just by entering a folder...
On Mon, 2010-07-19 at 20:06 +0200, Thomas Leuxner wrote:
Am 19.07.2010 um 19:55 schrieb Timo Sirainen:
Well, I can't.. Can you crash it by running from command line:
/usr/local/libexec/dovecot/imap -u username a select INBOX b fetch 1 body.peek[]
or some other command that crashes it?
Not sure of the dangerous command as the server survives these. Using 'Mail.App' or 'Mutt' on the other hand can produce core dumps at will just by entering a folder...
Use rawlog to see what commands they send: http://wiki2.dovecot.org/Debugging/Rawlog
Am 19.07.2010 um 20:08 schrieb Timo Sirainen:
Use rawlog to see what commands they send: http://wiki2.dovecot.org/Debugging/Rawlog
Traced and found sequence to crash:
/usr/lib/dovecot/imap -u user
4.4 LIST "" "" 5.4 LSUB "" * 6.4 NAMESPACE 7.4 SELECT Trash 8.4 UID SEARCH UID 1:* BEFORE 20-Jun-2010 9.4 CLOSE 4.5 LIST "" "" 5.5 LIST "" * 6.5 SELECT Public/Mailing-Lists/Apache-Users 7.5 FETCH 2365:3389 (FLAGS UID) […]
- 3350 FETCH (FLAGS () UID 3350)
- 3351 FETCH (FLAGS () UID 3351)
- 3352 FETCH (FLAGS () UID 3352) Segmentation fault
On Mon, 2010-07-19 at 20:34 +0200, Thomas Leuxner wrote:
Traced and found sequence to crash:
/usr/lib/dovecot/imap -u user
Probably enough to just do:
6 SELECT Public/Mailing-Lists/Apache-Users 7 FETCH 1 (UID)
?
But .. I don't really get it. I guess it has to be related to http://hg.dovecot.org/dovecot-2.0/rev/6b66aad2a997 change. Does reverting that fix it?
What does it log with the attached patch?
Am 19.07.2010 um 20:53 schrieb Timo Sirainen:
Probably enough to just do:
6 SELECT Public/Mailing-Lists/Apache-Users 7 FETCH 1 (UID)
Yes.
- PREAUTH [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 QUOTA ACL RIGHTS=texk] Logged in as user 6 SELECT Public/Mailing-Lists/Apache-Users
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-4 unknown-0 unknown-1 unknown-3 unknown-5 $NotJunk Old NotJunk $Junk)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-4 unknown-0 unknown-1 unknown-3 unknown-5 $NotJunk Old NotJunk $Junk \*)] Flags permitted.
- 3392 EXISTS
- 1 RECENT
- OK [UNSEEN 2098] First unseen.
- OK [UIDVALIDITY 1249133060] UIDs valid
- OK [UIDNEXT 3393] Predicted next UID
- OK [HIGHESTMODSEQ 1365] Highest 6 OK [READ-WRITE] Select completed. 7 FETCH 1 (UID) Warning: commit: trans=0x96c3d0 lt=(nil) lbox=0x964b58 Segmentation fault
What does it log with the attached patch? <notify-debug.diff>
Jul 19 21:08:07 spectre dovecot: imap-login: Login: user=<user>, method=PLAIN, rip=1.2.3.4, lip=10.10.10.10, mpid=7988, TLS Jul 19 21:08:07 spectre dovecot: imap(user): Warning: begin: trans=0x1609500 lt=0x1608c10 lbox=0x15fad88 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: commit: trans=0x1609500 lt=0x1608c10 lbox=0x15fad88 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: begin: trans=0x20ef9a0 lt=0x20f1180 lbox=0x20f6fb8 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: commit: trans=0x20ef9a0 lt=0x20f1180 lbox=0x20f6fb8 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: begin: trans=0x16087d0 lt=0x160a590 lbox=0x15fad88 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: commit: trans=0x16087d0 lt=0x160a590 lbox=0x15fad88 Jul 19 21:08:07 spectre dovecot: imap(user): Warning: commit: trans=0x20dbff0 lt=(nil) lbox=0x20f6e38 Jul 19 21:08:07 spectre dovecot: master: Error: service(imap): child 7986 killed with signal 11 (core dumped)
On Mon, Jul 19, 2010 at 07:53:49PM +0100, Timo Sirainen wrote:
But .. I don't really get it. I guess it has to be related to http://hg.dovecot.org/dovecot-2.0/rev/6b66aad2a997 change. Does reverting that fix it?
Reverting this commit fixes it.
On Tue, 2010-07-20 at 09:10 +0200, Thomas Leuxner wrote:
On Mon, Jul 19, 2010 at 07:53:49PM +0100, Timo Sirainen wrote:
But .. I don't really get it. I guess it has to be related to http://hg.dovecot.org/dovecot-2.0/rev/6b66aad2a997 change. Does reverting that fix it?
Reverting this commit fixes it.
How are you compiling Dovecot? What gcc version? Do you give any special parameters?
On Tue, 2010-07-20 at 14:56 +0100, Timo Sirainen wrote:
On Tue, 2010-07-20 at 09:10 +0200, Thomas Leuxner wrote:
On Mon, Jul 19, 2010 at 07:53:49PM +0100, Timo Sirainen wrote:
But .. I don't really get it. I guess it has to be related to http://hg.dovecot.org/dovecot-2.0/rev/6b66aad2a997 change. Does reverting that fix it?
Reverting this commit fixes it.
How are you compiling Dovecot? What gcc version? Do you give any special parameters?
I found one bug, but I don't think it should cause the problem you're seeing..: http://hg.dovecot.org/dovecot-2.0/rev/5179e8f41cf4
On Tue, Jul 20, 2010 at 03:02:32PM +0100, Timo Sirainen wrote:
I found one bug, but I don't think it should cause the problem you're seeing..: http://hg.dovecot.org/dovecot-2.0/rev/5179e8f41cf4
Interesting. With this is does not crash on the INBOX (Global ACL) but on specific mailbox/folder ACLs.
On Tue, Jul 20, 2010 at 03:02:32PM +0100, Timo Sirainen wrote:
I found one bug, but I don't think it should cause the problem you're seeing..: http://hg.dovecot.org/dovecot-2.0/rev/5179e8f41cf4
Even more interesting. It seems this patch prevents crashing the INBOX, but it still would crash on a public namespace with ACLs. As a side effect it seems to break mail read flags, flags don't change for mails. Tested with several mailboxes.
Regards Thomas
On Tue, 2010-07-20 at 16:34 +0200, Thomas Leuxner wrote:
On Tue, Jul 20, 2010 at 03:02:32PM +0100, Timo Sirainen wrote:
I found one bug, but I don't think it should cause the problem you're seeing..: http://hg.dovecot.org/dovecot-2.0/rev/5179e8f41cf4
Even more interesting. It seems this patch prevents crashing the INBOX, but it still would crash on a public namespace with ACLs. As a side effect it seems to break mail read flags, flags don't change for mails. Tested with several mailboxes.
http://hg.dovecot.org/dovecot-2.0/rev/5b3202a069fa fixes everything?
Am 20.07.2010 um 18:22 schrieb Timo Sirainen:
http://hg.dovecot.org/dovecot-2.0/rev/5b3202a069fa fixes everything?
Looks good so far, no crashes, flags working again. Thanks for tracking this down Timo.
On Tue, Jul 20, 2010 at 02:56:44PM +0100, Timo Sirainen wrote:
How are you compiling Dovecot? What gcc version? Do you give any special parameters?
gcc (Debian 4.3.2-1.1) 4.3.2
Using 'dpkg-buildpackage -j4' with standard distro values and pulling sources from Stephan's repo.
participants (2)
-
Thomas Leuxner
-
Timo Sirainen