[Dovecot] (no subject)

Walter Steiner ws+dovecot at iai.uni-bonn.de
Tue Feb 26 17:40:31 EET 2013


I've run into a problem with `doveadm backup` (2.2 rc2 and 20130226)
I did not notice in 2.1.15

doveadm backup [-Dv] -R -u cyrtest1 at iai.uni-bonn.de -m INBOX imapc:
=> crashes (signal 6 with acl plugin configured, sig 11 without acl)

If this is considered a bug (not just because of the crash but in the
meaning of "my configuration should work") it would be great if it could
be fixed.;-)  If I can provide more detail (log, gdb bt full and doveconf -n
follow the next paragraph) or test something I would be happy to to so.

As I'm planning dsync replication of the two backends I thought it would
be better to start things with the upcoming new dovecot 2.2 (dsync protocol)
instead of 2.1.15. (?!)

--- first some information about what I'm trying to do ---
  We want to replace our single cyrus 2.4 server with two backend servers
  (separate storage and all user mailboxes etc. each)
  Even if cyrus-to-cyrus should be much easier _and_ time is slipping away
  I want to take this one opportunity to switch to dovecot if possible.
 - Thank you very much for your great work on dovecot and all the efforts! -

  We want the IMAP clients to continue using their folders/messages etc
  so I want to reproduce the "cyrus structure" we are using for the last
  14 years:	- own user folders: INBOX and INBOX.subfolder ...
		- (if possible: other user folders: user.otheruser...)
 		- converting as much as possible of existing data

  To get the folders/messages into the new dovecot server(s) I'm
  thinking about some repeated "doveadm mirror / backup -R ... imapc:"
  runs while the cyrus server is still in use.
  The first sync run will take several days but a few more and the time
  will be short enough to do the complete switch-over w/o surprises.
  
  Insertion: I played with 2.1.15 and namespaces but maybe I did not
	understand this well enough:
	doveadm backup -R -u userx [w or w/o -m INBOX and/or -n INBOX] imapc:
	=> if cyrus userx has permissions on other users mailboxes
	    these folders are also copied.  ... copied _into_ the INBOX
	    of (dovecot) userx.
	    I too got the known problems with INBOX.INBOX. paths.
	I changed dsync-brain.c sources to skip "^user." folders
	and to cut the additional "INBOX."
	 => seems okay... messages (only the expected) got transferred!
---

To see if things still work as with 2.1.15 (no dsync source modification!)
I did (as before with 2.1.15):

  doveadm backup [-Dv] -R -u cyrtest1 at iai.uni-bonn.de -m INBOX imapc:

=> but it crashes (signal 6)

doveadm(cyrtest1 at iai.uni-bonn.de): Debug: auth input: cyrtest1 at iai.uni-bonn.de master_user=cyrtest1 at iai.uni-bonn.de quota_rule=*:storage=512M uid=13004 gid=13004 home=/m/d/user/iai.uni-bonn.de/cyrtest1
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Added userdb setting: plugin/master_user=cyrtest1 at iai.uni-bonn.de
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Added userdb setting: plugin/quota_rule=*:storage=512M
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Effective uid=13004, gid=13004, home=/m/d/user/iai.uni-bonn.de/cyrtest1
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=sdbox:/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1:INDEX=/m/d/imap/meta/iai.uni-bonn.de/cyrtest1:MAILBOXDIR=mailboxes/
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: fs: root=/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1, index=/m/d/imap/meta/iai.uni-bonn.de/cyrtest1, indexpvt=, control=, inbox=, alt=
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl: initializing backend with data: vfile:/m/d/etc/acl:cache_secs=300
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl: acl username = cyrtest1 at iai.uni-bonn.de
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl: owner = 1
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: Global ACL directory: /m/d/etc/acl
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: reading file /m/d/etc/acl//.DEFAULT
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: file /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1/mailboxes/dovecot-acl not found
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : Using permissions from /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1: mode=0700 gid=default
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: file /m/d/etc/acl/INBOX not found
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: file /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1/mailboxes/INBOX/dbox-Mails/dovecot-acl not found
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Effective uid=13004, gid=13004, home=/m/d/user/iai.uni-bonn.de/cyrtest1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=imapc:
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc: root=, index=, indexpvt=, control=, inbox=, alt=
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Looking up IP address
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Connecting to 10.11.12.13:993
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Starting SSL handshake
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Server capabilities: IMAP4rev1 LITERAL+ ID ENABLE AUTH=LOGIN AUTH=PLAIN SASL-IR
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Authenticating as cyrusmaster for user cyrtest1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Server capabilities: IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE IDLE
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Authenticated successfully
dsync(cyrtest1 at iai.uni-bonn.de): Debug: acl: initializing backend with data: vfile:/m/d/etc/acl:cache_secs=300
dsync(cyrtest1 at iai.uni-bonn.de): Debug: acl: acl username = cyrtest1 at iai.uni-bonn.de
dsync(cyrtest1 at iai.uni-bonn.de): Debug: acl: owner = 1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: Global ACL directory: /m/d/etc/acl
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=recv_handshake
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=send_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: acl vfile: reading file /m/d/etc/acl//.DEFAULT
dsync(cyrtest1 at iai.uni-bonn.de): Panic: file mailbox-list.c: line 1226: unreached
dsync(cyrtest1 at iai.uni-bonn.de): Error: Raw backtrace: /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot.so.0.0.0'default_fatal_finish+0x26 [0xffff80ff94f93b78] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot.so.0.0.0'default_error_handler+0x0 [0xffff80ff94f93c07] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot.so.0.0.0'i_fatal+0x0 [0xffff80ff94f93ee8] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_get_root_forced+0x48 [0xffff80ff94e46984] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_list_get_root_dir+0x25 [0xffff80ff94c6e3f6] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_list_get_path+0x1f [0xffff80ff94c6e4a4] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_backend_vfile_acllist_read+0x40 [0xffff80ff94c6e4ff] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_backend_vfile_acllist_refresh+0x87 [0xffff80ff94c6e904] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_backend_vfile_acllist_verify+0x44 [0xffff80ff94c6f0a0] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_backend_vfile_object_refresh_cache+0x24f [0xffff80ff94c6d2b4] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_backend_get_default_rights+0x28 [0xffff80ff94c6ad3b] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_mailbox_try_list_fast+0xb2 [0xffff80ff94c72a6b] -> /m/sw/dc/2.2-20130226/lib/dovecot/lib01_acl_plugin.so'acl_mailbox_list_iter_init+0x188 [0xffff80ff94c72dee] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_iter_init_multiple+0x91 [0xffff80ff94e5a120] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot-storage.so.0.0.0'mailbox_list_iter_init+0x39 [0xffff80ff94e59c96] -> /m/sw/dc/2.2-20130226/bin/doveadm'dsync_mailbox_tree_fill+0x103 [0x45443a] -> /m/sw/dc/2.2-20130226/bin/doveadm'dsync_brain_mailbox_trees_init+0x114 [0x448d1c] -> /m/sw/dc/2.2-20130226/bin/doveadm'dsync_brain_slave_recv_handshake+0x18d [0x4464d6] -> /m/sw/dc/2.2-20130226/bin/doveadm'dsync_brain_run_real+0xe7 [0x44681f] -> /m/sw/dc/2.2-20130226/bin/doveadm'dsync_brain_run+0x61 [0x4469c9] -> /m/sw/dc/2.2-20130226/bin/doveadm'cmd_dsync_run_local+0x325 [0x443a5a] -> /m/sw/dc/2.2-20130226/bin/doveadm'cmd_dsync_run+0x23d [0x44405d] -> /m/sw/dc/2.2-20130226/bin/doveadm'doveadm_mail_next_user+0x189 [0x4284ba] -> /m/sw/dc/2.2-20130226/bin/doveadm'doveadm_mail_single_user+0x157 [0x428680] -> /m/sw/dc/2.2-20130226/bin/doveadm'doveadm_mail_cmd+0x3bc [0x428f24] -> /m/sw/dc/2.2-20130226/bin/doveadm'doveadm_mail_try_run+0xac [0x42919b] -> /m/sw/dc/2.2-20130226/bin/doveadm'main+0x286 [0x4332b3] -> /m/sw/dc/2.2-20130226/bin/doveadm'_start+0x6c [0x427a8c]
Abort (core dumped) 

Core was generated by `/m/sw/dc/a/bin/doveadm -Dv backup -R -u cyrtest1 at iai.uni-bonn.de -m INBOX imapc'.
Program terminated with signal 6, Aborted.
[New process 94877    ]
#0  0xffff80ff965aaaaa in _lwp_kill () from /lib/64/libc.so.1
(gdb) bt full
#0  0xffff80ff965aaaaa in _lwp_kill () from /lib/64/libc.so.1
No symbol table info available.
#1  0xffff80ff9659f2a1 in thr_kill () from /lib/64/libc.so.1
No symbol table info available.
#2  0xffff80ff9654feb9 in raise () from /lib/64/libc.so.1
No symbol table info available.
#3  0xffff80ff96526632 in abort () from /lib/64/libc.so.1
No symbol table info available.
#4  0xffff80ff94f93b9f in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:142
        backtrace = 0x48d720 "/m/sw/dc/2.2-20130226/lib/dovecot/libdovecot.so.0.0.0'default_fatal_finish+0x26 [0xffff80ff94f93b78] -> /m/sw/dc/2.2-20130226/lib/dovecot/libdovecot.so.0.0.0'default_error_handler+0x0 [0xffff80ff94f93"...
#5  0xffff80ff94f93c07 in default_fatal_handler (ctx=0xffff80ffbfffe890, format=0xffff80ff94ec64e9 "file %s: line %d: unreached", args=0xffff80ffbfffe870) at failures.c:142
        status = 0
#6  0xffff80ff94f93ee8 in i_panic (format=0xffff80ff94ec64e9 "file %s: line %d: unreached") at failures.c:142
        ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
        args = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0xffff80ffbfffe970, reg_save_area = 0xffff80ffbfffe8a0}}
#7  0xffff80ff94e46984 in mailbox_list_get_root_forced (list=0x4b3150, type=MAILBOX_LIST_PATH_TYPE_DIR) at ../../src/lib/array.h:197
        path = 0x0
#8  0xffff80ff94c6e3f6 in acl_list_get_root_dir (backend=0x4c4050, type_r=0xffff80ffbfffe9fc) at acl-backend-vfile-acllist.c:32
        storage = (struct mail_storage *) 0x4f6440
        rootdir = 0x495c00 "P at L"
        maildir = 0x2004f1400 <Address 0x2004f1400 out of bounds>
#9  0xffff80ff94c6e4a4 in acl_list_get_path (backend=0x4c4050) at acl-backend-vfile-acllist.c:32
        type = MAILBOX_LIST_PATH_TYPE_DIR
#10 0xffff80ff94c6e4ff in acl_backend_vfile_acllist_read (backend=0x4c4050) at acl-backend-vfile-acllist.c:32
        acllist = {mtime = -139639050474768, name = 0xffff80ff94f99fcf "H\211EøH\203}ø"}
        input = (struct istream *) 0x496348
        st = {st_dev = 5295136, st_ino = 4807680, st_mode = 3221219920, st_nlink = 33521919, st_uid = 5203008, st_gid = 0, st_rdev = 66369, st_size = -139639772307599, st_atim = {tv_sec = -139639050474816, tv_nsec = 2496056624}, st_mtim = {tv_sec = 5295136, 
    tv_nsec = -139639772307599}, st_ctim = {tv_sec = 1361888004, tv_nsec = 5182464}, st_blksize = 5295136, st_blocks = 4807280, st_fstype = "Ðêÿ¿ÿ\200ÿÿ\000\024O\000\000\000\000"}
        path = 0x495a70 " \201ÿ\224ÿ\200ÿÿ"
        line = 0x50cc20 ""
        p = 0x4f1400 ""
        fd = -32513
        ret = 0
#11 0xffff80ff94c6e904 in acl_backend_vfile_acllist_refresh (backend=0x4c4050) at acl-backend-vfile-acllist.c:32
        __FUNCTION__ = "acl_backend_vfile_acllist_refresh"
#12 0xffff80ff94c6f0a0 in acl_backend_vfile_acllist_verify (backend=0x4c4050, name=0x50cc20 "", mtime=1361801276) at acl-backend-vfile-acllist.c:32
        acllist = (const struct acl_backend_vfile_acllist *) 0x4f6460
#13 0xffff80ff94c6d2b4 in acl_backend_vfile_object_refresh_cache (_aclobj=0x496330) at ../../../src/lib/array.h:197
        aclobj = (struct acl_object_vfile *) 0x496330
        backend = (struct acl_backend_vfile *) 0x4c4050
        old_validity = (struct acl_backend_vfile_validity *) 0x0
        validity = {global_validity = {last_check = 0, last_read_time = 1361888004, last_mtime = 1361801276, last_size = 395}, local_validity = {last_check = 0, last_read_time = 0, last_mtime = 0, last_size = 0}, mailbox_validity = {last_check = 0, last_read_time = 0, 
    last_mtime = 0, last_size = 0}}
        mtime = 1361801276
        ret = 1
#14 0xffff80ff94c6ad3b in acl_backend_get_default_rights (backend=0x4c4050, mask_r=0xffff80ffbfffec98) at acl-backend.c:68
No locals.
#15 0xffff80ff94c72a6b in acl_mailbox_try_list_fast (ctx=0x513f50) at acl-mailbox-list.c:63
        alist = (struct acl_mailbox_list *) 0x4b33e0
        backend = (struct acl_backend *) 0x4c4050
        idxp = (const unsigned int *) 0x4b34b0
        acl_mask = (const struct acl_mask *) 0xffff80ff94f708cf
        nonowner_list_ctx = (struct acl_mailbox_list_context *) 0xffff80ffbfffece0
        ns = (struct mail_namespace *) 0x4b3080
        update_ctx = {iter_ctx = 0x514000, tree_ctx = 0x513fe0, glob = 0xffff80ffbfffec90, leaf_flags = 2499353844, parent_flags = 4294934783, update_only = 0, match_parents = 0}
        name = 0x6bfffecb0 <Address 0x6bfffecb0 out of bounds>
        ret = 1
#16 0xffff80ff94c72dee in acl_mailbox_list_iter_init (list=0x4b3150, patterns=0xffff80ffbfffede0, flags=MAILBOX_LIST_ITER_NO_AUTO_BOXES) at acl-mailbox-list.c:63
        _data_stack_cur_id = 3
        alist = (struct acl_mailbox_list *) 0x4b33e0
        ctx = (struct acl_mailbox_list_iterate_context *) 0x513f50
        pool = (pool_t) 0x513f30
        p = 0x0
        i = 0
        inboxcase = true
#17 0xffff80ff94e5a120 in mailbox_list_iter_init_multiple (list=0x4b3150, patterns=0xffff80ffbfffede0, flags=MAILBOX_LIST_ITER_NO_AUTO_BOXES) at mailbox-list-iter.c:98
        ctx = (struct mailbox_list_iterate_context *) 0xffff80ffbfffedc0
        ret = 0
        __FUNCTION__ = "mailbox_list_iter_init_multiple"
#18 0xffff80ff94e59c96 in mailbox_list_iter_init (list=0x4b3150, pattern=0x4f3fb8 "INBOX", flags=MAILBOX_LIST_ITER_NO_AUTO_BOXES) at mailbox-list-iter.c:68
        patterns = {0x4f3fb8 "INBOX", 0x0}
#19 0x000000000045443a in dsync_mailbox_tree_fill (tree=0x511b20, ns=0x4b3080, box_name=0x4f3fb8 "INBOX") at dsync-mailbox-tree-fill.c:23
        list_flags = MAILBOX_LIST_ITER_NO_AUTO_BOXES
        subs_list_flags = 4356
        iter = (struct mailbox_list_iterate_context *) 0x2e00002e004f3f5f
        node = (struct dsync_mailbox_node *) 0x48d708
        info = (const struct mailbox_info *) 0x512b30
        list_pattern = 0x4f3fb8 "INBOX"
        ret = 0
        __FUNCTION__ = "dsync_mailbox_tree_fill"
#20 0x0000000000448d1c in dsync_brain_mailbox_trees_init (brain=0x4f3200) at dsync-brain-mailbox-tree.c:31
        ns = (struct mail_namespace *) 0x4b3080
#21 0x00000000004464d6 in dsync_brain_slave_recv_handshake (brain=0x4f3200) at dsync-brain.c:97
        ibc_set = (const struct dsync_ibc_settings *) 0x4ac4e0
        __FUNCTION__ = "dsync_brain_slave_recv_handshake"
#22 0x000000000044681f in dsync_brain_run_real (brain=0x4f3200, changed_r=0xffff80ffbfffef4e) at dsync-brain.c:97
        changed = false
        ret = true
#23 0x00000000004469c9 in dsync_brain_run (brain=0x4f3200, changed_r=0xffff80ffbfffef4e) at dsync-brain.c:97
        _data_stack_cur_id = 2
        ret = true
#24 0x0000000000443a5a in cmd_dsync_run_local (ctx=0x49d2a0, user=0x4a5ce0, brain=0x4ac760, ibc2=0x4ac3e0) at ../../../src/lib/array.h:197
        brain2 = (struct dsync_brain *) 0x4f3200
        user2 = (struct mail_user *) 0x4b9720
        set_parser = (struct setting_parser_context *) 0x4a3b50
        set_line = 0x48c8a8 "mail_location=imapc:"
        path1 = 0x48d680 "/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1/mailboxes"
        path2 = 0x0
        brain1_running = true
        brain2_running = true
        changed1 = true
        changed2 = false
        ret = 0
        __FUNCTION__ = "cmd_dsync_run_local"
#25 0x000000000044405d in cmd_dsync_run (_ctx=0x49d2a0, user=0x4a5ce0) at ../../../src/lib/array.h:197
        ctx = (struct dsync_cmd_context *) 0x49d2a0
        ibc = (struct dsync_ibc *) 0x49c6c0
        ibc2 = (struct dsync_ibc *) 0x4ac3e0
        brain = (struct dsync_brain *) 0x4ac760
        sync_ns = (struct mail_namespace *) 0x0
        brain_flags = 13
        remote_errors_logged = false
        status = 0
        ret = 0
#26 0x00000000004284ba in doveadm_mail_next_user (ctx=0x49d2a0, input=0xffff80ffbffff0e0, error_r=0xffff80ffbffff148) at doveadm-mail.c:73
        error = 0xffff80ffbffff278 "âõÿ¿ÿ\200ÿÿ"
        ret = 0
        __FUNCTION__ = "doveadm_mail_next_user"
#27 0x0000000000428680 in doveadm_mail_single_user (ctx=0x49d2a0, input=0xffff80ffbffff0e0, error_r=0xffff80ffbffff148) at doveadm-mail.c:73
        __FUNCTION__ = "doveadm_mail_single_user"
#28 0x0000000000428f24 in doveadm_mail_cmd (cmd=0x49cac8, argc=7, argv=0xffff80ffbffff278) at doveadm-mail.c:73
        input = {module = 0x0, service = 0x4671b2 "doveadm", username = 0xffff80ffbffff5c0 "cyrtest1 at iai.uni-bonn.de", 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 *) 0x49d2a0
        getopt_args = 0x48a778 "+dEfl:m:n:Nr:Rs:RAS:u:"
        wildcard_user = 0x0
        error = 0x0
        ret = 0
        c = -1
#29 0x000000000042919b in doveadm_mail_try_run (cmd_name=0xffff80ffbffff5b3 "backup", argc=7, argv=0xffff80ffbffff248) at doveadm-mail.c:73
        cmd__foreach_end = (const void *) 0x49cbd0
        cmd = (const struct doveadm_mail_cmd *) 0x49cac8
        cmd_name_len = 6
        __FUNCTION__ = "doveadm_mail_try_run"
#30 0x00000000004332b3 in main (argc=7, argv=0xffff80ffbffff248) at doveadm.c:63
        service_flags = 10
        cmd_name = 0xffff80ffbffff5b3 "backup"
        i = 16
        quick_init = false
        c = -1


----------------------------------------------------------------
2) and without the acl plugin 

=> crashes with signal 11
   (crashes also for 2.2 doveadm backup -R with source server dovecot 2.1.15)

That was the point I paniced also!

doveadm(cyrtest1 at iai.uni-bonn.de): Debug: auth input: cyrtest1 at iai.uni-bonn.de master_user=cyrtest1 at iai.uni-bonn.de quota_rule=*:storage=512M uid=13004 gid=13004 home=/m/d/user/iai.uni-bonn.de/cyrtest1
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Added userdb setting: plugin/master_user=cyrtest1 at iai.uni-bonn.de
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Added userdb setting: plugin/quota_rule=*:storage=512M
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Effective uid=13004, gid=13004, home=/m/d/user/iai.uni-bonn.de/cyrtest1
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=sdbox:/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1:INDEX=/m/d/imap/meta/iai.uni-bonn.de/cyrtest1:MAILBOXDIR=mailboxes/
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: fs: root=/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1, index=/m/d/imap/meta/iai.uni-bonn.de/cyrtest1, indexpvt=, control=, inbox=, alt=
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1 doesn't exist yet, using default permissions
doveadm(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : Using permissions from /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1: mode=0700 gid=default
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Effective uid=13004, gid=13004, home=/m/d/user/iai.uni-bonn.de/cyrtest1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=imapc:
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc: root=, index=, indexpvt=, control=, inbox=, alt=
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Looking up IP address
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Connecting to 10.11.12.13:993
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Starting SSL handshake
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Server capabilities: IMAP4rev1 LITERAL+ ID ENABLE AUTH=LOGIN AUTH=PLAIN SASL-IR
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Authenticating as cyrusmaster for user cyrtest1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Server capabilities: IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE IDLE
dsync(cyrtest1 at iai.uni-bonn.de): Debug: imapc(mailbox.iai.uni-bonn.de:993): Authenticated successfully
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=recv_handshake
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=send_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=send_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=send_mailbox_tree_deletes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=recv_mailbox_tree changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=send_mailbox_tree_deletes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=send_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=recv_mailbox_tree
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=recv_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=send_mailbox_tree_deletes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=recv_mailbox_tree changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=recv_mailbox_tree_deletes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=master_send_mailbox changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=recv_mailbox_tree
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=recv_mailbox_tree_deletes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=master_send_mailbox
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1/mailboxes/INBOX doesn't exist yet, using default permissions
dsync(cyrtest1 at iai.uni-bonn.de): Debug: Namespace : Using permissions from /m/d/imap/mbox/iai.uni-bonn.de/cyrtest1: mode=0700 gid=default
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=slave_recv_mailbox changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=recv_mailbox_tree_deletes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=master_send_mailbox changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=slave_recv_mailbox
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=master_send_mailbox
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=sync_mails changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in box 'INBOX' recv_state=mailbox send_state=mailbox
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out box 'INBOX' recv_state=mailbox send_state=mailbox changed=0
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=done changed=0
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=sync_mails
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in box 'INBOX' recv_state=mailbox send_state=mailbox
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out box 'INBOX' recv_state=changes send_state=mail_requests changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in box 'INBOX' recv_state=mail_requests send_state=changes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out box 'INBOX' recv_state=mail_requests send_state=changes changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in box 'INBOX' recv_state=changes send_state=mail_requests
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out box 'INBOX' recv_state=changes send_state=mail_requests changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: in box 'INBOX' recv_state=mail_requests send_state=changes
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out box 'INBOX' recv_state=mail_requests send_state=mails changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain S: out state=done changed=1
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in state=done
dsync(cyrtest1 at iai.uni-bonn.de): Debug: brain M: in box 'INBOX' recv_state=changes send_state=mail_requests
Segmentation fault (core dumped) 

Core was generated by `/m/sw/dc/a/bin/doveadm -Dv backup -R -u cyrtest1 at iai.uni-bonn.de -m INBOX imapc'.
Program terminated with signal 11, Segmentation fault.
[New process 94912    ]
#0  0x00000000004578cc in dsync_ibc_send_mail_request (ibc=0x4a9f20, request=0x5441c0) at dsync-ibc.c:38
38              return ibc->v.is_send_queue_full(ibc) ?
(gdb) bt full
#0  0x00000000004578cc in dsync_ibc_send_mail_request (ibc=0x4a9f20, request=0x5441c0) at dsync-ibc.c:38
        __FUNCTION__ = "dsync_ibc_send_mail_request"
#1  0x000000000044a6b1 in dsync_brain_send_mail_request (brain=0x4aa5e0) at dsync-brain-mails.c:25
        request = (const struct dsync_mail_request *) 0x5441c0
        __FUNCTION__ = "dsync_brain_send_mail_request"
#2  0x000000000044ae95 in dsync_brain_sync_mails (brain=0x4aa5e0) at dsync-brain-mails.c:25
        changed = true
        __FUNCTION__ = "dsync_brain_sync_mails"
#3  0x00000000004468c5 in dsync_brain_run_real (brain=0x4aa5e0, changed_r=0xffff80ffbfffef4f) at dsync-brain.c:97
        changed = false
        ret = true
#4  0x00000000004469c9 in dsync_brain_run (brain=0x4aa5e0, changed_r=0xffff80ffbfffef4f) at dsync-brain.c:97
        _data_stack_cur_id = 2
        ret = false
#5  0x0000000000443a44 in cmd_dsync_run_local (ctx=0x49d2a0, user=0x4a5b40, brain=0x4aa5e0, ibc2=0x4aa260) at ../../../src/lib/array.h:197
        brain2 = (struct dsync_brain *) 0x4ef910
        user2 = (struct mail_user *) 0x4b5650
        set_parser = (struct setting_parser_context *) 0x4a39b0
        set_line = 0x48c6b0 "mail_location=imapc:"
        path1 = 0x48d348 "/m/d/imap/mbox/iai.uni-bonn.de/cyrtest1/mailboxes"
        path2 = 0x0
        brain1_running = true
        brain2_running = true
        changed1 = false
        changed2 = true
        ret = 0
        __FUNCTION__ = "cmd_dsync_run_local"
#6  0x000000000044405d in cmd_dsync_run (_ctx=0x49d2a0, user=0x4a5b40) at ../../../src/lib/array.h:197
        ctx = (struct dsync_cmd_context *) 0x49d2a0
        ibc = (struct dsync_ibc *) 0x4a9f20
        ibc2 = (struct dsync_ibc *) 0x4aa260
        brain = (struct dsync_brain *) 0x4aa5e0
        sync_ns = (struct mail_namespace *) 0x0
        brain_flags = 13
        remote_errors_logged = false
        status = 0
        ret = 0
#7  0x00000000004284ba in doveadm_mail_next_user (ctx=0x49d2a0, input=0xffff80ffbffff0e0, error_r=0xffff80ffbffff148) at doveadm-mail.c:73
        error = 0xffff80ffbffff278 "âõÿ¿ÿ\200ÿÿ"
        ret = 0
        __FUNCTION__ = "doveadm_mail_next_user"
#8  0x0000000000428680 in doveadm_mail_single_user (ctx=0x49d2a0, input=0xffff80ffbffff0e0, error_r=0xffff80ffbffff148) at doveadm-mail.c:73
        __FUNCTION__ = "doveadm_mail_single_user"
#9  0x0000000000428f24 in doveadm_mail_cmd (cmd=0x49cac8, argc=7, argv=0xffff80ffbffff278) at doveadm-mail.c:73
        input = {module = 0x0, service = 0x4671b2 "doveadm", username = 0xffff80ffbffff5c0 "cyrtest1 at iai.uni-bonn.de", 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 *) 0x49d2a0
        getopt_args = 0x48a778 "+dEfl:m:n:Nr:Rs:RAS:u:"
        wildcard_user = 0x0
        error = 0x0
        ret = 0
        c = -1
#10 0x000000000042919b in doveadm_mail_try_run (cmd_name=0xffff80ffbffff5b3 "backup", argc=7, argv=0xffff80ffbffff248) at doveadm-mail.c:73
        cmd__foreach_end = (const void *) 0x49cb10
        cmd = (const struct doveadm_mail_cmd *) 0x49cac8
        cmd_name_len = 6
        __FUNCTION__ = "doveadm_mail_try_run"
#11 0x00000000004332b3 in main (argc=7, argv=0xffff80ffbffff248) at doveadm.c:63
        service_flags = 10
        cmd_name = 0xffff80ffbffff5b3 "backup"
        i = 16
        quick_init = false
        c = -1

-------------------------------------------

# 20130226: /m/sw/dc/2.2-20130226/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/dcdeb
director_mail_servers = 10.8.130.2 10.8.130.1
director_servers = 10.8.130.22 10.8.130.21
imapc_features = rfc822.size
imapc_host = mailbox.iai.uni-bonn.de
imapc_master_user = cyrusmaster
imapc_password = password
imapc_port = 993
imapc_ssl = imaps
imapc_ssl_verify = no
imapc_user = %n
instance_name = be
lmtp_rcpt_check_quota = yes
lmtp_save_to_detail_mailbox = yes
log_path = /tmp/dcerr
login_trusted_networks = 10.8.130.20/30
mail_attachment_dir = /m/d/imap/att
mail_attachment_hash = %{size}=%{sha512}
mail_attachment_min_size = 90 k
mail_debug = yes
mail_gid = 13004
mail_location = sdbox:/m/d/imap/mbox/%d/%n:INDEX=/m/d/imap/meta/%d/%n:MAILBOXDIR=mailboxes/
mail_uid = 13004
mdbox_rotate_interval = 1 days
namespace {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
  separator = .
  type = private
}
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
}
passdb {
  args = scheme=CRYPT username_format=%u /m/d/etc/user/%d/pw
  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
  quota = dict:INBOX quota::file:%h/quota
  quota_rule = *:storage=512M
}
service auth-worker {
  user = doveauth
}
service auth {
  user = doveauth
}
service imap-login {
  process_min_avail = 4
  service_count = 1
}
service imap {
  executable = imap wsdc-postlogin-imap
  process_limit = 1024
}
service lmtp {
  inet_listener lmtp {
    address = 127.0.0.1
    port = 2003
  }
}
service pop3 {
  executable = pop3 wsdc-postlogin-pop3
  process_limit = 64
}
service wsdc-postlogin-imap {
  executable = script-login /m/sw/dc/local/wsdc-postlogin.sh-imap
  user = $default_internal_user
}
service wsdc-postlogin-pop3 {
  executable = script-login /m/sw/dc/local/wsdc-postlogin.sh-pop3
  user = $default_internal_user
}
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=%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
}
userdb {
  args = username_format=%u /m/d/etc/user/%d/db
  default_fields = master_user=%u quota_rule=*:storage=512M
  driver = passwd-file
  override_fields = uid=dovemail gid=dovemail home=/m/d/user/%d/%n
}
verbose_proctitle = yes
protocol imap {
  imap_id_send = name version os os-version support-url support-email
  mail_max_userip_connections = 3
  mail_plugins = 
}
protocol lmtp {
  debug_log_path = /tmp/lmtp.debug
  log_path = /tmp/lmtp.error
  mail_plugins = 
}
protocol pop3 {
  mail_max_userip_connections = 1
  pop3_lock_session = yes
}



More information about the dovecot mailing list