Very minor bug; not specifying the user mask with 'doveadm replicator replicate -f' causes a segfault:

server:~# doveadm replicator replicate -f
Segmentation fault

server:~# doveadm replicator replicate -f '*'
123 users updated

server:~# gdb /usr/bin/doveadm core.2418
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
This GDB was configured as "x86_64-redhat-linux-gnu".
Reading symbols from /usr/bin/doveadm...Reading symbols from /usr/lib/debug/usr/bin/doveadm.debug...done.
done.
[New LWP 2418]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `doveadm replicator replicate -f'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fd2c059f921 in __strlen_sse2_pminub () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 glibc-2.17-196.el7.x86_64 nss-softokn-freebl-3.28.3-8.el7_4.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb) bt full
#0  0x00007fd2c059f921 in __strlen_sse2_pminub () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007fd2c08c68f4 in str_append_tabescaped (dest=dest@entry=0x5578cd69f668, src=0x0) at strescape.c:136
No locals.
#2 0x00005578cb5a2731 in cmd_replicator_replicate (argc=1, argv=0x5578cd6a75f8) at doveadm-replicator.c:245
        ctx = 0x5578cd69f608
        str = 0x5578cd69f668
        line = <optimized out>
#3 0x00005578cb5999d8 in doveadm_try_run (argv=0x5578cd6a75f0, argc=2, cmd_name=0x5578cd6a7610 "replicator") at doveadm.c:223
        cmd = <optimized out>
#4  main (argc=3, argv=0x5578cd6a75e8) at doveadm.c:383
cctx = {cmd = 0x0, argc = 0, argv = 0x0, username = 0x5578cd6a77cf "root", cli = true, tcp_server = false, local_ip = { family = 0, u = {ip6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}}, local_port = 0, remote_port = 0, conn = 0x0}
        cmd_name = 0x5578cd6a7610 "replicator"
        quick_init = false
        c = <optimized out>
(gdb) frame 4
#4  main (argc=3, argv=0x5578cd6a75e8) at doveadm.c:383
383                 !doveadm_try_run(cmd_name, argc, (const char **)argv) &&


dovecot -n:
---------------------
# 2.2.32 (dfbe293d4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.20 (7cd71ba)
# OS: Linux 3.10.0-693.2.2.el7.x86_64 x86_64 Red Hat Enterprise Linux Server release 7.4 (Maipo)
auth_master_user_separator = *
auth_username_format = %Ln
auth_verbose = yes
disable_plaintext_auth = no
doveadm_password =  # hidden, use -P to show it
first_valid_uid = 30000
imapc_features = rfc822.size fetch-headers
imapc_host = some-imap-server
imapc_user = %u
last_valid_uid = 30000
mail_location = mdbox:~/mdbox
mail_plugins = " zlib acl notify replication"
mail_prefetch_count = 20
managesieve_notify_capability = mailto
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 spamtest spamtestplus vnd.dovecot.duplicate
mbox_write_locks = fcntl
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 =
}
passdb {
  args = /master-file
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/conf.d/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  mail_replica = tcp:server2:1109
  sieve = ~/.dovecot.sieve
  sieve_before = /some-path/global.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +spamtest +spamtestplus +vnd.dovecot.duplicate
  sieve_spamtest_max_value = 100
sieve_spamtest_status_header = X-PerlMx-Spam: Gauge=[[:alnum:]]+, Probability=(-?[[:digit:]]+)%.*
  sieve_spamtest_status_type = score
  zlib_save = gz
  zlib_save_level = 6
}
protocols = imap lmtp sieve
replication_max_conns = 30
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
  }
  unix_listener replication-notify {
    user = vmail
  }
}
service doveadm {
  inet_listener {
    port = 1109
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  inet_listener lmtp {
    port = 24
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
    group = vmail
    mode = 0660
    user = vmail
  }
}
userdb {
  args = /etc/dovecot/conf.d/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins = " zlib acl notify replication sieve"
}
protocol lda {
  mail_plugins = " zlib acl notify replication sieve"
}

Reply via email to