rawlog segfaults (error 4 in libdovecot.so.0.0.0)

Thomas Robers - TUTECH robers at tutech.de
Fri Nov 10 13:31:48 EET 2017


Am 10.11.2017 um 11:19 schrieb Aki Tuomi:
> rawlog files are plain text, readable files. you do not need to dump
> them with doveadm.

but the file command says

 > file 20171110-101523-29744.in
 > 20171110-101523-29744.in: data

and less [...] may be a binary file.  See it anyway? [...]
When i do doveadm dump 20171110-101523-29744.in i get

Detected file type: imapzlib
2 COMPRESS DEFLATE
3 ID ("name" "Thunderbird" "version" "52.4.0")
4 list (subscribed) "" "INBOX/*"
5 list (subscribed) "" "shared/*"
Error: zlib.read((file)): unexpected EOF at 137


> can you get gdb "bt full" for the core file?

   gdb /usr/libexec/dovecot/rawlog /var/core/12802
   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/rawlog...(no debugging symbols found)...done.
   [New Thread 12802]
   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/libdl.so.2...(no debugging symbols found)...done.
   Loaded symbols for /lib64/libdl.so.2
   Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
   Loaded symbols for /lib64/librt.so.1
   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
   Core was generated by `/usr/libexec/dovecot/rawlog [robers at tutech.de:12801 rawlog]  �������'.
   Program terminated with signal 11, Segmentation fault.
   #0  o_stream_flush (stream=0x0) at ostream.c:175
   175	ostream.c: Datei oder Verzeichnis nicht gefunden.
   	in ostream.c
   Missing separate debuginfos, use: debuginfo-install dovecot22-2.2.33.2-1.gf.el6.x86_64
   (gdb) bt full
   #0  o_stream_flush (stream=0x0) at ostream.c:175
           _stream = <value optimized out>
           ret = <value optimized out>
           __FUNCTION__ = "o_stream_flush"
   #1  0x0000000000401c35 in proxy_flush_timeout ()
   No symbol table info available.
   #2  0x00007fbed5387e0a in io_loop_handle_timeouts_real (ioloop=0x1bef760) at ioloop.c:568
           timeout = 0x1bf0a80
           item = 0x1bf0a80
           tv = {tv_sec = 0, tv_usec = 0}
           tv_call = {tv_sec = 1510312817, tv_usec = 931447}
           t_id = 3
   #3  io_loop_handle_timeouts (ioloop=0x1bef760) at ioloop.c:581
           _data_stack_cur_id = 2
   #4  0x00007fbed5389357 in io_loop_handler_run_internal (ioloop=0x1bef760) at ioloop-epoll.c:196
           ctx = 0x1befbf0
           events = <value optimized out>
           event = <value optimized out>
           list = <value optimized out>
           io = <value optimized out>
           tv = {tv_sec = 0, tv_usec = 991646}
           events_count = <value optimized out>
           msecs = <value optimized out>
           ret = 0
           i = <value optimized out>
           call = <value optimized out>
           __FUNCTION__ = "io_loop_handler_run_internal"
   #5  0x00007fbed53877ac in io_loop_handler_run (ioloop=0x1bef760) at ioloop.c:649
   No locals.
   #6  0x00007fbed5387968 in io_loop_run (ioloop=0x1bef760) at ioloop.c:624
           __FUNCTION__ = "io_loop_run"
   #7  0x0000000000402896 in main ()
   No symbol table info available.

Do i need to install the debuginfo packet?

> Aki

Thanks
Thomas

> On 10.11.2017 11:35, T. Robers wrote:
>> Hello everybody,
>>
>> i tried to debug imap sessions with the rawlog feature and rawlog
>> creates files but when i try to dump them doveadm tells me
>> [...] Error: zlib.read((file)): unexpected EOF at [...].
>> I looked at syslog files and i see, that rawlog gets
>> terminated with a segfault, e.g.:
>>
>> segfault at 10 ip 00007ff6da362596 sp 00007fffe725a080 error 4 in
>> libdovecot.so.0.0.0[7ff6da2a4000+122000]
>>
>> Is there a way to debug why rawlog ist terminated? I haven't found
>> anything.I would be very thankful, if somebody could give a hint.
>>
>> My system is:
>>
>> # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
>> # Pigeonhole version 0.4.21 (92477967)
>> # 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
>> 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
>> 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 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/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
>>    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
>> service auth {
>>    unix_listener /var/spool/postfix/private/auth {
>>      mode = 0666
>>    }
>>    unix_listener auth-userdb {
>>      group = vmail
>>      mode = 0660
>>      user = vmail
>>    }
>> }
>> service imap-login {
>>    inet_listener imap {
>>      port = 143
>>    }
>>    inet_listener imaps {
>>      port = 993
>>      ssl = yes
>>    }
>>    process_limit = 500
>>    process_min_avail = 20
>> }
>> service imap {
>>    executable = imap postlogin
>> }
>> 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 postlogin
>> }
>> service postlogin {
>>    executable = script-login -d rawlog -f in
>> }
>> ssl = required
>> ssl_cert = </etc/pki/dovecot/certs/mail.tutech.de.crt_chain
>> ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL:!EXPORT
>> ssl_key =  # hidden, use -P to show it
>> ssl_protocols = !SSLv3 !SSLv2
>> 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
>> }
>>
>>
>> Tia
>> Thomas


-- 
TuTech Innovation GmbH
Thomas Robers
Diplom-Chemieingenieur (FH)
IT & Technischer Support
IT-Administrator
Harburger Schlossstrasse 6-12
21079 Hamburg, Germany
Tel.: +49 40 76629-6720, Fax: +49 40 76629-6729
mailto:robers at tutech.de
Web: http://www.tutech.de
Public Key (PGP): http://keys.tutech.net/tro

Geschaeftsfuehrer: Martin Mahn
Handelsregister: HRB 51682 Hamburg
USt.-ID-Nr.: DE 811 481 083


More information about the dovecot mailing list