Hi all,
Our Dovecot replication crashes because an assertion in dovecot-core/src/lib/fd-util.c fails:
#6 0x00007fd5ac89b08e in fd_set_nonblock (fd=-1, nonblock=true) at fd-util.c:102 102 i_assert(fd > -1);
This only happens if dovecot starts the replication by itself, i.e. not when using “doveadm sync -d -u USER”
Chasing the contents of fd in the stack: #7 0x0000560045173e21 in cmd_dsync_ibc_stream_init (ctx=0x560045966d48, name=0x560045986e15 "smtp-mz.chiorino.com:9090", temp_prefix=0x56004590dbe8 "/tmp/dovecot.doveadm.") at doveadm-dsync.c:567 567 fd_set_nonblock(ctx->fd_in, TRUE);
The struct member ctx->fd_in is already -1 at this point.
#8 0x0000560045174662 in cmd_dsync_run (_ctx=0x560045966d48, user=0x5600459a1748) at doveadm-dsync.c:706 706 ibc = cmd_dsync_ibc_stream_init(ctx, ctx->remote_name,
The variable ctx gets defined in this function. The struct member ctx->fd_in is -1.
This is as much (hopefully useful) info I can give without guidance.
dovecot-sysreport attached.
Full backtrace: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f1df1eb8537 in __GI_abort () at abort.c:79 #2 0x00007f1df22ff57f in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:465 #3 0x00007f1df22ff5e6 in fatal_handler_real (ctx=0x7fff02d24160, format=0x7f1df23970a8 "file %s: line %d (%s): assertion failed: (%s)", args=0x7fff02d24190) at failures.c:477 #4 0x00007f1df2300871 in i_internal_fatal_handler (ctx=0x7fff02d24160, format=0x7f1df23970a8 "file %s: line %d (%s): assertion failed: (%s)", args=0x7fff02d24190) at failures.c:879 #5 0x00007f1df22ff8ba in i_panic (format=0x7f1df23970a8 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:530 #6 0x00007f1df230108e in fd_set_nonblock (fd=-1, nonblock=true) at fd-util.c:102 #7 0x0000560045173e21 in cmd_dsync_ibc_stream_init (ctx=0x560045966d48, name=0x560045986e15 "smtp-mz.chiorino.com:9090", temp_prefix=0x56004590dbe8 "/tmp/dovecot.doveadm.") at doveadm-dsync.c:567 #8 0x0000560045174662 in cmd_dsync_run (_ctx=0x560045966d48, user=0x5600459a1748) at doveadm-dsync.c:706 #9 0x00005600451780bb in doveadm_mail_next_user (ctx=0x560045966d48, error_r=0x7fff02d24538) at doveadm-mail.c:472 #10 0x00005600451782b9 in doveadm_mail_single_user (ctx=0x560045966d48, error_r=0x7fff02d24538) at doveadm-mail.c:506 #11 0x0000560045178974 in doveadm_mail_cmd_exec (ctx=0x560045966d48, wildcard_user=0x0) at doveadm-mail.c:667 #12 0x00005600451795bc in doveadm_cmd_ver2_to_mail_cmd_wrapper (cctx=0x7fff02d24720) at doveadm-mail.c:996 #13 0x0000560045190108 in doveadm_cmd_run_ver2 (argc=8, argv=0x56004590b378, cctx=0x7fff02d24720) at doveadm-cmd.c:465 #14 0x000056004519682c in doveadm_cmd_server_run_ver2 (conn=0x56004595e9f8, argc=8, argv=0x56004590b378, cctx=0x7fff02d24720) at client-connection-tcp.c:187 #15 0x0000560045196920 in doveadm_cmd_handle (conn=0x56004595e9f8, cmd_name=0x56004590b349 "sync", argc=8, argv=0x56004590b378, cctx=0x7fff02d24720) at client-connection-tcp.c:214 #16 0x0000560045196bdf in client_handle_command (conn=0x56004595e9f8, args=0x56004590b368) at client-connection-tcp.c:284 #17 0x00005600451972ee in client_connection_tcp_input (conn=0x56004595e9f8) at client-connection-tcp.c:436 #18 0x00007f1df2326e4f in io_loop_call_io (io=0x560045969a10) at ioloop.c:737 #19 0x00007f1df232a470 in io_loop_handler_run_internal (ioloop=0x560045913e80) at ioloop-epoll.c:222 #20 0x00007f1df23270d6 in io_loop_handler_run (ioloop=0x560045913e80) at ioloop.c:789 #21 0x00007f1df2326fb1 in io_loop_run (ioloop=0x560045913e80) at ioloop.c:762 #22 0x00007f1df22407dc in master_service_run (service=0x560045913cd0, callback=0x56004519b447 <client_connected>) at master-service.c:869 #23 0x000056004519b6a1 in main (argc=1, argv=0x560045913a10) at main.c:124
dovecot --version (self-compiled): 2.3.20 (80a5ac675d) Debian GNU/Linux 11 (bullseye) x86_64 Mail storage on BTRFS, also tested on ext4.
Heiko already asked about this a while ago, but there was no feedback. We still have this problem and now I want to try to escalate this to a bug. What do you think?
Best regards, Moritz
-- [schlittermann – internet & unix support ] [support@schlittermann.de | https://schlittermann.de/ ] [Tel(Fax): +49 351 802998-1 ] https://schlittermann.de/keys/gpg/mo@schlittermann.de/pubkey.asc