<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>I can add a detail, every time I get the "panic error" on the
      replica node, I had one minute before this log written on the
      first node:<br>
    </p>
    <p><i><font size="2">dic 14 11:04:50 xxx dovecot[16715]:
          doveadm(xxx)<16454><uKbQLCJsuGFGQAAAIQnY6g>:
          Error: Couldn't lock
          /mnt/mail-storage-lv0007/xxx/.dovecot-sync.lock:
          fcntl(/mnt/mail-storage-lv0007/xxx/.dovecot-sync.lock,
          write-lock, F_SETLKW) locking failed: Timed out after 30
          seconds (WRITE lock held by pid 16215)</font></i></p>
    <p>Regards<br>
    </p>
    <div class="moz-cite-prefix">On 13/12/21 14:57, Claudio Corvino
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:7bfb441a-fb15-fd57-56c3-3bddb2b57c7b@trustitalia.it">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi,</p>
      <p>I have the same error in my replica server, it appears many
        times per day.</p>
      <p>Log:</p>
      <p><font size="2"><i>Dec 13 13:01:23 Error:
            doveadm(xxx)<25513><vsFCF5w1t2GpYwAAbKtC3g>:
            read(xxx.xxx.xxx) failed: EOF (last sent=mailbox, last
            recv=mailbox)</i><i><br>
          </i><i>Dec 13 13:34:43 Warning:
            doveadm(xxx)<26277><9e2rJOM9t2GlZgAAbKtC3g>:
            /mnt/mail-storage-lv0003/xxx/Maildir/dovecot-uidlist:
            Duplicate file entry at line 2162:
            1639396906.M258993P16725.xxx,S=7304,W=7467 (uid 71966 ->
            71970)</i><i><br>
          </i><i>Dec 13 14:26:20 Error: doveadm(27294): write(xxx)
            failed: Timed out after 60 seconds</i><i><br>
          </i><i>Dec 13 14:26:20 Panic: doveadm(27294): file ioloop.c:
            line 865 (io_loop_destroy): assertion failed: (ioloop ==
            current_ioloop)</i><i><br>
          </i><i>Dec 13 14:26:20 Error: doveadm(27294): Raw backtrace:
            /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x3d)
            [0x7f74d96f96ed] ->
            /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e)
            [0x7f74d96f980e] ->
            /usr/lib/dovecot/libdovecot.so.0(+0xff5cb) [0x7f74d97065cb]
            -> /usr/lib/dovecot/libdovecot.so.0(+0xff661)
            [0x7f74d9706661] ->
            /usr/lib/dovecot/libdovecot.so.0(+0x54a45) [0x7f74d965ba45]
            -> /usr/lib/dovecot/libdovecot.so.0(+0x57d95)
            [0x7f74d965ed95] -> dovecot/doveadm-server(+0x4af0f)
            [0x556a7a4b4f0f] ->
            dovecot/doveadm-server(doveadm_print_flush+0x1f)
            [0x556a7a4ae7af] ->
            dovecot/doveadm-server(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x32b)
            [0x556a7a49dbcb] ->
            dovecot/doveadm-server(doveadm_cmd_run_ver2+0x4f7)
            [0x556a7a4ae307] -> dovecot/doveadm-server(+0x4874a)
            [0x556a7a4b274a] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69)
            [0x7f74d971c679] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x131)
            [0x7f74d971dc61] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x4c)
            [0x7f74d971c71c] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40)
            [0x7f74d971c8a0] ->
            /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
            [0x7f74d96903d3] -> dovecot/doveadm-server(main+0x102)
            [0x556a7a48d9f2] ->
            /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)
            [0x7f74d92e709b] -> dovecot/doveadm-server(_start+0x2a)
            [0x556a7a48da7a]</i><i><br>
          </i><i>Dec 13 14:26:20 Fatal: doveadm(27294): master:
            service(doveadm): child 27294 killed with signal 6 (core
            dumps disabled - <a class="moz-txt-link-freetext"
              href="https://dovecot.org/bugreport.html#coredumps"
              moz-do-not-send="true">https://dovecot.org/bugreport.html#coredumps</a>)</i><i><br>
          </i><i>Dec 13 14:29:06 Error: doveadm(27364): write(xxx)
            failed: Timed out after 60 seconds</i><i><br>
          </i><i>Dec 13 14:29:06 Panic: doveadm(27364): file ioloop.c:
            line 865 (io_loop_destroy): assertion failed: (ioloop ==
            current_ioloop)</i><i><br>
          </i><i>Dec 13 14:29:06 Error: doveadm(27364): Raw backtrace:
            /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x3d)
            [0x7f05717756ed] ->
            /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e)
            [0x7f057177580e] ->
            /usr/lib/dovecot/libdovecot.so.0(+0xff5cb) [0x7f05717825cb]
            -> /usr/lib/dovecot/libdovecot.so.0(+0xff661)
            [0x7f0571782661] ->
            /usr/lib/dovecot/libdovecot.so.0(+0x54a45) [0x7f05716d7a45]
            -> /usr/lib/dovecot/libdovecot.so.0(+0x57d95)
            [0x7f05716dad95] -> dovecot/doveadm-server(+0x4af0f)
            [0x558edcd93f0f] ->
            dovecot/doveadm-server(doveadm_print_flush+0x1f)
            [0x558edcd8d7af] ->
            dovecot/doveadm-server(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x32b)
            [0x558edcd7cbcb] ->
            dovecot/doveadm-server(doveadm_cmd_run_ver2+0x4f7)
            [0x558edcd8d307] -> dovecot/doveadm-server(+0x4874a)
            [0x558edcd9174a] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69)
            [0x7f0571798679] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x131)
            [0x7f0571799c61] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x4c)
            [0x7f057179871c] ->
            /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40)
            [0x7f05717988a0] ->
            /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
            [0x7f057170c3d3] -> dovecot/doveadm-server(main+0x102)
            [0x558edcd6c9f2] ->
            /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)
            [0x7f057136309b] -> dovecot/doveadm-server(_start+0x2a)
            [0x558edcd6ca7a]</i><i><br>
          </i><i>Dec 13 14:29:06 Fatal: doveadm(27364): master:
            service(doveadm): child 27364 killed with signal 6 (core
            dumps disabled - <a class="moz-txt-link-freetext"
              href="https://dovecot.org/bugreport.html#coredumps"
              moz-do-not-send="true">https://dovecot.org/bugreport.html#coredumps</a>)</i></font></p>
      <p>My 'dovecot.conf':<font size="2"><i><br>
          </i></font></p>
      <p><font size="1"><i># 2.3.17.1 (476cd46418):
            /etc/dovecot/dovecot.conf<br>
            # Pigeonhole version 0.5.17.1 (a1a0b892)<br>
            # OS: Linux 4.19.0-18-amd64 x86_64 Debian 10.11 <br>
            # Hostname: xxx<br>
            auth_mechanisms = plain login<br>
            default_vsz_limit = 1 G<br>
            doveadm_password = # hidden, use -P to show it<br>
            doveadm_port = xxx<br>
            mail_gid = 501<br>
            mail_location = <a class="moz-txt-link-freetext"
              href="maildir:~/Maildir:INDEX=/var/indexes/%n"
              moz-do-not-send="true">maildir:~/Maildir:INDEX=/var/indexes/%n</a><br>
            mail_max_userip_connections = 50<br>
            mail_plugins = " notify replication"<br>
            mail_privileged_group = vmail<br>
            mail_uid = 501<br>
            managesieve_notify_capability = mailto<br>
            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 imapflags notify<br>
            namespace inbox {<br>
              inbox = yes<br>
              location = <br>
              mailbox Drafts {<br>
                special_use = \Drafts<br>
              }<br>
              mailbox Junk {<br>
                special_use = \Junk<br>
              }<br>
              mailbox "Posta inviata" {<br>
                special_use = \Sent<br>
              }<br>
              mailbox Sent {<br>
                special_use = \Sent<br>
              }<br>
              mailbox "Sent Messages" {<br>
                special_use = \Sent<br>
              }<br>
              mailbox Trash {<br>
                special_use = \Trash<br>
              }<br>
              prefix = <br>
            }<br>
            passdb {<br>
              args = /etc/dovecot/dovecot-ldap.conf<br>
              driver = ldap<br>
            }<br>
            plugin {<br>
              mail_replica = <a class="moz-txt-link-freetext"
              href="tcp:xxx" moz-do-not-send="true">tcp:xxx</a><br>
              sieve = <a class="moz-txt-link-freetext"
              href="file:/var/www/html/ooo/%n;active=/var/www/html/ooo/%n/script"
              moz-do-not-send="true">file:/var/www/html/ooo/%n;active=/var/www/html/ooo/%n/script</a><br>
              sieve_default = /var/www/html/ooo/default.sieve<br>
              sieve_duplicate_default_period = 14d<br>
              sieve_duplicate_max_period = 7d<br>
              sieve_extensions = +duplicate +notify +imapflags
            +vacation-seconds<br>
              sieve_user_log = /var/www/html/ooo/%n/sieve_error.log<br>
            }<br>
            protocols = " imap lmtp sieve pop3"<br>
            replication_max_conns = 1<br>
            service aggregator {<br>
              fifo_listener replication-notify-fifo {<br>
                user = vmail<br>
              }<br>
              unix_listener replication-notify {<br>
                user = vmail<br>
              }<br>
            }<br>
            service auth {<br>
              unix_listener /var/spool/postfix/private/auth {<br>
                group = postfix<br>
                mode = 0660<br>
                user = postfix<br>
              }<br>
              unix_listener auth-master {<br>
                group = vmail<br>
                mode = 0660<br>
                user = vmail<br>
              }<br>
            }<br>
            service doveadm {<br>
              inet_listener {<br>
                port = 12345<br>
              }<br>
            }<br>
            service imap-login {<br>
              process_limit = 200<br>
            }<br>
            service lmtp {<br>
              process_min_avail = 5<br>
              unix_listener /var/spool/postfix/private/dovecot-lmtp {<br>
                group = postfix<br>
                mode = 0600<br>
                user = postfix<br>
              }<br>
              user = vmail<br>
            }<br>
            service managesieve-login {<br>
              inet_listener sieve {<br>
                port = 4190<br>
              }<br>
              process_min_avail = 10<br>
              service_count = 1<br>
            }<br>
            service replicator {<br>
              process_min_avail = 1<br>
              unix_listener replicator-doveadm {<br>
                mode = 0666<br>
                user = vmail<br>
              }<br>
            }<br>
            service stats {<br>
              unix_listener stats-reader {<br>
                group = vmail<br>
                mode = 0666<br>
                user = vmail<br>
              }<br>
              unix_listener stats-writer {<br>
                group = vmail<br>
                mode = 0666<br>
                user = vmail<br>
              }<br>
            }<br>
            ssl_cert = </etc/dovecot/private/chain-star_xxx.pem<br>
            ssl_cipher_list = <a class="moz-txt-link-freetext"
href="ALL:!LOW:!aNULL:!eNULL:!SSLv2:!RC4:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES"
              moz-do-not-send="true">ALL:!LOW:!aNULL:!eNULL:!SSLv2:!RC4:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES</a><br>
            ssl_dh = # hidden, use -P to show it<br>
            ssl_key = # hidden, use -P to show it<br>
            userdb {<br>
              args = /etc/dovecot/dovecot-ldap.conf<br>
              driver = ldap<br>
            }<br>
            protocol lmtp {<br>
              mail_plugins = " notify replication sieve quota"<br>
              postmaster_address = postmaster@xxx<br>
            }<br>
            protocol lda {<br>
              auth_socket_path = /var/run/dovecot/auth-master<br>
              hostname = xxx<br>
              mail_plugins = " notify replication sieve quota"<br>
            }<br>
            protocol sieve {<br>
              mail_max_userip_connections = 10<br>
              managesieve_implementation_string = Dovecot Pigeonhole<br>
              managesieve_logout_format = bytes=%i/%o<br>
              managesieve_max_compile_errors = 5<br>
              managesieve_max_line_length = 64 k<br>
            }</i></font><br>
      </p>
      <p>My 'dovecot-ldap.conf':</p>
      <p><i><font size="2">hosts = xxx<br>
            base = dc=xxx,dc=lan<br>
            ldap_version=3<br>
            auth_bind = yes<br>
            dn = cn=xxx,cn=xxx,dc=xxx,dc=lan<br>
            dnpass = #hidden<br>
            scope = subtree<br>
            #user_attrs =
            sAMAccountName=home=/mnt/mail-storage-lv0003/%$,=uid=501,=gid=501<br>
            user_attrs =
            sAMAccountName=user,=home=/mnt/mail-storage-lv0003/%n,=uid=501,=gid=501<br>
            pass_attrs = sAMAccountName=user<br>
            user_filter = (&(objectclass=person)(samaccountname=%n))<br>
            pass_filter= (&(objectclass=person)(samaccountname=%n))<br>
            iterate_attrs = sAMAccountName=user<br>
            # With following filter we exclude all objects without an
            email address, all computers and all inactive accounts<br>
            iterate_filter =
            (&(objectCategory=person)(mail=*)(objectClass=user)(!(<a
              class="moz-txt-link-freetext"
              href="userAccountControl:1.2.840.113556.1.4.803:=2"
              moz-do-not-send="true">userAccountControl:1.2.840.113556.1.4.803:=2</a>)))</font></i><br>
      </p>
      <p>Regards<br>
      </p>
      <div class="moz-cite-prefix">On 19/11/21 10:27, Andreas Piper
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:03ee3069-bcb2-b9b3-96c7-d5af6c8b1efc@hrz.uni-marburg.de">Hello,
        <br>
        <br>
        as these 'Panic'-Events continue to appear every few minutes in
        my replicator-log, I would like to ask, if you have any hints
        how to repair the correlated mailbox? <br>
        <br>
        Andreas <br>
        <br>
        Am 11.11.21 um 15:04 schrieb Piper Andreas: <br>
        <blockquote type="cite">Hello, <br>
          <br>
          <blockquote type="cite">Can you install dovecot debug symbols
            and redo the gdb backtrace? Package name is likely
            `dovecot-dbg`. <br>
            <br>
          </blockquote>
          <br>
          done, thanks for the hint. <br>
          <br>
          Andreas <br>
          <br>
          (gdb) bt <br>
          #0  __GI_raise (sig=sig@entry=6) at
          ../sysdeps/unix/sysv/linux/<a class="moz-txt-link-freetext"
            href="raise.c:51" moz-do-not-send="true">raise.c:51</a> <br>
          #1  0x00007f4e58be0921 in __GI_abort () at <a
            class="moz-txt-link-freetext" href="abort.c:79"
            moz-do-not-send="true">abort.c:79</a> <br>
          #2  0x00007f4e59427a11 in default_fatal_finish (status=0,
          type=LOG_TYPE_PANIC) at <a class="moz-txt-link-freetext"
            href="failures.c:459" moz-do-not-send="true">failures.c:459</a>
          <br>
          #3  fatal_handler_real (ctx=<optimized out>,
          format=<optimized out>, args=<optimized out>) at <a
            class="moz-txt-link-freetext" href="failures.c:471"
            moz-do-not-send="true">failures.c:471</a> <br>
          #4  0x00007f4e59427b01 in i_internal_fatal_handler
          (ctx=<optimized out>, format=<optimized out>,
          args=<optimized out>) <br>
               at <a class="moz-txt-link-freetext"
            href="failures.c:872" moz-do-not-send="true">failures.c:872</a>
          <br>
          #5  0x00007f4e593744a7 in i_panic
          (format=format@entry=0x7f4e5946ab88 "file %s: line %d (%s):
          assertion failed: (%s)") <br>
               at <a class="moz-txt-link-freetext"
            href="failures.c:524" moz-do-not-send="true">failures.c:524</a>
          <br>
          #6  0x00007f4e5944121c in io_loop_destroy
          (_ioloop=_ioloop@entry=0x7ffd0e203e68) at <a
            class="moz-txt-link-freetext" href="ioloop.c:865"
            moz-do-not-send="true">ioloop.c:865</a> <br>
          #7  0x0000563d0150ffb6 in doveadm_print_server_flush () at <a
            class="moz-txt-link-freetext"
            href="doveadm-print-server.c:106" moz-do-not-send="true">doveadm-print-server.c:106</a>
          <br>
          #8  0x0000563d01508fb7 in doveadm_print ( <br>
               value=0x563d0269ced8
          "AQAAAFoYRziwaStNyDEAAEKX94joZK5JAwAAAAQ", 'A' <repeats 20
          times>, "DAAAAMu73BjjBalfFPQAANPIMJnB2rkkBAAAAAg", 'A'
          <repeats 20 times>,
          "EAAAD3Gkc4sGkrTcgxAABCl/eI02OuSQIAAAAD", 'A' <repeats 21
          times>, "gAAAD4SNQYx691evBkAANXM"...) <br>
               at <a class="moz-txt-link-freetext"
            href="doveadm-print.c:87" moz-do-not-send="true">doveadm-print.c:87</a>
          <br>
          #9  0x0000563d014f4427 in cmd_dsync_run (_ctx=0x563d01fc7cc8,
          user=<optimized out>) at <a
            class="moz-txt-link-freetext" href="doveadm-dsync.c:713"
            moz-do-not-send="true">doveadm-dsync.c:713</a> <br>
          #10 0x0000563d014f6a44 in doveadm_mail_next_user
          (ctx=ctx@entry=0x563d01fc7cc8,
          error_r=error_r@entry=0x7ffd0e204108) <br>
               at <a class="moz-txt-link-freetext"
            href="doveadm-mail.c:462" moz-do-not-send="true">doveadm-mail.c:462</a>
          <br>
          #11 0x0000563d014f76be in doveadm_mail_single_user
          (ctx=ctx@entry=0x563d01fc7cc8,
          error_r=error_r@entry=0x7ffd0e204108) <br>
               at <a class="moz-txt-link-freetext"
            href="doveadm-mail.c:493" moz-do-not-send="true">doveadm-mail.c:493</a>
          <br>
          #12 0x0000563d014f7c6f in doveadm_mail_cmd_exec
          (wildcard_user=0x0, ctx=0x563d01fc7cc8) at <a
            class="moz-txt-link-freetext" href="doveadm-mail.c:654"
            moz-do-not-send="true">doveadm-mail.c:654</a> <br>
          #13 doveadm_cmd_ver2_to_mail_cmd_wrapper (cctx=<optimized
          out>) at <a class="moz-txt-link-freetext"
            href="doveadm-mail.c:983" moz-do-not-send="true">doveadm-mail.c:983</a>
          <br>
          #14 0x0000563d01508c1b in doveadm_cmd_run_ver2
          (argc=argc@entry=9, argv=argv@entry=0x563d01f6b3d0,
          cctx=cctx@entry=0x7ffd0e204260) <br>
               at <a class="moz-txt-link-freetext"
            href="doveadm-cmd.c:465" moz-do-not-send="true">doveadm-cmd.c:465</a>
          <br>
          #15 0x0000563d0150d612 in doveadm_cmd_server_run_ver2
          (cctx=0x7ffd0e204260, argv=0x563d01f6b3d0, argc=9,
          conn=0x563d01fc1988) <br>
               at <a class="moz-txt-link-freetext"
            href="client-connection-tcp.c:187" moz-do-not-send="true">client-connection-tcp.c:187</a>
          <br>
          #16 doveadm_cmd_handle (cctx=0x7ffd0e204260,
          argv=<optimized out>, argc=<optimized out>,
          cmd_name=<optimized out>, <br>
               conn=0x563d01fc1988) at <a class="moz-txt-link-freetext"
            href="client-connection-tcp.c:214" moz-do-not-send="true">client-connection-tcp.c:214</a>
          <br>
          #17 client_handle_command (args=<optimized out>,
          conn=0x563d01fc1988) at <a class="moz-txt-link-freetext"
            href="client-connection-tcp.c:284" moz-do-not-send="true">client-connection-tcp.c:284</a>
          <br>
          #18 client_connection_tcp_input (conn=0x563d01fc1988) at <a
            class="moz-txt-link-freetext"
            href="client-connection-tcp.c:436" moz-do-not-send="true">client-connection-tcp.c:436</a>
          <br>
          #19 0x00007f4e594406d9 in io_loop_call_io (io=0x563d01fc5950)
          at <a class="moz-txt-link-freetext" href="ioloop.c:737"
            moz-do-not-send="true">ioloop.c:737</a> <br>
          #20 0x00007f4e59442034 in io_loop_handler_run_internal
          (ioloop=ioloop@entry=0x563d01f73ed0) at <a
            class="moz-txt-link-freetext" href="ioloop-epoll.c:222"
            moz-do-not-send="true">ioloop-epoll.c:222</a> <br>
          #21 0x00007f4e594407e0 in io_loop_handler_run
          (ioloop=<optimized out>) at <a
            class="moz-txt-link-freetext" href="ioloop.c:789"
            moz-do-not-send="true">ioloop.c:789</a> <br>
          #22 0x00007f4e59440a18 in io_loop_run (ioloop=0x563d01f73ed0)
          at <a class="moz-txt-link-freetext" href="ioloop.c:762"
            moz-do-not-send="true">ioloop.c:762</a> <br>
          #23 0x00007f4e593a6a23 in master_service_run
          (service=0x563d01f73d30, callback=<optimized out>) at <a
            class="moz-txt-link-freetext" href="master-service.c:863"
            moz-do-not-send="true">master-service.c:863</a> <br>
          #24 0x0000563d014e6922 in main (argc=<optimized out>,
          argv=<optimized out>) at <a
            class="moz-txt-link-freetext" href="main.c:124"
            moz-do-not-send="true">main.c:124</a> <br>
          <br>
        </blockquote>
        <br>
        <br>
      </blockquote>
    </blockquote>
  </body>
</html>