Il 2012-10-02 21:28 Timo Sirainen ha scritto:
On 19.9.2012, at 16.07, Alessio Cecchi wrote:
#1 0x00007f2fc9fc41b4 in acl_backend_vfile_acllist_try_rebuild ( backend=0x1944240) at acl-backend-vfile-acllist.c:297
This backtrace is rather weird. Could you also do (instead of bt full):
fr 1 p *ns p *ns.user p *auser
It crashes because auser->dict = NULL, but it should never be NULL.
Hi Timo,
this is a new backtrace:
root@demo-vpop ~ # /home/vpopmail/bin/vadduser test160@qboxdns.it qweqweroot@demo-vpop ~ # cat /root/testmail.txt | /usr/local/dovecot-2.1/libexec/dovecot/deliver -d test160@qboxdns.it Segmentation fault (core dumped)
root@demo-vpop ~ # gdb /usr/local/dovecot-2.1/libexec/dovecot/deliver /tmp/10923 GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 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". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/dovecot-2.1/libexec/dovecot/deliver...done.
warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/libdovecot-lda.so.0...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/libdovecot-lda.so.0 Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/libdovecot-storage.so.0...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/libdovecot-storage.so.0 Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/libdovecot.so.0...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/libdovecot.so.0 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libssl.so.0.9.8 Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libcrypto.so.0.9.8 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/lib01_acl_plugin.so...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/lib01_acl_plugin.so Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/lib10_quota_plugin.so...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/lib10_quota_plugin.so Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/lib20_zlib_plugin.so...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/lib20_zlib_plugin.so Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done. Loaded symbols for /lib/libbz2.so.1.0 Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/lib90_sieve_plugin.so...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/lib90_sieve_plugin.so Reading symbols from /usr/local/dovecot-2.1/lib/dovecot/libdovecot-sieve.so.0...done. Loaded symbols for /usr/local/dovecot-2.1/lib/dovecot/libdovecot-sieve.so.0 Core was generated by `/usr/local/dovecot-2.1/libexec/dovecot/deliver -d test160@qboxdns.it'. Program terminated with signal 11, Segmentation fault. #0 acl_lookup_dict_rebuild (dict=0x0) at acl-lookup-dict.c:221 221 if (dict->dict == NULL)
(gdb) fr 1 #1 0x00007f9edac761b4 in acl_backend_vfile_acllist_try_rebuild ( backend=0x2496520) at acl-backend-vfile-acllist.c:297 297 (void)acl_lookup_dict_rebuild(auser->acl_lookup_dict); (gdb) p *ns $1 = {next = 0x2496860, refcount = 1, type = NAMESPACE_PRIVATE, flags = 8235, prefix = 0x24961b0 "", prefix_len = 0, alias_for = 0x0, alias_chain_next = 0x0, user = 0x249a700, owner = 0x249a700, list = 0x249ef40, storage = 0x2496210, set = 0x249b4f0, unexpanded_set = 0x249ab58, mail_set = 0x249b200, destroyed = 0} (gdb) p *ns.user $2 = {pool = 0x249a6e0, v = {deinit = 0x7f9edac7a280 <acl_user_deinit>}, vlast = 0x249bf38, refcount = 1, username = 0x249a7b8 "test160@qboxdns.it", _home = 0x249bb60 "/home/vpopmail/domains/qboxdns.it/test160", uid = 89, gid = 89, service = 0x249bb90 "lda", local_ip = 0x0, remote_ip = 0x0, var_expand_table = 0x249bb98, error = 0x0, set_info = 0x2482ce8, unexpanded_set = 0x249a7d0, set = 0x249b168, namespaces = 0x2496130, storages = 0x24a1e20, hooks = {arr = {buffer = 0x249beb0, element_size = 8}, v = 0x249beb0, v_modifiable = 0x249beb0}, mountpoints = 0x0, module_contexts = {arr = {buffer = 0x249bb00, element_size = 8}, v = 0x249bb00, v_modifiable = 0x249bb00}, home_looked_up = 1, admin = 0, autocreated = 0, initialized = 1, mail_debug = 0, inbox_open_error_logged = 0, fuzzy_search = 0, dsyncing = 0} (gdb) p *auser $3 = {module_ctx = {super = {deinit = 0x7f9edaa68190 <quota_user_deinit>}, reg = 0x7f9edaa68190}, master_user = 0x0, acl_env = 0x249bd88 "vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300", groups = 0x0, acl_lookup_dict = 0x0} (gdb)
and also but full for safety:
(gdb) bt full #0 acl_lookup_dict_rebuild (dict=0x0) at acl-lookup-dict.c:221 ns = <value optimized out> ids_arr = {arr = {buffer = 0x0, element_size = 38363440}, v = 0x0, v_modifiable = 0x0} ids = 0x24787e0 i = <value optimized out> dest = <value optimized out> ret = -601327851 #1 0x00007f9edac761b4 in acl_backend_vfile_acllist_try_rebuild ( backend=0x2496520) at acl-backend-vfile-acllist.c:297 auser = 0x249bf10 iter = 0x0 acllist_path = 0x24787e0 "/home/vpopmail/domains/qboxdns.it/test160/Maildir/dovecot-acl-list" ret = <value optimized out> ns = 0x2496130 output = 0x0 st = {st_dev = 2051, st_ino = 663856, st_nlink = 1, st_mode = 33152, st_uid = 89, st_gid = 89, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1350131151, tv_nsec = 0}, st_mtim = {tv_sec = 1350131151, tv_nsec = 0}, st_ctim = {tv_sec = 1350131151, tv_nsec = 0}, __unused = {0, 0, 0}} path = 0x24783a8 ---Type <return> to continue, or q <return> to quit--- file_mode = 384 dir_mode = 448 gid = 4294967295 list = <value optimized out> info = <value optimized out> rootdir = 0x24787a0 "Sent" origin = 0x249f4c0 "/home/vpopmail/domains/qboxdns.it/test160/Maildir" fd = 8 #2 acl_backend_vfile_acllist_rebuild (backend=0x2496520) at acl-backend-vfile-acllist.c:311 acllist_path = <value optimized out> #3 0x00007f9edac76563 in acl_backend_vfile_acllist_refresh (backend=0x2496520) at acl-backend-vfile-acllist.c:153 __FUNCTION__ = "acl_backend_vfile_acllist_refresh" #4 0x00007f9edac766d5 in acl_backend_vfile_acllist_verify (backend=0x0, name=0x2496800 "", mtime=0) at acl-backend-vfile-acllist.c:343 acllist = <value optimized out> #5 0x00007f9edac750b8 in acl_backend_vfile_object_refresh_cache ( _aclobj=0x24967c0) at acl-backend-vfile.c:858 old_validity = <value optimized out> validity = {global_validity = {last_check = 0, last_read_time = 1350131151, last_mtime = 0, last_size = 0}, local_validity = {last_check = 0, last_read_time = 0, ---Type <return> to continue, or q <return> to quit--- last_mtime = 0, last_size = 0}, mailbox_validity = { last_check = 0, last_read_time = 0, last_mtime = 0, last_size = 0}} mtime = 0 ret = 38387472 #6 0x00007f9edac7325e in acl_backend_get_default_rights (backend=0x2496520, mask_r=0x28) at acl-backend.c:164 No locals. #7 0x00007f9edac795bd in acl_mailbox_try_list_fast (list=0x249ef40, patterns=0x7fff89037330, flags=MAILBOX_LIST_ITER_RETURN_NO_FLAGS) at acl-mailbox-list.c:107 alist = <value optimized out> nonowner_list_ctx = <value optimized out> ret = <value optimized out> backend = 0x2496520 acl_mask = 0x1 ns = 0x2496130 update_ctx = {iter_ctx = 0x7f9edc4bf2c8, tree_ctx = 0x7f9edcbdda88, glob = 0x0, leaf_flags = 4294967295, parent_flags = 0, update_only = 0, match_parents = 0} name = <value optimized out> #8 acl_mailbox_list_iter_init (list=0x249ef40, patterns=0x7fff89037330, flags=MAILBOX_LIST_ITER_RETURN_NO_FLAGS) at acl-mailbox-list.c:194 _data_stack_cur_id = 2 ---Type <return> to continue, or q <return> to quit--- ctx = 0x2498e60 pool = <value optimized out> i = <value optimized out> inboxcase = <value optimized out> #9 0x00007f9edc538d33 in mailbox_list_iter_init_multiple (list=0x249ef40, patterns=0x7fff89037330, flags=MAILBOX_LIST_ITER_RETURN_NO_FLAGS) at mailbox-list-iter.c:158 ctx = <value optimized out> ret = <value optimized out> __FUNCTION__ = "mailbox_list_iter_init_multiple" #10 0x00007f9edc539459 in mailbox_list_iter_init (list=0x0, pattern=<value optimized out>, flags=1350131151) at mailbox-list-iter.c:58 patterns = {0x7f9edaa696dc "*", 0x0} #11 0x00007f9edaa64370 in quota_count_namespace (root=0x2496cb0, bytes_r=<value optimized out>, count_r=0x7fff890373d0) at quota-count.c:73 ctx = 0x7f9edc270ef3 info = <value optimized out> #12 quota_count (root=0x2496cb0, bytes_r=<value optimized out>, count_r=0x7fff890373d0) at quota-count.c:111 i = 0 ret = 0 #13 0x00007f9edaa657ce in dict_quota_count (root=0x0, want_bytes=true, value_r=0x7fff89037418) at quota-dict.c:113 ---Type <return> to continue, or q <return> to quit--- dt = <value optimized out> bytes = 0 count = 0 #14 0x00007f9edaa6595a in dict_quota_update_callback ( ret=<value optimized out>, context=0x249bf10) at quota-dict.c:178 value = 1 #15 0x00007f9edc244258 in client_dict_finish_transaction (dict=0x249eb30, line_r=<value optimized out>) at dict-client.c:265 ctx = 0x24da1b0 #16 client_dict_read_one_line (dict=0x249eb30, line_r=<value optimized out>) at dict-client.c:356 id = 1 line = <value optimized out> ret = 0 __FUNCTION__ = "client_dict_read_one_line" #17 0x00007f9edc244565 in client_dict_wait (_dict=<value optimized out>) at dict-client.c:520 dict = 0x249eb30 line = 0x0 ret = <value optimized out> #18 0x00007f9edaa65ab5 in dict_quota_deinit (_root=<value optimized out>) at quota-dict.c:90 root = 0x2496cb0 ---Type <return> to continue, or q <return> to quit--- #19 0x00007f9edaa61c72 in quota_root_deinit (root=0x0) at quota.c:240 pool = 0x249e900 #20 0x00007f9edaa636e1 in quota_deinit (_quota=0x249bf40) at quota.c:335 quota = 0x2496940 i = 2 #21 0x00007f9edaa681dd in quota_user_deinit (user=0x249a700) at quota-storage.c:412 quser = 0x249bf38 quota_set = 0x2499270 #22 0x00007f9edc53388e in mail_user_unref (_user=<value optimized out>) at mail-user.c:153 user = 0x249a700 __FUNCTION__ = "mail_user_unref" #23 0x0000000000402de2 in main (argc=3, argv=0x247e370) at main.c:481 set_roots = {0x604640, 0x0} ctx = {pool = 0x247ef70, set = 0x24817e8, session = 0x247ef90, dup_ctx = 0x0, session_id = 0x0, src_mail = 0x0, src_envelope_sender = 0x0, dest_user = 0x0, dest_addr = 0x247e3c2 "test160@qboxdns.it", final_dest_addr = 0x247e3c2 "test160@qboxdns.it", dest_mailbox_name = 0x4034d9 "INBOX", dest_mail = 0x0, var_expand_table = 0x0, tried_default_save = true, saved_mail = false, save_dest_mail = false, mailbox_full = false, ---Type <return> to continue, or q <return> to quit--- dsn = false} service_flags = <value optimized out> user = 0x247e3c2 "test160@qboxdns.it" errstr = 0x0 path = 0x7fff89037748 "\351\a" storage_service = 0x24803b0 service_user = 0x2480d58 service_input = {module = 0x4034d5 "lda", service = 0x4034d5 "lda", username = 0x247e3c2 "test160@qboxdns.it", 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 = 0, flags_override_remove = 0, no_userdb_lookup = 0} storage = 0x2496210 user_source = <value optimized out> destaddr_source = 0x403594 "user@hostname" process_euid = <value optimized out> stderr_rejection = false ---Type <return> to continue, or q <return> to quit--- ret = <value optimized out> c = <value optimized out> error = MAIL_ERROR_NONE (gdb)
and this the dovecot configuration:
# dovecot -n # 2.1.9: /usr/local/dovecot-2.1/etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.5 auth_cache_size = 512 k auth_worker_max_count = 60 default_login_user = nobody dict { acl = mysql:/usr/local/dovecot-2.1/etc/dovecot/dovecot-share-folder.conf quota = mysql:/usr/local/dovecot-2.1/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no dotlock_use_excl = no first_valid_gid = 89 first_valid_uid = 89 last_valid_gid = 89 last_valid_uid = 89 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot/dovecot.log mail_fsync = always mail_location = maildir:~/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = quota zlib acl maildir_very_dirty_syncs = yes managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave mmap_disable = yes namespace { list = children location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u prefix = shared/%%n/ separator = / subscriptions = no type = shared } namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } passdb { args = cache_key=%s%u webmail=109.168.113.215 driver = vpopmail } plugin { acl = vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 acl_shared_dict = proxy::acl quota = maildir:UserQuota quota2 = dict:User quota::noenforcing:proxy::quota quota_rule2 = Trash:storage=+100M sieve = ~/.dovecot.sieve sieve_default = /usr/local/dovecot-2.1/etc/dovecot/sieve/default.sieve sieve_dir = ~/sieve } protocols = imap pop3 sieve sendmail_path = /var/qmail/bin/sendmail service auth { unix_listener auth-userdb { group = vchkpw mode = 0660 user = vpopmail } } service dict { unix_listener dict { group = vchkpw mode = 0660 user = vpopmail } } service imap-login { service_count = 0 } service managesieve-login { inet_listener sieve { port = 4190 } } service pop3-login { service_count = 0 } ssl_cert = </etc/ssl/certs/wildcard-cbsolt.net.pem ssl_key = </etc/ssl/private/wildcard-cbsolt.net.key userdb { args = quota_template=quota_rule=*:backend=%q driver = vpopmail } protocol lda { log_path = /var/log/dovecot/lda.log mail_plugins = quota zlib acl sieve } protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags mail_max_userip_connections = 20 mail_plugins = quota zlib acl imap_quota imap_acl } protocol pop3 { mail_max_userip_connections = 5 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
Thanks