Walter Steiner
2013-Apr-02 09:45 UTC
[Dovecot] v2.2 getting NULL pointer reference with shared namespace in mailbox_tree?
> > With todays nightly: > > > > dsync(wsunpriv at iai.uni-bonn.de): Panic: file imapc-list.c: line 199 (imapc_list_get_vname): assertion failed: (strncmp(prefix, storage_name, prefix_len) == 0 && storage_name[prefix_len] == list->sep) > > Oh, and this would be good to solve too. What does it say with gdb: > > gdb dsync core > fr 5 > p prefix > p storage_name > p prefix_len > p list.sep > p list.ns.prefixThank you very much for your support! [ 20130401 nightly ] The p commands say No symbol ... in current context. Maybe it is "fr 7"? (I'm no gdb user but most of the symbols are defined here) (gdb) fr 7 #7 0xffff80ffb74bc606 in imapc_list_get_vname (_list=0x4b9840, storage_name=0xffff80ffb71d656c "") at imapc-list.c:77 77 if (!imap_arg_get_list(&args[0], &flags) || (gdb) p storage_name $2 = 0xffff80ffb71d656c "" (gdb) p prefix $3 = 0x4c17a0 "INBOX" (gdb) p prefix_len $4 = 5 (gdb) p list.sep $5 = 46 '.' (gdb) p list.ns.prefix There is no member named ns. [ `fr 12` and `p ns.prefix` => $6 = 0x498780 "" ] (gdb) bt full #0 0xffff80ffbc18aaaa in _lwp_kill () from /lib/64/libc.so.1 No symbol table info available. #1 0xffff80ffbc17f2a1 in thr_kill () from /lib/64/libc.so.1 No symbol table info available. #2 0xffff80ffbc12feb9 in raise () from /lib/64/libc.so.1 No symbol table info available. #3 0xffff80ffbc106632 in abort () from /lib/64/libc.so.1 No symbol table info available. #4 0xffff80ffb7694b6f in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:142 backtrace = 0x4920f8 "/m/sw/dc/20130401/lib/dovecot/libdovecot.so.0.0.0'default_fatal_finish+0x26 [0xffff80ffb7694b48] -> /m/sw/dc/20130401/lib/dovecot/libdovecot.so.0.0.0'default_error_handler+0x0 [0xffff80ffb7694bd7] -> "... #5 0xffff80ffb7694bd7 in default_fatal_handler (ctx=0xffff80ffbfffee90, format=0xffff80ffb7560590 "file %s: line %d (%s): assertion failed: (%s)", args=0xffff80ffbfffee70) at failures.c:142 status = 0 #6 0xffff80ffb7694eb8 in i_panic (format=0xffff80ffb7560590 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:142 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0} args = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0xffff80ffbfffef70, reg_save_area = 0xffff80ffbfffeea0}} #7 0xffff80ffb74bc606 in imapc_list_get_vname (_list=0x4b9840, storage_name=0xffff80ffb71d656c "") at imapc-list.c:77 list = (struct imapc_mailbox_list *) 0x4b9840 prefix = 0x4c17a0 "INBOX" prefix_len = 5 __FUNCTION__ = "imapc_list_get_vname" #8 0xffff80ffb74e603b in mailbox_list_get_vname (list=0x4b9840, name=0xffff80ffb71d656c "") at ../../src/lib/array.h:197 No locals. #9 0xffff80ffb71cd0fa in acl_backend_vfile_object_init (_backend=0x4cad10, name=0xffff80ffb71d656c "") at ../../../src/lib/array.h:197 _data_stack_cur_id = 4 backend = (struct acl_backend_vfile *) 0x4cad10 aclobj = (struct acl_object_vfile *) 0x49b520 dir = 0xffff80ffbffff010 "0????\200??\210?\034??\200??le\035??\200??\020?L" vname = 0x8 <Address 0x8 out of bounds> #10 0xffff80ffb71cad88 in acl_object_init_from_name (backend=0x4cad10, name=0xffff80ffb71d656c "") at ../../../src/lib/array.h:197 No locals. #11 0xffff80ffb71cc9b4 in acl_backend_get_default_rights (backend=0x4cad10, mask_r=0xffff80ffbffff0b8) at acl-backend.c:68 No locals. #12 0xffff80ffb71d4ba7 in acl_mailbox_try_list_fast (ctx=0x4fcdb0) at acl-mailbox-list.c:63 alist = (struct acl_mailbox_list *) 0x4b9ad0 backend = (struct acl_backend *) 0x4cad10 idxp = (const unsigned int *) 0x4b9ba0 acl_mask = (const struct acl_mask *) 0xffff80ffb76717e7 nonowner_list_ctx = (struct acl_mailbox_list_context *) 0xffff80ffbffff100 ns = (struct mail_namespace *) 0x4b9770 update_ctx = {iter_ctx = 0x4fce60, tree_ctx = 0x4fce40, glob = 0xffff80ffbffff0b0, leaf_flags = 3077123268, parent_flags = 4294934783, update_only = 0, match_parents = 0} name = 0x2bffff0d0 <Address 0x2bffff0d0 out of bounds> ret = 1 #13 0xffff80ffb71d4f2a in acl_mailbox_list_iter_init (list=0x4b9840, patterns=0xffff80ffbffff200, flags=12) at acl-mailbox-list.c:63 _data_stack_cur_id = 3 alist = (struct acl_mailbox_list *) 0x4b9ad0 ctx = (struct acl_mailbox_list_iterate_context *) 0x4fcdb0 pool = (pool_t) 0x4fcd90 p = 0x474a44 "*" i = 1 inboxcase = true #14 0xffff80ffb74fabb4 in mailbox_list_iter_init_multiple (list=0x4b9840, patterns=0xffff80ffbffff200, flags=12) at mailbox-list-iter.c:98 ctx = (struct mailbox_list_iterate_context *) 0x400 ret = 0 __FUNCTION__ = "mailbox_list_iter_init_multiple" #15 0xffff80ffb74fa72a in mailbox_list_iter_init (list=0x4b9840, pattern=0x474a44 "*", flags=12) at mailbox-list-iter.c:68 patterns = {0x474a44 "*", 0x0} #16 0x0000000000457d20 in dsync_mailbox_tree_fill (tree=0x51af50, ns=0x4b9770, box_name=0x0, box_guid=0x518768 "") at dsync-mailbox-tree-fill.c:23 list_flags = 12 subs_list_flags = 4356 iter = (struct mailbox_list_iterate_context *) 0x2f00002f004b335f node = (struct dsync_mailbox_node *) 0x1bffff348 dup_node1 = (struct dsync_mailbox_node *) 0x455eaa dup_node2 = (struct dsync_mailbox_node *) 0xffff80ffbffff280 info = (const struct mailbox_info *) 0x51bf60 list_pattern = 0x474a44 "*" ret = 0 __FUNCTION__ = "dsync_mailbox_tree_fill" #17 0x000000000044b060 in dsync_brain_mailbox_trees_init (brain=0x518740) at dsync-brain-mailbox-tree.c:31 ns = (struct mail_namespace *) 0x4b9770 #18 0x00000000004487ae in dsync_brain_slave_recv_handshake (brain=0x518740) at dsync-brain.c:99 ibc_set = (const struct dsync_ibc_settings *) 0x4b34a0 __FUNCTION__ = "dsync_brain_slave_recv_handshake" #19 0x0000000000448af7 in dsync_brain_run_real (brain=0x518740, changed_r=0xffff80ffbffff386) at dsync-brain.c:99 changed = false ret = true #20 0x0000000000448ca1 in dsync_brain_run (brain=0x518740, changed_r=0xffff80ffbffff386) at dsync-brain.c:99 _data_stack_cur_id = 2 ret = true #21 0x0000000000445a7e in cmd_dsync_run_local (ctx=0x4a1fe0, user=0x4aab80, brain=0x4b3720, ibc2=0x4b3390) at ../../../src/lib/array.h:197 brain2 = (struct dsync_brain *) 0x518740 user2 = (struct mail_user *) 0x4c03e0 set_parser = (struct setting_parser_context *) 0x4a89f0 set_line = 0x490f60 "mail_location=imapc:" location = 0xffff80ffbffff96b "imapc:" brain1_running = true brain2_running = true changed1 = true changed2 = false ret = 0 __FUNCTION__ = "cmd_dsync_run_local" #22 0x00000000004460ae in cmd_dsync_run (_ctx=0x4a1fe0, user=0x4aab80) at ../../../src/lib/array.h:197 ctx = (struct dsync_cmd_context *) 0x4a1fe0 ibc = (struct dsync_ibc *) 0x4a1400 ibc2 = (struct dsync_ibc *) 0x4b3390 brain = (struct dsync_brain *) 0x4b3720 sync_ns = (struct mail_namespace *) 0x0 brain_flags = 13 remote_errors_logged = false status = 0 ret = 0 #23 0x0000000000429a9a in doveadm_mail_next_user (ctx=0x4a1fe0, input=0xffff80ffbffff520, error_r=0xffff80ffbffff588) at doveadm-mail.c:73 error = 0xffff80ffbffff6a8 "k????\200??" ret = 0 __FUNCTION__ = "doveadm_mail_next_user" #24 0x0000000000429c60 in doveadm_mail_single_user (ctx=0x4a1fe0, input=0xffff80ffbffff520, error_r=0xffff80ffbffff588) at doveadm-mail.c:73 __FUNCTION__ = "doveadm_mail_single_user" #25 0x000000000042a504 in doveadm_mail_cmd (cmd=0x4a1808, argc=5, argv=0xffff80ffbffff6a8) at doveadm-mail.c:73 input = {module = 0x0, service = 0x46b752 "doveadm", username = 0xffff80ffbffff968 "ws", session_id = 0x0, local_ip = {family = 0, u = {ip6 = { _S6_un = {_S6_u8 = '\0' <repeats 15 times>, _S6_u32 = {0, 0, 0, 0}, __S6_align = 0}}, ip4 = {S_un = {S_un_b = {s_b1 = 0 '\0', s_b2 = 0 '\0', s_b3 = 0 '\0', s_b4 = 0 '\0'}, S_un_w = {s_w1 = 0, s_w2 = 0}, S_addr = 0}}}}, remote_ip = {family = 0, u = {ip6 = {_S6_un = { _S6_u8 = '\0' <repeats 15 times>, _S6_u32 = {0, 0, 0, 0}, __S6_align = 0}}, ip4 = {S_un = {S_un_b = {s_b1 = 0 '\0', s_b2 = 0 '\0', s_b3 = 0 '\0', s_b4 = 0 '\0'}, S_un_w = {s_w1 = 0, s_w2 = 0}, S_addr = 0}}}}, local_port = 0, remote_port = 0, userdb_fields = 0x0, flags_override_add = 0, flags_override_remove = 0, no_userdb_lookup = 0} ctx = (struct doveadm_mail_cmd_context *) 0x4a1fe0 getopt_args = 0x48edb8 "+dEfg:l:m:n:Nr:Rs:RAS:u:" wildcard_user = 0x0 error = 0x0 ret = 0 c = -1 #26 0x000000000042a77b in doveadm_mail_try_run (cmd_name=0xffff80ffbffff95b "backup", argc=5, argv=0xffff80ffbffff688) at doveadm-mail.c:73 cmd__foreach_end = (const void *) 0x4a1940 cmd = (const struct doveadm_mail_cmd *) 0x4a1808 cmd_name_len = 6 __FUNCTION__ = "doveadm_mail_try_run" #27 0x000000000043489c in main (argc=5, argv=0xffff80ffbffff688) at doveadm.c:63 service_flags = 10 cmd_name = 0xffff80ffbffff95b "backup" i = 16 quick_init = false c = -1 # doveadm ... output: dsync(ws at iai.uni-bonn.de): Debug: brain M: in state=recv_handshake dsync(ws at iai.uni-bonn.de): Debug: brain M: out state=send_mailbox_tree_deletes changed=1 dsync(ws at iai.uni-bonn.de): Panic: file imapc-list.c: line 199 (imapc_list_get_vname): assertion failed: (strncmp(prefix, storage_name, prefix_len) == 0 && storage_name[prefix_len] == list->sep) dsync(ws at iai.uni-bonn.de): Error: Raw backtrace: /m/sw/dc/20130401/lib/dovecot/libdovecot.so.0.0.0'default_fatal_finish+0x26 [0xffff80ffb7694b48] -> /m/sw/dc/20130401/lib/dovecot/libdovecot.so.0.0.0'default_error_handler+0x0 [0xffff80ffb7694bd7] -> /m/sw/dc/20130401/lib/dovecot/libdovecot.so.0.0.0'i_fatal+0x0 [0xffff80ffb7694eb8] -> /m/sw/dc/20130401/lib/dovecot/libdovecot-storage.so.0.0.0'imapc_list_get_vname+0xdb [0xffff80ffb74bc606] -> /m/sw/dc/20130401/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_get_vname+0x28 [0xffff80ffb74e603b] -> /m/sw/dc/20130401/lib/dovecot/lib01_acl_plugin.so'acl_backend_vfile_object_init+0x92 [0xffff80ffb71cd0fa] -> /m/sw/dc/20130401/lib/dovecot/lib01_acl_plugin.so'acl_object_init_from_name+0x2b [0xffff80ffb71cad88] -> /m/sw/dc/20130401/lib/dovecot/lib01_acl_plugin.so'acl_backend_get_default_rights+0x30 [0xffff80ffb71cc9b4] -> /m/sw/dc/20130401/lib/dovecot/lib01_acl_plugin.so'acl_mailbox_try_list_fast+0xb2 [0xffff80ffb71d4ba7] -> /m/sw/dc/20130401/lib/dovecot/lib01_acl_plugin.so'acl_mailbox_list_iter_init+0x188 [0xffff80ffb71d4f2a] -> /m/sw/dc/20130401/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_iter_init_multiple+0x91 [0xffff80ffb74fabb4] -> /m/sw/dc/20130401/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_iter_init+0x39 [0xffff80ffb74fa72a] -> /m/sw/dc/20130401/bin/doveadm'dsync_mailbox_tree_fill+0x107 [0x457d20] -> /m/sw/dc/20130401/bin/doveadm'dsync_brain_mailbox_trees_init+0x128 [0x44b060] -> /m/sw/dc/20130401/bin/doveadm'dsync_brain_slave_recv_handshake+0x1ad [0x4487ae] -> /m/sw/dc/20130401/bin/doveadm'dsync_brain_run_real+0xe7 [0x448af7] -> /m/sw/dc/20130401/bin/doveadm'dsync_brain_run+0x61 [0x448ca1] -> /m/sw/dc/20130401/bin/doveadm'cmd_dsync_run_local+0x335 [0x445a7e] -> /m/sw/dc/20130401/bin/doveadm'cmd_dsync_run+0x26a [0x4460ae] -> /m/sw/dc/20130401/bin/doveadm'doveadm_mail_next_user+0x189 [0x429a9a] -> /m/sw/dc/20130401/bin/doveadm'doveadm_mail_single_user+0x157 [0x429c60] -> /m/sw/dc/20130401/bin/doveadm'doveadm_mail_cmd+0x3bc [0x42a504] -> /m/sw/dc/20130401/bin/doveadm'doveadm_mail_try_run+0xac [0x42a77b] -> /m/sw/dc/20130401/bin/doveadm'main+0x28b [0x43489c] -> /m/sw/dc/20130401/bin/doveadm'_start+0x6c [0x42906c] Abort (core dumped) # doveconf -n # 20130401 (c75b26e1d17f+): /m/sw/dc/20130401/etc/dovecot/dovecot.conf # OS: SunOS 5.11 i86pc zfs auth_debug = yes auth_debug_passwords = yes auth_default_realm = iai.uni-bonn.de auth_master_user_separator = * auth_mechanisms = plain login auth_verbose = yes auth_verbose_passwords = sha1 base_dir = /var/run/dovecot/ debug_log_path = /tmp/dcd imapc_features = rfc822.size imapc_host = mailbox.iai.uni-bonn.de imapc_list_prefix = INBOX imapc_master_user = ... imapc_password = ... imapc_port = 993 imapc_ssl = imaps imapc_ssl_verify = no imapc_user = %n log_path = /tmp/dce mail_debug = yes mail_gid = dovemail mail_location = sdbox:/m/d/imap/mbox/m/%n mail_plugins = notify mail_log acl quota mail_uid = dovemail namespace inbox { hidden = no inbox = yes list = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / subscriptions = yes type = private } namespace user { hidden = no list = children location = sdbox:/m/d/imap/mbox/m/%%n prefix = user/%%u/ separator = / type = shared } passdb { args = scheme=CRYPT username_format=%u /m/d/etc/user/pw driver = passwd-file } passdb { args = username_format=%n /m/d/etc/user/global/pw-master-giat driver = passwd-file master = yes pass = yes } passdb { args = username_format=%n /m/d/etc/user/global/pw-master-top driver = passwd-file master = yes pass = yes } passdb { args = username_format=%n /m/d/etc/user/global/pw-master-top driver = passwd-file } plugin { acl = vfile:/m/d/etc/acl:cache_secs=300 acl_shared_dict = file:/m/d/etc/shared/mailboxes mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mailbox_create save flag_change mail_log_fields = uid box msgid size } protocols = imap pop3 service auth-worker { user = doveauth } service auth { user = doveauth } service imap-login { process_min_avail = 4 service_count = 1 } service imap { executable = imap process_limit = 1024 } service pop3 { executable = pop3 process_limit = 64 } ssl_cert = </m/sw/dc/a/etc/dovecot/ssl/certs/dovecotCert.pem ssl_key = </m/sw/dc/a/etc/dovecot/ssl/keys/dovecotKey.pem syslog_facility = local6 userdb { args = username_format=%u /m/d/etc/user/db driver = passwd-file override_fields = uid=dovemail gid=dovemail home=/m/d/user/%n } userdb { args = username_format=%n /m/d/etc/user/global/db-master default_fields = quota_rule=*:storage=512M driver = passwd-file override_fields = uid=dovemail gid=dovemail home=/m/d/user/global/%n }
Timo Sirainen
2013-Apr-04 20:04 UTC
[Dovecot] v2.2 getting NULL pointer reference with shared namespace in mailbox_tree?
On 2.4.2013, at 12.45, Walter Steiner <ws+dovecot at iai.uni-bonn.de> wrote:>>> With todays nightly: >>> >>> dsync(wsunpriv at iai.uni-bonn.de): Panic: file imapc-list.c: line 199 (imapc_list_get_vname): assertion failed: (strncmp(prefix, storage_name, prefix_len) == 0 && storage_name[prefix_len] == list->sep)Fixed this and some other stuff in hg.