[Dovecot] Segfault in dovecot 1.2rc2 with quota + public namespace enabled
Hi,
I have configured a public namespace ("#Shared"). Since dovecot 1.2rc2 (1.1.11 worked fine) I get a segfault, if I try to access a folder under this namespace when quota plugin is enabled. When the quota plugin is disabled, accessing those folders works.
$ dovecot -n
# 1.2.rc2: /opt/dovecot/etc/dovecot.conf # OS: Linux 2.6.26-1-686 i686 Debian 5.0 base_dir: /var/run/dovecot protocols: imap pop3 listen: 127.0.0.1,192.168.128.151 ssl_listen: 192.168.128.151 ssl_ca_file: /opt/dovecot/etc/certs/cacert.pem ssl_cert_file: /opt/dovecot/etc/certs/asterixCert.pem ssl_key_file: /opt/dovecot/etc/certs/asterixKey.pem ssl_parameters_regenerate: 0 ssl_cipher_list: ALL:!LOW:!SSLv2 disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /opt/dovecot/libexec/dovecot/imap-login login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login login_user: dovecotl login_process_per_connection: no login_processes_count: 1 login_max_processes_count: 3 max_mail_processes: 100 mail_max_userip_connections: 8 first_valid_uid: 2000 last_valid_uid: 2000 first_valid_gid: 2000 last_valid_gid: 2000 mail_access_groups: dovecot mail_uid: 2000 mail_gid: 2000 mail_location: maildir:~/Maildir mail_debug(default): yes mail_debug(imap): yes mail_debug(pop3): no mail_executable(default): /opt/dovecot/libexec/dovecot/imap mail_executable(imap): /opt/dovecot/libexec/dovecot/imap mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota acl imap_acl fts fts_squat mail_plugins(imap): quota imap_quota acl imap_acl fts fts_squat mail_plugins(pop3): mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3 pop3_no_flag_updates(default): no pop3_no_flag_updates(imap): no pop3_no_flag_updates(pop3): yes namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes namespace: type: public separator: / prefix: #Shared/ location: maildir:/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public list: yes subscriptions: yes namespace: type: shared separator: / prefix: #User/%%u/ location: maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u list: yes auth default: mechanisms: plain login user: dovecota worker_max_count: 3 passdb: driver: passwd-file args: /opt/dovecot/etc/passwd userdb: driver: passwd-file args: /opt/dovecot/etc/passwd socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: dovecota group: dovecot plugin: sieve: ~/.dovecot/.dovecot.sieve acl: vfile:/opt/dovecot/etc/dovecot-acls acl_shared_dict: file:/var/lib/dovecot/shared-mailboxes.db acl_anyone: allow quota: dict:user::file:%h/Maildir/dovecot-quota quota_rule: *:storage=10G:messages=500000 fts: squat fts_squat: partial=4 full=10
$ gdb /opt/dovecot/libexec/dovecot/imap /var/spool/dovecot/users/markus/core
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 "i486-linux-gnu"...
warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/i686/cmov/libdl.so.2...done. Loaded symbols for /lib/i686/cmov/libdl.so.2 Reading symbols from /lib/i686/cmov/libc.so.6...done. Loaded symbols for /lib/i686/cmov/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so Reading symbols from /lib/i686/cmov/libnss_compat.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_compat.so.2 Reading symbols from /lib/i686/cmov/libnsl.so.1...done. Loaded symbols for /lib/i686/cmov/libnsl.so.1 Reading symbols from /lib/i686/cmov/libnss_nis.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_nis.so.2 Reading symbols from /lib/i686/cmov/libnss_files.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_files.so.2 Core was generated by `imap'. Program terminated with signal 11, Segmentation fault. [New process 31957] #0 0x080ec1e2 in array_idx_modifiable_i (array=0x18, idx=0) at array.c:10 10 pos = idx * array->element_size; (gdb) bt full #0 0x080ec1e2 in array_idx_modifiable_i (array=0x18, idx=0) at array.c:10 pos = 0 #1 0xb7dbf88a in quota_get_mail_user_quota (user=0x0) at quota-storage.c:482 No locals. #2 0xb7db98d8 in quota_transaction_begin (box=0x9771440) at quota.c:739 user = (struct mail_user *) 0x0 #3 0xb7dbfdee in quota_mailbox_transaction_begin (box=0x9771440, flags=MAILBOX_TRANSACTION_FLAG_HIDE) at quota-storage.c:87 t = (struct mailbox_transaction_context *) 0x977bac0 qt = <value optimized out> #4 0xb7daf55e in fts_transaction_begin (box=0x9771440, flags=MAILBOX_TRANSACTION_FLAG_HIDE) at fts-storage.c:937 fbox = (struct fts_mailbox *) 0x978ac80 t = <value optimized out> #5 0x080b38ae in mailbox_transaction_begin (box=0x9771440, flags=MAILBOX_TRANSACTION_FLAG_HIDE) at mail-storage.c:787 trans = (struct mailbox_transaction_context *) 0x18 #6 0x08069f2b in imap_fetch_begin (ctx=0x9769d18) at imap-fetch.c:349 No locals. #7 0x08061bb0 in cmd_fetch (cmd=0x9769bd8) at cmd-fetch.c:226 client = <value optimized out> ctx = (struct imap_fetch_context *) 0x9769d18 args = (const struct imap_arg *) 0x976ec58 next_arg = (const struct imap_arg *) 0x18 search_args = (struct mail_search_args *) 0x9773ba8 messageset = <value optimized out> ret = <value optimized out> #8 0x0806700c in client_command_input (cmd=0x9769bd8) at client.c:603 client = (struct client *) 0x9769948 command = <value optimized out> __PRETTY_FUNCTION__ = "client_command_input" #9 0x080670a9 in client_command_input (cmd=0x9769bd8) at client.c:652 client = (struct client *) 0x9769948 command = <value optimized out> __PRETTY_FUNCTION__ = "client_command_input" #10 0x080676ed in client_handle_input (client=0x9769948) at client.c:693 _data_stack_cur_id = 3 ret = <value optimized out> remove_io = <value optimized out> handled_commands = false #11 0x08067ba3 in client_input (client=0x9769948) at client.c:748 cmd = <value optimized out> output = (struct ostream *) 0x9769afc bytes = <value optimized out> __PRETTY_FUNCTION__ = "client_input" #12 0x080f73f0 in io_loop_handler_run (ioloop=0x9762ae8) at ioloop-epoll.c:208 ctx = (struct ioloop_handler_context *) 0x9762bf0 event = (const struct epoll_event *) 0x9762c30 list = (struct io_list *) 0x9769b80 io = (struct io_file *) 0x9769b58 tv = {tv_sec = 1, tv_usec = 729686} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 j = 0 call = <value optimized out> #13 0x080f6880 in io_loop_run (ioloop=0x9762ae8) at ioloop.c:338 No locals. #14 0x080704c5 in main (argc=Cannot access memory at address 0x0 ) at main.c:320 No locals.
-- Markus
On Tue, 2009-04-07 at 15:53 +0200, Markus Werner wrote:
I have configured a public namespace ("#Shared"). Since dovecot 1.2rc2 (1.1.11 worked fine) I get a segfault, if I try to access a folder under this namespace when quota plugin is enabled. When the quota plugin is disabled, accessing those folders works.
This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/f38765916f6d
Hi Timo,
On Tue, Apr 07, 2009 at 12:27:24PM -0400, Timo Sirainen wrote:
On Tue, 2009-04-07 at 15:53 +0200, Markus Werner wrote:
I have configured a public namespace ("#Shared"). Since dovecot 1.2rc2 (1.1.11 worked fine) I get a segfault, if I try to access a folder under this namespace when quota plugin is enabled. When the quota plugin is disabled, accessing those folders works.
This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/f38765916f6d
Not yet:
#0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 49 struct acl_mailbox *abox = ACL_CONTEXT(box); (gdb) bt full #0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 No locals. #1 0xb7dfbc89 in cmd_myrights (cmd=0x85a5bd8) at imap-acl-plugin.c:305 storage = (struct mail_storage *) 0x85a35a8 box = (struct mailbox *) 0x85ad440 mailbox = 0x85aace0 "#Shared/System" real_mailbox = 0x85932c0 "System" rights = <value optimized out> str = <value optimized out> #2 0x0806700c in client_command_input (cmd=0x85a5bd8) at client.c:603 client = (struct client *) 0x85a5948 command = <value optimized out> __PRETTY_FUNCTION__ = "client_command_input" #3 0x080670a9 in client_command_input (cmd=0x85a5bd8) at client.c:652 client = (struct client *) 0x85a5948 command = <value optimized out> __PRETTY_FUNCTION__ = "client_command_input" #4 0x080676ed in client_handle_input (client=0x85a5948) at client.c:693 _data_stack_cur_id = 3 ret = <value optimized out> remove_io = <value optimized out> handled_commands = true #5 0x08067ba3 in client_input (client=0x85a5948) at client.c:748 cmd = <value optimized out> output = (struct ostream *) 0x85a5afc bytes = <value optimized out> __PRETTY_FUNCTION__ = "client_input" #6 0x080f73f0 in io_loop_handler_run (ioloop=0x859eae8) at ioloop-epoll.c:208 ctx = (struct ioloop_handler_context *) 0x859ebf0 event = (const struct epoll_event *) 0x859ec30 list = (struct io_list *) 0x85a5b80 io = (struct io_file *) 0x85a5b58 tv = {tv_sec = 4, tv_usec = 999835} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 j = 0 call = <value optimized out> #7 0x080f6880 in io_loop_run (ioloop=0x859eae8) at ioloop.c:338 No locals. #8 0x080704c5 in main (argc=Cannot access memory at address 0xc ) at main.c:320 No locals.
On Tue, 2009-04-07 at 20:31 +0200, Markus Werner wrote:
#0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 49 struct acl_mailbox *abox = ACL_CONTEXT(box); (gdb) bt full #0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 No locals. #1 0xb7dfbc89 in cmd_myrights (cmd=0x85a5bd8) at imap-acl-plugin.c:305
Another fix: http://hg.dovecot.org/dovecot-1.2/rev/4907cc591449
On Tue, Apr 07, 2009 at 02:42:43PM -0400, Timo Sirainen wrote:
On Tue, 2009-04-07 at 20:31 +0200, Markus Werner wrote:
#0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 49 struct acl_mailbox *abox = ACL_CONTEXT(box); (gdb) bt full #0 0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49 No locals. #1 0xb7dfbc89 in cmd_myrights (cmd=0x85a5bd8) at imap-acl-plugin.c:305
Another fix: http://hg.dovecot.org/dovecot-1.2/rev/4907cc591449
This fixes the problem. Thanks.
participants (2)
-
Markus Werner
-
Timo Sirainen