Hello,

I'm converting our system to use dovecot. As part of the migration we
need to convert existing mbox'es to Maildir format. I'm using latest
Dovecot2 available as FreeBSD pkg - 2.2.13.

I'm trying to use dsync, which results in:

./dsync -vfu ppaczyn -o
mail_location=mbox:~/mail:INBOX=/var/mail/ppaczyn mirror
maildir:~/Maildir
dsync(ppaczyn): Panic: file mbox-lock.c: line 799 (mbox_lock):
assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type !=
F_RDLCK)
Abort trap (core dumped)

gdb ./dsync doveadm.core
(gdb) bt
#0  0x00000008014aae1a in kill () from /lib/libc.so.7
#1  0x00000008014a9ac9 in abort () from /lib/libc.so.7
#2  0x00000008010f0b52 in default_fatal_finish (type=LOG_TYPE_PANIC,
status=0) at failures.c:193
#3  0x00000008010f0962 in default_fatal_handler (ctx=0x7fffffffd158,
format=0x800e14112 "file %s: line %d (%s): assertion failed: (%s)",
args=0x7fffffffd140) at failures.c:207
#4  0x00000008010f1190 in i_panic (format=0x800e14112 "file %s: line
%d (%s): assertion failed: (%s)") at failures.c:267
#5  0x0000000800d421ea in mbox_lock (mbox=0x801ce5c40, lock_type=3,
lock_id_r=0x801c24af4) at mbox-lock.c:799
#6  0x0000000800d46251 in mbox_save_init_file (ctx=0x801c1a780,
t=0x801c24a00, want_mail=true) at mbox-save.c:294
#7  0x0000000800d45cc9 in mbox_save_begin (_ctx=0x801c1a780,
input=0x801ca4c30) at mbox-save.c:466
#8  0x0000000800d83670 in mailbox_save_begin (ctx=0x7fffffffd330,
input=0x801ca4c30) at mail-storage.c:2034
#9  0x0000000800d74f8c in mail_storage_try_copy (_ctx=0x7fffffffd330,
mail=0x801c55840) at mail-copy.c:76
#10 0x0000000800d74e6c in mail_storage_copy (ctx=0x801c1a780,
mail=0x801c55840) at mail-copy.c:101
#11 0x0000000800d83b4d in mailbox_copy (_ctx=0x7fffffffd3e8,
mail=0x801c55840) at mail-storage.c:2149
#12 0x0000000000447eda in dsync_mailbox_save_body
(importer=0x801d1f040, mail=0x801c47410, newmail=0x801d1f2b8,
all_newmails_forcopy=0x7fffffffd428) at dsync-mailbox-import.c:1950
#13 0x0000000000446bbb in dsync_mailbox_save_newmails
(importer=0x801d1f040, mail=0x801c47410, all_newmails=0x801d1f2b8) at
dsync-mailbox-import.c:2027
#14 0x0000000000446b3d in dsync_mailbox_import_mail
(importer=0x801d1f040, mail=0x801c47410) at
dsync-mailbox-import.c:2069
#15 0x00000000004437c5 in dsync_brain_recv_mail (brain=0x801ca9040) at
dsync-brain-mails.c:249
#16 0x0000000000442eb9 in dsync_brain_sync_mails (brain=0x801ca9040)
at dsync-brain-mails.c:339
#17 0x000000000043d109 in dsync_brain_run_real (brain=0x801ca9040,
changed_r=0x7fffffffd5c5) at dsync-brain.c:575
#18 0x000000000043cf0b in dsync_brain_run (brain=0x801ca9040,
changed_r=0x7fffffffd5c5) at dsync-brain.c:610
#19 0x000000000043a75a in cmd_dsync_run_local (ctx=0x801c2d840,
user=0x801c40040, brain=0x801ca9040, ibc2=0x801c47480,
changes_during_sync_r=0x7fffffffd67a) at doveadm-dsync.c:383
#20 0x0000000000439d07 in cmd_dsync_run (_ctx=0x801c2d840,
user=0x801c40040) at doveadm-dsync.c:596
#21 0x0000000000413735 in doveadm_mail_next_user (ctx=0x801c2d840,
input=0x7fffffffd7d8, error_r=0x7fffffffd848) at doveadm-mail.c:314
#22 0x0000000000413541 in doveadm_mail_single_user (ctx=0x801c2d840,
input=0x7fffffffd7d8, error_r=0x7fffffffd848) at doveadm-mail.c:337
#23 0x0000000000414100 in doveadm_mail_cmd (cmd=0x801c72528, argc=5,
argv=0x7fffffffd9b8) at doveadm-mail.c:525
#24 0x0000000000413c75 in doveadm_mail_try_run
(cmd_name=0x7fffffffdc56 "sync", argc=5, argv=0x7fffffffd998) at
doveadm-mail.c:617
#25 0x00000000004219f9 in main (argc=5, argv=0x7fffffffd998) at doveadm.c:398


Here's my config:

doveconf -n
# 2.2.13: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 10.0-RELEASE-p7 amd64
mail_location = maildir:~/Maildir
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  driver = pam
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}


Any suggestions how to proceed?


Piotr

Reply via email to