Marco Giunta
2018-Feb-07 12:22 UTC
BUG: panic when using fs:posix as dict for acl_shared_dict
Hi, I'm using Dovecot 2.2.33.2 on a RHEL 7, new installation. When I use fs:posix as dict for acl_shared_dict, like in Dovecot wiki (https://wiki.dovecot.org/SharedMailboxes/ClusterSetup), doveadm-server crash with error: # doveadm acl set -u USERNAME FOLDER user=DEST_USERNAME lookup read write-seen doveadm(USERNAME): Panic: file dict-fs.c: line 127 (fs_dict_iterate_init): assertion failed: ((flags & DICT_ITERATE_FLAG_RECURSE) == 0) doveadm(USERNAME): Error: Raw backtrace: /usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f0e4a4b23de] -> /usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7f0e4a4b244a] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7f0e4a44377c] -> /usr/lib64/dovecot/libdovecot.so.0(+0x31688) [0x7f0e4a444688] -> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init_multiple+0x4d) [0x7f0e4a47cadd] -> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init+0x29) [0x7f0e4a47cb89] -> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_lookup_dict_rebuild+0x3e1) [0x7f0e49a40371] -> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_acllist_rebuild+0x488) [0x7f0e49a3dd18] -> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_object_update+0x3c7) [0x7f0e49a3e867] -> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_mailbox_update_acl+0x68) [0x7f0e49a41e28] -> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x2c11) [0x7f0e48da1c11] -> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x3060) [0x7f0e48da2060] -> doveadm(+0x2b41c) [0x556f1280b41c] -> doveadm(+0x2c01a) [0x556f1280c01a] -> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x23b) [0x556f1280ce7b] -> doveadm(doveadm_cmd_run_ver2+0x50c) [0x556f1281c73c] -> doveadm(doveadm_cmd_try_run_ver2+0x37) [0x556f1281c7d7] -> doveadm(main+0x1e4) [0x556f127fb944] -> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0e4a071c05] -> doveadm(+0x1bd35) [0x556f127fbd35] Aborted Attached coredump and configuration. I'm not a programmer, but seems that assert is raised by 'fs_dict_iterate_init' function inside 'src/lib-dict-extra/dict-fs.c': static struct dict_iterate_context * fs_dict_iterate_init(struct dict *_dict, const char *const *paths, enum dict_iterate_flags flags) { ... /* these flags are not supported for now */ i_assert((flags & DICT_ITERATE_FLAG_RECURSE) == 0); ... because it is called by 'acl_lookup_dict_iterate_read' function in file 'src/plugins/acl/acl-lookup-dict.c' static void acl_lookup_dict_iterate_read(struct acl_lookup_dict_iter *iter) { ... dict_iter = dict_iterate_init(iter->dict->dict, prefix, DICT_ITERATE_FLAG_RECURSE); ... with DICT_ITERATE_FLAG_RECURSE set. Same problem also with Dovecot 2.3.0. Thanks, Marco -- Marco Giunta - ITCS SysAdmin Via Bonomea, 265 34136 - Trieste, Italy Tel: +39-040-3787-503 Fax: +39-040-3787-244 -------------- next part -------------- # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.21 (92477967) # OS: Linux 3.10.0-693.17.1.el7.x86_64 x86_64 CentOS Linux release 7.4.1708 (Core) auth_debug = yes auth_master_user_separator = * auth_mechanisms = plain login auth_username_format = %Ln auth_verbose = yes auth_verbose_passwords = sha1:6 doveadm_password = # hidden, use -P to show it doveadm_port = 26001 first_valid_uid = 200 hostname = hostname.example.com imap_client_workarounds = delay-newmail imapc_features = rfc822.size fetch-headers imapc_host = hostname.example.com imapc_master_user = dovesuper imapc_password = # hidden, use -P to show it imapc_user = %u lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lda_original_recipient_header = Delivered-To listen = * lmtp_hdr_delivery_address = original lmtp_rcpt_check_quota = yes login_trusted_networks = 10.0.0.0/30 10.0.0.0/30 10.0.0.0/23 mail_fsync = always mail_gid = vmail mail_home = /srv/mail/%1n/%n mail_location = mdbox:~/dbox:ALT=/srv/archives/%1n/%n/dbox:INDEX=/srv/indexes/%1n/%n:VOLATILEDIR=/var/tmp/dovecot-volatile/%1n/%n mail_plugins = acl mailbox_alias quota fts fts_solr mail_prefetch_count = 20 mail_server_admin = mailto:postmaster at example.com mail_shared_explicit_inbox = yes mail_uid = vmail mailbox_list_index = 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 index ihave duplicate mime foreverypart extracttext vacation-seconds spamtest spamtestplus editheader imapflags notify mbox_write_locks = fcntl mdbox_rotate_interval = 1 days mdbox_rotate_size = 64 M mmap_disable = yes namespace inbox { inbox = yes location = mailbox Archives { auto = subscribe special_use = \Archive } mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } namespace others { list = children location = mdbox:%%h/dbox:ALT=/srv/archives/%%1n/%%n/dbox:INDEX=/srv/indexes/%%1n/%%n:INDEXPVT=/srv/indexes/%1n/%n/shared/%%n:VOLATILEDIR=/var/tmp/dovecot-volatile/%1n/%n/shared/%%n prefix = Other Users/%%n/ separator = / subscriptions = no type = shared } passdb { args = /etc/dovecot/passwd.masterusers default_fields = userdb_master_user=%{login_user} driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.masterusers.acl default_fields = userdb_acl_defaults_from_inbox=yes userdb_mail=mdbox:/srv/mail/%1{login_user}/%{login_user}/dbox:ALT=/srv/archives/%1{login_user}/%{login_user}/dbox:INDEX=/srv/indexes/%1{login_user}/%{login_user}:INDEXPVT=/srv/indexes/%1n/%n/master/%{login_user}:VOLATILEDIR=/var/tmp/dovecot-volatile/%1n/%n/master/%{login_user} driver = ldap master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.masterusers.noacl default_fields = userdb_master_user=%{login_user} userdb_mail=mdbox:/srv/mail/%1{login_user}/%{login_user}/dbox:ALT=/srv/archives/%1{login_user}/%{login_user}/dbox:INDEX=/srv/indexes/%1{login_user}/%{login_user}:INDEXPVT=/srv/indexes/%1n/%n/master/%{login_user}:VOLATILEDIR=/var/tmp/dovecot-volatile/%1n/%n/master/%{login_user} driver = ldap master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile:/srv/shared/dovecot/global-acls:cache_secs=300 acl_shared_dict = fs:posix:prefix=/srv/shared/dovecot/shared-acls/ fts = solr fts_autoindex = yes fts_autoindex_max_recent_msgs = 20 fts_index_timeout = 60 fts_solr = url=http://localhost:8983/solr/dovecot/ last_login_dict = fs:posix:prefix=~/ last_login_key = lastlogin mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid from mailbox_alias_new = INBOX_spam mailbox_alias_new2 = Junk E-mail mailbox_alias_new3 = Posta indesiderata mailbox_alias_new4 = Deleted Messages mailbox_alias_new5 = Posta eliminata mailbox_alias_new6 = Sent Messages mailbox_alias_new7 = Posta inviata mailbox_alias_old = Junk mailbox_alias_old2 = Junk mailbox_alias_old3 = Junk mailbox_alias_old4 = Trash mailbox_alias_old5 = Trash mailbox_alias_old6 = Sent mailbox_alias_old7 = Sent quota = count:User quota quota2 = count:Archive quota quota2_rule = *:storage=25GB quota2_warning = storage=95%% quota2-warning 95 %n quota2_warning2 = storage=90%% quota2-warning 90 %n quota2_warning3 = storage=80%% quota2-warning 80 %n quota_rule = *:storage=5GB quota_rule2 = Trash:storage=+10%% quota_rule3 = Archives/*:ignore quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Quota exceeded (mailbox for user is full) quota_status_success = DUNNO quota_vsizes = yes quota_warning = storage=100%% quota-warning 100 %n quota_warning2 = storage=95%% quota-warning 95 %n quota_warning3 = storage=90%% quota-warning 90 %n quota_warning4 = storage=80%% quota-warning 80 %n sieve = file:~/sieve;active=~/.dovecot.sieve sieve_before = /etc/dovecot/sieve/spinsa.sieve sieve_default = /etc/dovecot/sieve/dovecot.sieve sieve_editheader_forbid_add = X-SA-Spam-Score sieve_editheader_forbid_delete = X-SA-Spam-Score sieve_extensions = +notify +imapflags +vacation-seconds +spamtest +spamtestplus +editheader sieve_max_redirects = 16 sieve_spamtest_max_value = 10 sieve_spamtest_status_header = X-SA-Spam-Score sieve_spamtest_status_type = score sieve_vacation_min_period = 0s } pop3_client_workarounds = outlook-no-nuls oe-ns-eoh postmaster_address = postmaster at example.com protocols = imap pop3 lmtp sieve rejection_reason = Your message to <%t> was automatically rejected for the following reason - il tuo messaggio a <%t> ? stato rifiutato per il seguente motivo:%n%n%r rejection_subject = Rejected - Messaggio rifiutato: %s service auth { inet_listener { port = 49494 } unix_listener auth-userdb { user = vmail } } service dict { unix_listener dict { mode = 0660 user = vmail } } service doveadm { inet_listener { port = 12345 } } service imap-login { process_min_avail = 4 service_count = 0 } service imap { process_limit = 2048 } service lmtp { inet_listener lmtp { port = 24 } process_limit = 25 process_min_avail = 10 user = vmail } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } process_min_avail = 4 service_count = 0 vsz_limit = 256 M } service quota-status { client_limit = 1 executable = /usr/libexec/dovecot/quota-status -p postfix inet_listener { port = 25001 } } service quota-warning { executable = script /srv/shared/bin/dovecot-quota-warning.sh unix_listener quota-warning { user = vmail } user = vmail } service quota2-warning { executable = script /srv/shared/bin/dovecot-quota2-warning.sh unix_listener quota2-warning { user = vmail } user = vmail } shutdown_clients = no ssl = required ssl_cert = </etc/pki/dovecot/certs/hostname-crt.pem ssl_client_ca_file = /etc/pki/tls/cert.pem ssl_dh_parameters_length = 2048 ssl_key = # hidden, use -P to show it ssl_protocols = !SSLv2 !SSLv3 submission_host = smtp.example.com:25 syslog_facility = local2 userdb { driver = prefetch } userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } verbose_proctitle = yes protocol lmtp { mail_plugins = acl mailbox_alias quota fts fts_solr sieve postmaster_address = postmaster at example.com } protocol quota-status { auth_master_user_separator = } protocol imap { mail_max_userip_connections = 50 mail_plugins = acl mailbox_alias quota fts fts_solr imap_quota imap_acl last_login mail_log notify } protocol sieve { mail_max_userip_connections = 50 } protocol pop3 { mail_max_userip_connections = 50 } -------------- next part -------------- #0 0x00007f64c0f791f7 in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x00007f64c0f7a8e8 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x00007f64c13a63d6 in default_fatal_finish (type=<optimized out>, status=status at entry=0) at failures.c:201 backtrace = 0x56481e754ef8 "/usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f64c13a63de] -> /usr/lib64/dovecot/libdovecot.so.0(+0x9f4be) [0x7f64c13a64be] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7f64c133777c] -> /usr"... #3 0x00007f64c13a64be in i_internal_fatal_handler (ctx=0x7ffef8fda890, format=<optimized out>, args=<optimized out>) at failures.c:670 status = 0 #4 0x00007f64c133777c in i_panic (format=format at entry=0x7f64c13da578 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:275 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7ffef8fda990, reg_save_area = 0x7ffef8fda8d0}} #5 0x00007f64c1338688 in fs_dict_iterate_init (_dict=<optimized out>, paths=<optimized out>, flags=DICT_ITERATE_FLAG_RECURSE) at dict-fs.c:127 dict = 0x56481e784bf0 iter = <optimized out> __FUNCTION__ = "fs_dict_iterate_init" #6 0x00007f64c1370add in dict_iterate_init_multiple (dict=0x56481e784bf0, paths=paths at entry=0x7ffef8fda9f0, flags=flags at entry=DICT_ITERATE_FLAG_RECURSE) at dict.c:183 ctx = <optimized out> i = 1 __FUNCTION__ = "dict_iterate_init_multiple" #7 0x00007f64c1370b89 in dict_iterate_init (dict=<optimized out>, path=path at entry=0x7f64c0b3b126 "shared/shared-boxes/", flags=flags at entry=DICT_ITERATE_FLAG_RECURSE) at dict.c:164 paths = {0x7f64c0b3b126 "shared/shared-boxes/", 0x0} #8 0x00007f64c0b37371 in acl_lookup_dict_rebuild_update (no_removes=false, new_ids_arr=0x7ffef8fdaa90, dict=0x56481e776f60) at acl-lookup-dict.c:168 iter = 0x0 dt = 0x0 value = 0x56481e754a38 "user/DEST_USERNAME/USERNAME" new_ids = <optimized out> prefix_len = 20 Missing separate debuginfos, use: debuginfo-install expat-2.1.0-10.el7_3.x86_64 glibc-2.17-196.el7_4.2.x86_64 libgcc-4.8.5-16.el7_4.1.x86_64 zlib-1.2.7-17.el7.x86_64 ret = <optimized out> old_ids_arr = {arr = {buffer = 0x56481e754a68, element_size = 8}, v = 0x56481e754a68, v_modifiable = 0x56481e754a68} newi = <optimized out> path = <optimized out> username = 0x56481e780980 "USERNAME" prefix = 0x7f64c0b3b126 "shared/shared-boxes/" key = 0x56481e7aac98 "FOLDER" oldi = <optimized out> old_count = <optimized out> old_ids = <optimized out> p = <optimized out> #9 acl_lookup_dict_rebuild (dict=0x56481e776f60) at acl-lookup-dict.c:255 ns = <optimized out> ids_arr = {arr = {buffer = 0x56481e7544a8, element_size = 8}, v = 0x56481e7544a8, v_modifiable = 0x56481e7544a8} i = <optimized out> dest = <optimized out> count = <optimized out> ret = <optimized out> #10 0x00007f64c0b34d18 in acl_backend_vfile_acllist_try_rebuild (backend=0x56481e7888d8) at acl-backend-vfile-acllist.c:319 auser = <optimized out> ns = 0x56481e773e70 iter = 0x0 acllist_path = 0x56481e754460 "/srv/mail/U/USERNAME/dbox/dovecot-acl-list" output = 0x0 perm = {file_uid = 1000, file_gid = 1000, file_create_mode = 384, dir_create_mode = 448, file_create_gid = 4294967295, file_create_gid_origin = 0x56481e786dc0 "/srv/mail/U/USERNAME/dbox", gid_origin_is_mailbox_path = false, mail_index_permissions_set = false} type = MAILBOX_LIST_PATH_TYPE_DIR info = <optimized out> fd = 26 ret = 0 list = <optimized out> rootdir = 0x56481e785ef0 "/srv/mail/U/USERNAME/dbox" st = {st_dev = 42, st_ino = 1111489184, st_nlink = 1, st_mode = 33152, st_uid = 1000, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 20, st_blksize = 65536, st_blocks = 0, st_atim = {tv_sec = 1517997725, tv_nsec = 557150000}, st_mtim = {tv_sec = 1517997725, tv_nsec = 559150000}, st_ctim = {tv_sec = 1517997725, tv_nsec = 559150000}, __unused = {0, 0, 0}} path = 0x56481e753388 #11 acl_backend_vfile_acllist_rebuild (backend=backend at entry=0x56481e7888d8) at acl-backend-vfile-acllist.c:332 acllist_path = 0x56481e754460 "/srv/mail/U/USERNAME/dbox/dovecot-acl-list" #12 0x00007f64c0b35867 in acl_backend_vfile_object_update (_aclobj=0x56481e7e9100, update=0x7ffef8fdaeb0) at acl-backend-vfile-update.c:258 aclobj = 0x56481e7e9100 backend = 0x56481e7888d8 validity = <optimized out> dotlock = 0x0 ut = {actime = 0, modtime = 94867749234000} orig_mtime = 1484044488 path = 0x56481e7b5140 "\340\261z\036HV" i = 1 changed = <optimized out> __FUNCTION__ = "acl_backend_vfile_object_update" #13 0x00007f64c0b38e28 in acl_mailbox_update_acl (t=t at entry=0x56481e7f8010, update=update at entry=0x7ffef8fdaeb0) at acl-mailbox.c:648 aclobj = 0x56481e7e9100 key = 0x56481e753058 "vendor/vendor.dovecot/pvt/acl/user=DEST_USERNAME" ts = 1484044488 #14 0x00007f64c0b326d3 in acl_attribute_update_acl (value=0x7ffef8fdafc0, key=<optimized out>, t=0x56481e7f8010) at acl-attributes.c:53 value_str = 0x56481e798bd0 "lookup read write-seen" id = 0x56481e798bbe "user=DEST_USERNAME" rights = <optimized out> error = 0x7ffef8fdafc0 "?y\036HV" update = {rights = {id_type = ACL_ID_USER, identifier = 0x56481e798bc3 "DEST_USERNAME", rights = 0x56481e752f00, neg_rights = 0x0, global = 0}, modify_mode = ACL_MODIFY_MODE_REPLACE, neg_modify_mode = ACL_MODIFY_MODE_CLEAR, last_change = 1484044488} #15 acl_attribute_set (t=0x56481e7f8010, type=<optimized out>, key=<optimized out>, value=0x7ffef8fdafc0) at acl-attributes.c:148 abox = 0x56481e7e6ec8 #16 0x00007f64c168bde5 in mailbox_attribute_set_common (t=0x56481e7f8010, type=MAIL_ATTRIBUTE_TYPE_SHARED, key=<optimized out>, value=0x7ffef8fdafc0) at mailbox-attribute.c:221 iattr = 0x0 ret = <optimized out> #17 0x00007f64c168c2c5 in mailbox_attribute_set (t=<optimized out>, type=<optimized out>, key=<optimized out>, value=<optimized out>) at mailbox-attribute.c:230 No locals. #18 0x000056481d771f47 in dsync_mailbox_import_attribute_real (result_r=<synthetic pointer>, local_attr=<optimized out>, attr=0x56481e798b68, importer=0x56481e7dff48) at dsync-mailbox-import.c:547 value = {value = 0x56481e798bd0 "lookup read write-seen", value_stream = 0x0, last_change = 1484044488, flags = (unknown: 0)} cmp = <optimized out> ignore = false #19 dsync_mailbox_import_attribute (importer=0x56481e7dff48, attr=0x56481e798b68) at dsync-mailbox-import.c:569 local_attr = <optimized out> result = 0x56481d78eb72 "Nonexistent locally" ret = <optimized out> #20 0x000056481d76d7e0 in dsync_brain_recv_mailbox_attribute (brain=0x56481e79aef8) at dsync-brain-mails.c:98 attr = 0x56481e798b68 input = 0x0 ret = <optimized out> #21 dsync_brain_sync_mails (brain=brain at entry=0x56481e79aef8) at dsync-brain-mails.c:388 changed = false __FUNCTION__ = "dsync_brain_sync_mails" #22 0x000056481d7692c1 in dsync_brain_run_real (changed_r=0x7ffef8fdb167, brain=0x56481e79aef8) at dsync-brain.c:672 ret = true orig_state = DSYNC_STATE_SYNC_MAILS orig_box_recv_state = DSYNC_BOX_STATE_ATTRIBUTES orig_box_send_state = DSYNC_BOX_STATE_MAIL_REQUESTS changed = false #23 dsync_brain_run (brain=brain at entry=0x56481e79aef8, changed_r=changed_r at entry=0x7ffef8fdb167) at dsync-brain.c:705 _data_stack_cur_id = 5 #24 0x000056481d769640 in dsync_brain_run_io (context=0x56481e79aef8) at dsync-brain.c:110 changed = false try_pending = true #25 0x000056481d77e42f in dsync_ibc_stream_input (ibc=0x56481e7988a0) at dsync-ibc-stream.c:233 ibc = 0x56481e7988a0 #26 0x00007f64c13bbcd2 in io_loop_call_io (io=0x56481e799330) at ioloop.c:600 ioloop = 0x56481e75df00 t_id = 4 __FUNCTION__ = "io_loop_call_io" #27 0x00007f64c13bd3bf in io_loop_handler_run_internal (ioloop=ioloop at entry=0x56481e75df00) at ioloop-epoll.c:223 ctx = 0x56481e75f0c0 events = <optimized out> list = 0x56481e75d6d0 io = <optimized out> tv = {tv_sec = 3, tv_usec = 853461} events_count = <optimized out> msecs = <optimized out> ret = 1 i = 0 call = <optimized out> __FUNCTION__ = "io_loop_handler_run_internal" #28 0x00007f64c13bbd6c in io_loop_handler_run (ioloop=ioloop at entry=0x56481e75df00) at ioloop.c:649 No locals. #29 0x00007f64c13bbf28 in io_loop_run (ioloop=0x56481e75df00) at ioloop.c:624 __FUNCTION__ = "io_loop_run" #30 0x000056481d74e4f9 in cmd_dsync_server_run (_ctx=0x56481e76bbf8, user=<optimized out>) at doveadm-dsync.c:1175 ctx = 0x56481e76bbf8 ibc = 0x56481e7988a0 brain = 0x56481e79aef8 temp_prefix = 0x56481e752ad8 state_str = 0x0 sync_type = <optimized out> name = 0x56481e75c690 "10.0.0.137" process_title_prefix = 0x56481e752ab0 "10.0.0.137 " mail_error = 32612 #31 0x000056481d74ff8c in doveadm_mail_next_user (ctx=ctx at entry=0x56481e76bbf8, cctx=cctx at entry=0x7ffef8fdb400, error_r=error_r at entry=0x7ffef8fdb3f8) at doveadm-mail.c:429 input = {module = 0x0, service = 0x56481d786e5b "doveadm", username = 0x56481e74ffba "USERNAME", session_id = 0x0, session_id_prefix = 0x0, session_create_time = 0, local_ip = {family = 2, u = {ip6 = {__in6_u = {__u6_addr8 = "\223z\v\205", '\000' <repeats 11 times>, __u6_addr16 = {31379, 34059, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {2232122003, 0, 0, 0}}}, ip4 = {s_addr = 2232122003}}}, remote_ip = {family = 2, u = {ip6 = {__in6_u = { __u6_addr8 = "\223z\v\211", '\000' <repeats 11 times>, __u6_addr16 = {31379, 35083, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {2299230867, 0, 0, 0}}}, ip4 = { s_addr = 2299230867}}}, local_port = 12345, remote_port = 41111, userdb_fields = 0x0, flags_override_add = (unknown: 0), flags_override_remove = (unknown: 0), no_userdb_lookup = 0, debug = 0} error = 0x1820 <Address 0x1820 out of bounds> ip = <optimized out> ret = <optimized out> __FUNCTION__ = "doveadm_mail_next_user" #32 0x000056481d750a93 in doveadm_mail_single_user (ctx=ctx at entry=0x56481e76bbf8, cctx=cctx at entry=0x7ffef8fdb400, error_r=error_r at entry=0x7ffef8fdb3f8) at doveadm-mail.c:460 __FUNCTION__ = "doveadm_mail_single_user" #33 0x000056481d765bed in doveadm_mail_cmd_server_run (cctx=0x7ffef8fdb400, mctx=0x56481e76bbf8, conn=0x56481e7677d8) at client-connection.c:246 error = 0x7f6400005648 <Address 0x7f6400005648 out of bounds> ret = <optimized out> #34 doveadm_cmd_handle (cctx=0x7ffef8fdb400, argv=0x56481e74fff0, argc=2, cmd_name=<optimized out>, conn=0x56481e7677d8) at client-connection.c:329 ioloop = 0x56481e75df00 mail_cmd = 0x56481e75e0f8 mctx = 0x56481e76bbf8 cmd_ver2 = <optimized out> prev_ioloop = 0x56481e757990 cmd = 0x0 #35 client_handle_command (args=<optimized out>, conn=0x56481e7677d8) at client-connection.c:399 cctx = {cmd = 0x0, argc = 0, argv = 0x0, username = 0x56481e74ffba "USERNAME", cli = false, tcp_server = true, local_ip = {family = 2, u = {ip6 = {__in6_u = { __u6_addr8 = "\223z\v\205", '\000' <repeats 11 times>, __u6_addr16 = {31379, 34059, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {2232122003, 0, 0, 0}}}, ip4 = { s_addr = 2232122003}}}, remote_ip = {family = 2, u = {ip6 = {__in6_u = {__u6_addr8 = "\223z\v\211", '\000' <repeats 11 times>, __u6_addr16 = {31379, 35083, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {2299230867, 0, 0, 0}}}, ip4 = {s_addr = 2299230867}}}, local_port = 12345, remote_port = 41111, conn = 0x56481e7677d8} flags = <optimized out> cmd_name = <optimized out> argc = <optimized out> #36 client_connection_input (conn=0x56481e7677d8) at client-connection.c:541 args = <optimized out> _data_stack_cur_id = 3 line = <optimized out> ok = true minor = 0 #37 0x00007f64c13bbcd2 in io_loop_call_io (io=0x56481e75dea0) at ioloop.c:600 ioloop = 0x56481e757990 t_id = 2 __FUNCTION__ = "io_loop_call_io" #38 0x00007f64c13bd3bf in io_loop_handler_run_internal (ioloop=ioloop at entry=0x56481e757990) at ioloop-epoll.c:223 ctx = 0x56481e765170 events = <optimized out> list = 0x56481e7575c0 io = <optimized out> tv = {tv_sec = 2147483, tv_usec = 0} events_count = <optimized out> msecs = <optimized out> ret = 1 i = 0 call = <optimized out> __FUNCTION__ = "io_loop_handler_run_internal" #39 0x00007f64c13bbd6c in io_loop_handler_run (ioloop=ioloop at entry=0x56481e757990) at ioloop.c:649 No locals. #40 0x00007f64c13bbf28 in io_loop_run (ioloop=0x56481e757990) at ioloop.c:624 __FUNCTION__ = "io_loop_run" #41 0x00007f64c1341fa3 in master_service_run (service=0x56481e757830, callback=callback at entry=0x56481d7680b0 <client_connected>) at master-service.c:719 No locals. #42 0x000056481d7407f1 in main (argc=1, argv=0x56481e7575e0) at main.c:143 set_roots = {0x56481d9aa700 <doveadm_setting_parser_info>, 0x0} input = {roots = 0x7ffef8fdb590, config_path = 0x0, preserve_environment = false, preserve_user = false, preserve_home = false, never_exec = false, use_sysexits = false, parse_full_config = false, module = 0x56481d786e5b "doveadm", service = 0x56481d786e5b "doveadm", username = 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_name = 0x0} output = {specific_services = 0x0, service_uses_local = 0, service_uses_remote = 0, used_local = 0, used_remote = 0, permission_denied = 0} error = 0x7f64c10be2c0 <intel_02_known> "\006\004 " c = <optimized out>
Aki Tuomi
2018-Feb-07 12:23 UTC
BUG: panic when using fs:posix as dict for acl_shared_dict
Hi! Thank you for reporting this issue. We'll look into it. Maybe you can use sqlite3 instead as workaround? Aki On 07.02.2018 14:22, Marco Giunta wrote:> Hi, > I'm using Dovecot 2.2.33.2 on a RHEL 7, new installation. When I use > fs:posix as dict for acl_shared_dict, like in Dovecot wiki > (https://wiki.dovecot.org/SharedMailboxes/ClusterSetup), > doveadm-server crash with error: > > # doveadm acl set -u USERNAME FOLDER user=DEST_USERNAME lookup read > write-seen > > doveadm(USERNAME): Panic: file dict-fs.c: line 127 > (fs_dict_iterate_init): assertion failed: ((flags & > DICT_ITERATE_FLAG_RECURSE) == 0) > doveadm(USERNAME): Error: Raw backtrace: > /usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f0e4a4b23de] -> > /usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) > [0x7f0e4a4b244a] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) > [0x7f0e4a44377c] -> /usr/lib64/dovecot/libdovecot.so.0(+0x31688) > [0x7f0e4a444688] -> > /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init_multiple+0x4d) > [0x7f0e4a47cadd] -> > /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init+0x29) > [0x7f0e4a47cb89] -> > /usr/lib64/dovecot/lib01_acl_plugin.so(acl_lookup_dict_rebuild+0x3e1) > [0x7f0e49a40371] -> > /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_acllist_rebuild+0x488) > [0x7f0e49a3dd18] -> > /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_object_update+0x3c7) > [0x7f0e49a3e867] -> > /usr/lib64/dovecot/lib01_acl_plugin.so(acl_mailbox_update_acl+0x68) > [0x7f0e49a41e28] -> > /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x2c11) > [0x7f0e48da1c11] -> > /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x3060) > [0x7f0e48da2060] -> doveadm(+0x2b41c) [0x556f1280b41c] -> > doveadm(+0x2c01a) [0x556f1280c01a] -> > doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x23b) [0x556f1280ce7b] > -> doveadm(doveadm_cmd_run_ver2+0x50c) [0x556f1281c73c] -> > doveadm(doveadm_cmd_try_run_ver2+0x37) [0x556f1281c7d7] -> > doveadm(main+0x1e4) [0x556f127fb944] -> > /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0e4a071c05] -> > doveadm(+0x1bd35) [0x556f127fbd35] > Aborted > > Attached coredump and configuration. > > I'm not a programmer, but seems that assert is raised by > 'fs_dict_iterate_init' function inside 'src/lib-dict-extra/dict-fs.c': > > static struct dict_iterate_context * > fs_dict_iterate_init(struct dict *_dict, const char *const *paths, > ???????????? enum dict_iterate_flags flags) > { > ... > ??????? /* these flags are not supported for now */ > ????i_assert((flags & DICT_ITERATE_FLAG_RECURSE) == 0); > ... > > > because it is called by 'acl_lookup_dict_iterate_read' function in > file 'src/plugins/acl/acl-lookup-dict.c' > > static void acl_lookup_dict_iterate_read(struct acl_lookup_dict_iter > *iter) > { > ... > dict_iter = dict_iterate_init(iter->dict->dict, prefix, > ????????????????????? DICT_ITERATE_FLAG_RECURSE); > ... > > with DICT_ITERATE_FLAG_RECURSE set. > > > Same problem also with Dovecot 2.3.0. > > Thanks, > ? Marco > >
Marco Giunta
2018-Feb-07 12:35 UTC
BUG: panic when using fs:posix as dict for acl_shared_dict
On 2018-02-07 13:23, Aki Tuomi wrote:> Maybe you can > use sqlite3 instead as workaround?Ok, I try it and let you know. Thanks, Marco -- Marco Giunta - ITCS SysAdmin Via Bonomea, 265 34136 - Trieste, Italy Tel: +39-040-3787-503 Fax: +39-040-3787-244
Marco Giunta
2018-Feb-07 13:05 UTC
BUG: panic when using fs:posix as dict for acl_shared_dict
On 2018-02-07 13:23, Aki Tuomi wrote:> Maybe you can > use sqlite3 instead as workaround?Ok, I've done what you suggested; I had some permissions problems on sqlite file/directory, but now it seems to work. Thanks for your advice, Marco -- Marco Giunta - ITCS SysAdmin Via Bonomea, 265 34136 - Trieste, Italy Tel: +39-040-3787-503 Fax: +39-040-3787-244
Aragon Gouveia
2019-Dec-13 15:40 UTC
BUG: panic when using fs:posix as dict for acl_shared_dict
Hi Aki, I'm not sure if this bug was worked on?? Sadly I ran into it too recently, on version 2.3.4.1. Regards, Aragon On 2018/02/07 13:23, Aki Tuomi wrote:> Hi! > > Thank you for reporting this issue. We'll look into it. Maybe you can > use sqlite3 instead as workaround? > > Aki > > > On 07.02.2018 14:22, Marco Giunta wrote: >> Hi, >> I'm using Dovecot 2.2.33.2 on a RHEL 7, new installation. When I use >> fs:posix as dict for acl_shared_dict, like in Dovecot wiki >> (https://wiki.dovecot.org/SharedMailboxes/ClusterSetup), >> doveadm-server crash with error: >> >> # doveadm acl set -u USERNAME FOLDER user=DEST_USERNAME lookup read >> write-seen >> >> doveadm(USERNAME): Panic: file dict-fs.c: line 127 >> (fs_dict_iterate_init): assertion failed: ((flags & >> DICT_ITERATE_FLAG_RECURSE) == 0) >> doveadm(USERNAME): Error: Raw backtrace: >> /usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f0e4a4b23de] -> >> /usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) >> [0x7f0e4a4b244a] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) >> [0x7f0e4a44377c] -> /usr/lib64/dovecot/libdovecot.so.0(+0x31688) >> [0x7f0e4a444688] -> >> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init_multiple+0x4d) >> [0x7f0e4a47cadd] -> >> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init+0x29) >> [0x7f0e4a47cb89] -> >> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_lookup_dict_rebuild+0x3e1) >> [0x7f0e49a40371] -> >> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_acllist_rebuild+0x488) >> [0x7f0e49a3dd18] -> >> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_object_update+0x3c7) >> [0x7f0e49a3e867] -> >> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_mailbox_update_acl+0x68) >> [0x7f0e49a41e28] -> >> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x2c11) >> [0x7f0e48da1c11] -> >> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x3060) >> [0x7f0e48da2060] -> doveadm(+0x2b41c) [0x556f1280b41c] -> >> doveadm(+0x2c01a) [0x556f1280c01a] -> >> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x23b) [0x556f1280ce7b] >> -> doveadm(doveadm_cmd_run_ver2+0x50c) [0x556f1281c73c] -> >> doveadm(doveadm_cmd_try_run_ver2+0x37) [0x556f1281c7d7] -> >> doveadm(main+0x1e4) [0x556f127fb944] -> >> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0e4a071c05] -> >> doveadm(+0x1bd35) [0x556f127fbd35] >> Aborted >> >> Attached coredump and configuration. >> >> I'm not a programmer, but seems that assert is raised by >> 'fs_dict_iterate_init' function inside 'src/lib-dict-extra/dict-fs.c': >> >> static struct dict_iterate_context * >> fs_dict_iterate_init(struct dict *_dict, const char *const *paths, >> ???????????? enum dict_iterate_flags flags) >> { >> ... >> ??????? /* these flags are not supported for now */ >> ????i_assert((flags & DICT_ITERATE_FLAG_RECURSE) == 0); >> ... >> >> >> because it is called by 'acl_lookup_dict_iterate_read' function in >> file 'src/plugins/acl/acl-lookup-dict.c' >> >> static void acl_lookup_dict_iterate_read(struct acl_lookup_dict_iter >> *iter) >> { >> ... >> dict_iter = dict_iterate_init(iter->dict->dict, prefix, >> ????????????????????? DICT_ITERATE_FLAG_RECURSE); >> ... >> >> with DICT_ITERATE_FLAG_RECURSE set. >> >> >> Same problem also with Dovecot 2.3.0. >> >> Thanks, >> ? Marco >> >>
Apparently Analagous Threads
- BUG: panic when using fs:posix as dict for acl_shared_dict
- BUG: panic when using fs:posix as dict for acl_shared_dict
- BUG: panic when using fs:posix as dict for acl_shared_dict
- Panic: file dict-fs.c:
- BUG: Error: dovecot.index.pvt reset, view is now inconsistent when shared folder is new and empty