[Dovecot] doveadm quota get -u segmentation fault

subscriber at viliar.net.ru subscriber at viliar.net.ru
Fri Dec 24 13:16:31 EET 2010


Hello!

I'm trying move to dovecot2 (centos 5.5, dovecot 2.0.8, dovecot
compiled/packaged via edited dovecot2.spec from fedora git).
Almost all fine, I can login via imap/pop3 and work with mail.

I get segfault error with "doveadm quota get -u user"

Here backtrace and other info:


# gdb `which doveadm` core.5202 
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
Copyright (C) 2009 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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/doveadm...Reading symbols from
/usr/lib/debug/usr/bin/doveadm.debug...done.
done.
Reading symbols from /usr/lib/dovecot/libdovecot-storage.so.0...Reading
symbols from
/usr/lib/debug/usr/lib/dovecot/libdovecot-storage.so.0.0.0.debug...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot-storage.so.0
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libpam.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/dovecot/libdovecot.so.0...Reading symbols
from /usr/lib/debug/usr/lib/dovecot/libdovecot.so.0.0.0.debug...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libaudit.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib/libaudit.so.0
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libpthread.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/dovecot/lib10_quota_plugin.so...Reading
symbols from
/usr/lib/debug/usr/lib/dovecot/lib10_quota_plugin.so.debug...done.
done.
Loaded symbols for /usr/lib/dovecot/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so...Reading symbols
from
/usr/lib/debug/usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so.debug...done.
done.
Loaded symbols for /usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so
Core was generated by `doveadm quota get -u xxx at xxx'.
Program terminated with signal 11, Segmentation fault.
#0  0x00cc2b95 in cmd_quota_get_run (ctx=0x94dd3a8, user=0x94ee098) at
doveadm-quota.c:52
52		array_foreach(&quser->quota->roots, root)

(gdb) bt full
#0  0x00cc2b95 in cmd_quota_get_run (ctx=0x94dd3a8, user=0x94ee098) at
doveadm-quota.c:52
        root__foreach_end = 0x94cd548
        root = 0x94dec90
#1  0x0804f079 in doveadm_mail_next_user (ctx=0x94dd3a8, input=<value
optimized out>, error_r=0xbffdf4e8) at doveadm-mail.c:220
        service_user = 0x94debe0
        error = <value optimized out>
        ret = 1
#2  0x0804f18c in doveadm_mail_single_user (ctx=0x94dd3a8, argv=0x94d51d4,
username=0x94d51ed "xxx at xxx", service_flags=130) at doveadm-mail.c:246
        input = {module = 0x0, service = 0x0, username = 0x94d51ed
"xxx at xxx", 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}}},
userdb_fields = 0x0, no_userdb_lookup = 0}
        error = <value optimized out>
        ret = <value optimized out>
#3  0x0804f379 in doveadm_mail_cmd (cmd=0x94dc0d0, argc=3, argv=0x94d51d4)
at doveadm-mail.c:418
        service_flags = <value optimized out>
        ctx = 0x94dd3a8
        getopt_args = 0x94cd2d0 "As:u:"
        username = 0x94d51ed "xxx at xxx"
        wildcard_user = 0x0
        c = <value optimized out>
#4  0x0804f6f8 in doveadm_mail_try_run_multi_word (cmd=0x94dc0d0,
cmdname=0xcc2f18 "get", argc=4, argv=0x94d51c4) at doveadm-mail.c:453
No locals.
#5  0x0804f7b7 in doveadm_mail_try_run (cmd_name=0x94d51e0 "quota",
argc=4, argv=0x94d51c4) at doveadm-mail.c:476
        cmd__foreach_end = 0x94dc0e8
        cmd = 0x94dc0d0
        cmd_name_len = 5
        __FUNCTION__ = "doveadm_mail_try_run"
#6  0x08053e11 in main (argc=Cannot access memory at address 0x14
) at doveadm.c:344
        cmd_name = 0x94d51e0 "quota"
        i = 134626935
        quick_init = false
        c = <value optimized out>






# 2.0.8: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-194.17.1.el5.028stab073.1 i686 CentOS release 5.5
(Final) simfs
auth_mechanisms = plain login digest-md5 cram-md5 apop
auth_socket_path = /var/run/dovecot/auth-userdb
first_valid_gid = 5000
listen = *
mail_location = maildir:/mail/%d/%n/maildir:INDEX=/mail/%d/%n/indexes
mail_plugins = quota
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
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  autocreate2 = virus
  autocreate3 = spam
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve sieve
service auth-worker {
  user = root
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  inet_listener sieve_deprecated {
    port = 2000
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins = quota sieve
}
protocol lda {
  mail_plugins = quota sieve
}
protocol imap {
  mail_max_userip_connections = 10
  mail_plugins = quota imap_quota autocreate
}
protocol sieve {
  mail_max_userip_connections = 3
}
protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota
}



# grep -v '^ *\(#.*\)\?$' /etc/dovecot/dovecot-sql.conf.ext 
driver=sqlite
connect = /etc/mailserver/mail.db
default_pass_scheme = PLAIN
user_query = SELECT '/mail/' || domain || '/' || mail || '/maildir' as
home, uid, gid, '*:storage=' || quota || 'B' AS quota_rule FROM users WHERE
mail || '@' || domain = '%u'
password_query = SELECT mail || '@' || domain as user, password as
password, '/mail/' || domain || '/' || mail || '/maildir' as userdb_home,
uid as userdb_uid, gid as userdb_gid, 'maildir:storage=' || (quota/1024) as
userdb_quota, nice as userdb_nice, hosts as allow_nets FROM users WHERE
mail = '%n' and domain = '%d' and access = 'Y' and %Ls = 'Y';





More information about the dovecot mailing list