Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed:

Thomas Robers robers at tutech.de
Thu Jan 18 11:32:07 EET 2018


Hi,

after updating Dovecot to version 2.3 I get a lot of core-dumps like:

> Jan 18 10:08:20 mail dovecot: imap(bob at tutech.de)<18200><CIPhNwljJcdYS/hg>: Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed: (zstream->ostream.finished || 
> zstream->ostream.ostream.stream_errno != 0)
> Jan 18 10:08:20 mail dovecot: imap(bob at tutech.de)<18200><CIPhNwljJcdYS/hg>: Error: Raw backtrace: /usr/lib64/dovecot/libdovecot.so.0(+0xc71da) [0x7f9b510c81da] -> /usr/lib64/dovecot
> /libdovecot.so.0(+0xc7766) [0x7f9b510c8766] -> /usr/lib64/dovecot/libdovecot.so.0(+0x3be11) [0x7f9b5103ce11] -> /usr/lib64/dovecot/lib20_zlib_plugin.so(+0x4ffb) [0x7f9b4fc21ffb] -> 
> /usr/lib64/dovecot/libdovecot.so.0(+0xed3a6) [0x7f9b510ee3a6] -> dovecot/imap(client_disconnect+0x4f) [0x7f9b518f3a1f] -> dovecot/imap(cmd_logout+0x5b) [0x7f9b518ede5b] -> 
> dovecot/imap(command_exec+0x65) [0x7f9b518f7585] -> dovecot/imap(+0x1a7b0) [0x7f9b518f47b0] -> dovecot/imap(+0x1a848) [0x7f9b518f4848] -> dovecot/imap(client_handle_input+0x1d5) 
> [0x7f9b518f4c35] -> dovecot/imap(client_input+0x6e) [0x7f9b518f517e] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x55) [0x7f9b510deec5] -> /usr/lib64/dovecot
> /libdovecot.so.0(io_loop_handler_run_internal+0xbf) [0x7f9b510e0dcf] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x55) [0x7f9b510defb5] -> /usr/lib64/dovecot
> /libdovecot.so.0(io_loop_run+0x38) [0x7f9b510df1d8] -> /usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f9b5105eab3] -> dovecot/imap(main+0x33e) [0x7f9b51903cee] -> 
> /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f9b50c8bd1d] -> dovecot/imap(+0xe339) [0x7f9b518e8339]
> Jan 18 10:08:20 mail dovecot: imap(bob at tutech.de)<18200><CIPhNwljJcdYS/hg>: Fatal: master: service(imap): child 18200 killed with signal 6 (core dumped)


The gdb backtrace is:


> gdb /usr/libexec/dovecot/imap /var/core/18200
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/libexec/dovecot/imap...done.
> [New Thread 18200]
> Reading symbols from /usr/lib64/dovecot/libdovecot-storage.so.0...done.
> Loaded symbols for /usr/lib64/dovecot/libdovecot-storage.so.0
> Reading symbols from /usr/lib64/dovecot/libdovecot.so.0...done.
> Loaded symbols for /usr/lib64/dovecot/libdovecot.so.0
> Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libc.so.6
> Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
> Loaded symbols for /lib64/librt.so.1
> Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libdl.so.2
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
> [Thread debugging using libthread_db enabled]
> Loaded symbols for /lib64/libpthread.so.0
> Reading symbols from /usr/lib64/dovecot/lib01_acl_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib01_acl_plugin.so
> Reading symbols from /usr/lib64/dovecot/lib02_imap_acl_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib02_imap_acl_plugin.so
> Reading symbols from /usr/lib64/dovecot/lib15_notify_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib15_notify_plugin.so
> Reading symbols from /usr/lib64/dovecot/lib20_mail_log_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib20_mail_log_plugin.so
> Reading symbols from /usr/lib64/dovecot/lib20_zlib_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib20_zlib_plugin.so
> Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libz.so.1
> Reading symbols from /lib64/libbz2.so.1...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libbz2.so.1
> Reading symbols from /usr/lib64/dovecot/lib30_imap_zlib_plugin.so...done.
> Loaded symbols for /usr/lib64/dovecot/lib30_imap_zlib_plugin.so
> Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libgcc_s.so.1
> Core was generated by `dovecot/imap'.
> Program terminated with signal 6, Aborted.
> #0  0x00007f9b50c9f495 in raise () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install dovecot23-2.3.0-3.gf.el6.x86_64


My Dovecot configuration is:

---snip---
# 2.3.0 (c8b89eb): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.0.1 (d33dca20)
# OS: Linux 2.6.32-696.3.1.el6.x86_64 x86_64 CentOS release 6.9 (Final) ext4
auth_debug = yes
auth_debug_passwords = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
imap_max_line_length = 2 M
mail_debug = yes
mail_location = maildir:/export/home/imap/%Lu/Maildir
mail_plugins = acl zlib mail_log notify
mailbox_idle_check_interval = 10 secs
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
namespace {
   hidden = no
   ignore_on_failure = no
   inbox = no
   list = children
   location = maildir:%%h/Maildir:INDEXPVT=%h/shared/%%u
   prefix = shared/%%u/
   separator = /
   subscriptions = yes
   type = shared
}
namespace inbox {
   hidden = no
   inbox = yes
   list = 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 = INBOX/
   separator = /
   type = private
}
passdb {
   args = /etc/dovecot/master-users
   driver = passwd-file
   master = yes
}
passdb {
   args = /etc/dovecot/dovecot-ldap.conf.ext
   driver = ldap
}
plugin {
   acl = vfile:/etc/dovecot/global-acls:cache_secs=300
   acl_shared_dict = file:/export/home/shared-db/shared-mailboxes
   mail_log_events = append delete undelete expunge copy mailbox_delete 
mailbox_rename flag_change
   mail_log_fields = uid box msgid size from flags
   mail_replica = tcp:mail2.tutech.de
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
   sieve_global = /var/lib/dovecot/sieve/global/
   sieve_user_log = ~/.dovecot.sieve.log
   zlib_save = gz
   zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve sieve
service aggregator {
   fifo_listener replication-notify-fifo {
     mode = 0666
     user = vmail
   }
   unix_listener replication-notify {
     mode = 0666
     user = vmail
   }
}
service auth {
   unix_listener /var/spool/postfix/private/auth {
     mode = 0666
   }
   unix_listener auth-userdb {
     group = vmail
     mode = 0660
     user = vmail
   }
}
service config {
   unix_listener config {
     user = vmail
   }
}
service doveadm {
   inet_listener {
     port = 12345
   }
   user = vmail
}
service imap-login {
   inet_listener imaps {
     port = 993
     ssl = yes
   }
   process_limit = 500
   process_min_avail = 20
}
service imap {
   executable = imap
}
service lmtp {
   inet_listener lmtp {
     address = 127.0.0.1
     port = 24
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   inet_listener sieve_deprecated {
     port = 2000
   }
}
service pop3-login {
   inet_listener pop3s {
     port = 995
     ssl = yes
   }
}
service pop3 {
   executable = pop3
}
service replicator {
   unix_listener replicator-doveadm {
     mode = 0666
   }
}
ssl = required
ssl_cert = </etc/pki/dovecot/certs/mail.tutech.de.crt_chain
ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL:!EXPORT
ssl_dh =  # hidden, use -P to show it
ssl_key =  # hidden, use -P to show it
syslog_facility = local6
userdb {
   args = /etc/dovecot/dovecot-ldap-userdb.conf.ext
   driver = ldap
}
protocol lmtp {
   mail_plugins = acl zlib mail_log notify sieve
}
protocol imap {
   mail_max_userip_connections = 100
   mail_plugins = acl zlib mail_log notify imap_zlib imap_acl
   rawlog_dir = /tmp/rawlog/%u
}
---snip---

Is this a bug or a misconfiguration? Is it possible to disable the
zlib Plugin? Can Dovecot read the previous compressed e-mails and
will they stay compressed? Thanks for the help!

Kind regards
Thomas


More information about the dovecot mailing list