2.2.21: panic in stats-plugin.c: line 324 (stats_user_deinit): assertion failed: (stats_global_user == user)

Jakub Jankowski shasta at toxcorp.com
Sun Dec 13 01:53:36 UTC 2015


Hi,

I've just upgraded dovecot to 2.2.21 (from 2.2.18), and I'm getting a 
crash when doing dsync backup:

$ dsync -v -u user at domain.com backup 
maildir:/backup/maildirs/domain.com/user/Maildir
dsync(user at domain.com): Panic: file stats-plugin.c: line 324 
(stats_user_deinit): assertion failed: (stats_global_user == user)
dsync(user at domain.com): Error: Raw backtrace: 
/usr/lib64/dovecot/libdovecot.so.0(+0x7e4b4) [0x7f543d3c74b4] -> 
/usr/lib64/dovecot/libdovecot.so.0(+0x7e529) [0x7f543d3c7529] -> 
/usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7f543d372300] -> 
/usr/lib64/dovecot/lib90_stats_plugin.so(+0x4116) [0x7f543c95a116] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_user_unref+0x35) 
[0x7f543d68efd5] -> /usr/bin/dsync [shasta at toxcorp.com done]() [0x420f90] 
-> /usr/bin/dsync [user at domain.com done](doveadm_mail_try_run+0x28c) 
[0x421edc] -> /usr/bin/dsync [user at domain.com done](main+0x2ff) [0x413a2f] 
-> /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f543cd80870] -> 
/usr/bin/dsync [user at domain.com done](_start+0x29) [0x413bb9]
Aborted

This gets logged to syslog when it happens:

Dec 13 02:12:33 host dovecot: imap-login: Login: user=<user at domain.com>, 
method=PLAIN, rip=A.B.C.D, lip=A.B.C.D, mpid=1576, TLS
Dec 13 02:13:09 host dovecot: stats: Error: Mail server input error: 
CONNECT: Duplicate session ID 4rqRBSXGbFbDBgAAOpfmEQ for user 
user at domain.com service doveadm

It definitely wasn't happening on 2.2.18 (I skipped .19 and .20).

Here's my configuration (with some things sanitized):

$ dovecot -n
# 2.2.21 (5345f22): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.9 (357ac0a0e68b+)
# OS: Linux 4.3.2 x86_64 Slackware 14.2
auth_cache_negative_ttl = 1 mins
auth_cache_size = 4 k
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
auth_verbose = yes
auth_verbose_passwords = sha1
default_vsz_limit = 512 M
deliver_log_format = msgid=%m psize=%p vsize=%w: %$
first_valid_gid = 500
first_valid_uid = 500
hostname = host.domain.com
last_valid_gid = 500
last_valid_uid = 500
listen = *
login_greeting = IMAP server ready.
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_location = mdbox:~/mdbox:ALT=/var/vmail/altmdbox/%Ld/%Ln/altmdbox
mail_plugins = " stats"
mailbox_list_index = yes
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
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 Spam {
     special_use = \Junk
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
   separator = /
   type = private
}
passdb {
   args = scheme=CRYPT username_format=%Lu /etc/dovecot/users
   driver = passwd-file
}
plugin {
   mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename
   mail_log_fields = uid box msgid size
   recipient_delimiter = +
   sieve = ~/.dovecot.sieve
   sieve_default = /var/vmail/_sieve/default.sieve
   sieve_dir = ~/sieve
   stats_refresh = 30 secs
   stats_track_cmds = yes
}
pop3_client_workarounds = outlook-no-nuls
postmaster_address = postmaster at domain.com
protocols = imap pop3 lmtp sieve
quota_full_tempfail = yes
service auth-worker {
   user = $default_internal_user
}
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0660
     user = postfix
   }
}
service dict {
   unix_listener dict {
     group = vmail
     mode = 0660
     user = vmail
   }
}
service imap-login {
   inet_listener imap {
     port = 143
   }
   inet_listener imaps {
     port = 993
     ssl = yes
   }
   service_count = 1
}
service imap {
   process_limit = 128
}
service lmtp {
   inet_listener lmtp {
     address = 127.0.0.1
     port = 2424
   }
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0660
     user = postfix
   }
   unix_listener lmtp-vmail {
     group = vmail
     mode = 0660
     user = vmail
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   service_count = 1
   vsz_limit = 64 M
}
service managesieve {
   process_limit = 32
}
service pop3-login {
   inet_listener pop3 {
     port = 110
   }
   inet_listener pop3s {
     port = 995
     ssl = yes
   }
}
service pop3 {
   process_limit = 64
}
service stats {
   fifo_listener stats-mail {
     mode = 0600
     user = vmail
   }
}
ssl_cert = </etc/ssl/certs/cert.pem
ssl_key = </etc/ssl/private/key.pem
stats_command_min_time = 1 days
stats_domain_min_time = 1 days
stats_ip_min_time = 1 days
stats_memory_limit = 32 M
stats_session_min_time = 1 days
stats_user_min_time = 1 days
userdb {
   args = uid=vmail gid=vmail home=/var/vmail/mdbox/%Ld/%Ln
   driver = static
}
verbose_proctitle = yes
protocol lda {
   mail_plugins = " stats sieve"
}
protocol imap {
   mail_max_userip_connections = 20
   mail_plugins = " stats imap_stats"
}
protocol lmtp {
   mail_plugins = " stats sieve"
}
$

Let me know if there's anything else that I can provide to help narrowing 
it down.

Cheers,
  shasta

-- 
Jakub Jankowski|shasta at toxcorp.com|http://toxcorp.com/
GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D


More information about the dovecot mailing list