Crash when using dict quotas with sqlite database

Marcel Menzel mail at mcl.gg
Fri Feb 1 21:40:28 EET 2019


Hello,


After I configured a SQLite backed dict quota backend, the dict process
crashes every time a quota operation is happening.

SQLite: 3.26.0

Dovecot: 2.3.4 (0ecbaf23d)

Linux: 4.20.4.a-1-hardened #1 SMP PREEMPT Fri Jan 25 01:24:51 CET 2019
x86_64 GNU/Linux (Arch Linux)

Filesystem: BTRFS


I can't get any debug output from Dovecot, even after setting log_debug
= cat:* event:* source:* field:*=*

dovecot[6457]: dict(6687): Debug: sqlite: Finished query 'BEGIN
TRANSACTION' in 0 msecs
dovecot[6457]: dict(6687): Fatal: master: service(dict): child 6687
killed with signal 11 (core dumped)


I've attached the output of dovecot -n and the coredump file from
systemd-coredump.


Kind regards,

Marcel Menzel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.dict.76.7a2405b8971e43d7b3c6472bf455309b.1657.1549049285000000.lz4
Type: application/octet-stream
Size: 292779 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190201/69a19272/attachment-0001.obj>
-------------- next part --------------
# 2.3.4 (0ecbaf23d): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 (60b0f48d)
# OS: Linux 4.20.4.a-1-hardened x86_64 Arch Linux 
# Hostname: zarkon.mcl.gg
auth_verbose = yes
dict {
  expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
doveadm_password = # hidden, use -P to show it
first_valid_uid = 8
imap_idle_notify_interval = 29 mins
last_valid_uid = 8
lmtp_rcpt_check_quota = yes
login_greeting = Pedo mellon a minno
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k
mail_gid = mail
mail_home = /var/vmail/%d/%n
mail_location = maildir:~
mail_plugins = quota old_stats notify push_notification replication listescape
mail_privileged_group = mail
mail_uid = mail
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 imapsieve vnd.dovecot.imapsieve
mbox_lock_timeout = 1 mins
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location = 
  mailbox Archief {
    special_use = \Archive
  }
  mailbox Archiv {
    special_use = \Archive
  }
  mailbox Archive {
    auto = subscribe
    special_use = \Archive
  }
  mailbox Archives {
    special_use = \Archive
  }
  mailbox Arquivo {
    special_use = \Archive
  }
  mailbox Arquivos {
    special_use = \Archive
  }
  mailbox Concepten {
    special_use = \Drafts
  }
  mailbox "Deleted Items" {
    special_use = \Trash
  }
  mailbox "Deleted Messages" {
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Entwürfe {
    special_use = \Drafts
  }
  mailbox Enviados {
    special_use = \Sent
  }
  mailbox "Gelöschte Objekte" {
    special_use = \Trash
  }
  mailbox Gesendet {
    special_use = \Sent
  }
  mailbox "Gesendete Objekte" {
    special_use = \Sent
  }
  mailbox "Itens Enviados" {
    special_use = \Sent
  }
  mailbox "Itens Excluídos" {
    special_use = \Trash
  }
  mailbox "Itens Excluidos" {
    special_use = \Trash
  }
  mailbox Junk-E-Mail {
    special_use = \Junk
  }
  mailbox Junk {
    auto = subscribe
    autoexpunge = 30 days
    special_use = \Junk
  }
  mailbox "Junk E-Mail" {
    special_use = \Junk
  }
  mailbox Lixeira {
    special_use = \Trash
  }
  mailbox "Lixo Eletrônico" {
    special_use = \Junk
  }
  mailbox "Ongewenste e-mail" {
    special_use = \Junk
  }
  mailbox Papierkorb {
    special_use = \Trash
  }
  mailbox Prullenbak {
    special_use = \Trash
  }
  mailbox Rascunhos {
    special_use = \Drafts
  }
  mailbox Rubbish {
    special_use = \Trash
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Items" {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Spam {
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    autoexpunge = 120 days
    special_use = \Trash
  }
  mailbox "Verwijderde items" {
    special_use = \Trash
  }
  mailbox Verzonden {
    special_use = \Sent
  }
  mailbox "Verzonden items" {
    special_use = \Sent
  }
  prefix = 
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Spam
  imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_name = *
  listescape_char = %%
  mail_replica = tcp:10.5.0.2:12345
  old_stats_refresh = 30 secs
  old_stats_track_cmds = yes
  quota = dict:User quota::proxy::quota
  quota_grace = 10%%
  quota_rule2 = Trash:storage=+100M
  quota_status_nouser = DUNNO
  quota_status_success = DUNNO
  sieve = file:/var/vmail/%d/%n/sieve;active=/var/vmail/%d/%n/dovecot.sieve
  sieve_after = /var/vmail/global.sieve
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
protocols = imap lmtp sieve
service aggregator {
  fifo_listener replication-notify-fifo {
    user = mail
  }
  unix_listener replication-notify {
    user = mail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = dovecot
    mode = 0660
    user = mail
  }
}
service dict {
  unix_listener dict {
    group = mail
    mode = 0660
  }
}
service doveadm {
  inet_listener {
    address = 10.5.0.1
    port = 12345
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0666
    user = postfix
  }
  user = mail
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service old-stats {
  fifo_listener old-stats-mail {
    mode = 0600
    user = mail
  }
  inet_listener {
    address = 127.0.0.1
    port = 24242
  }
}
service quota-status {
  client_limit = 1
  executable = quota-status -p postfix
  unix_listener /var/spool/postfix/private/quota-status {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
    mode = 0600
    user = mail
  }
}
ssl = required
ssl_cert = </etc/dehydrated/certs/mcl.gg/fullchain.pem
ssl_cipher_list = ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA
ssl_client_ca_dir = /etc/ssl/certs
ssl_curve_list = X25519:P-256
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
ssl_options = no_compression, no_ticket
ssl_prefer_server_ciphers = yes
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  mail_plugins = quota old_stats notify push_notification replication listescape sieve
}
protocol imap {
  mail_max_userip_connections = 25
  mail_plugins = quota old_stats notify push_notification replication listescape imap_quota imap_sieve imap_old_stats
}


More information about the dovecot mailing list