Hello list,
I have one user, which have a lot of folders (not it is 414 without INBOX). When
he tries to create one more folder with random name - the folder successfully
created, but LIST command invokes out of memory to imap process.
From the logs:
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Panic: data stack: Out of memory
when allocating 268435472 bytes
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: *** glibc detected ***
imap: double free or corruption (!prev): 0x0812ba00 ***
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: ======= Backtrace:
========Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error:
/lib/libc.so.6[0xb7e8a714]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error:
/lib/libc.so.6(cfree+0x9c)[0xb7e8bfcc]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: imap(t_pop+0x7a)[0x80f0a1a]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error:
imap(t_pop_check+0xf)[0x80f0b9f]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: imap[0x80f199d]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: imap[0x80f2285]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: imap[0x80f1bd9]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: imap[0x80f099d]
Oct 26 15:26:38 IMAP(gozhda.a at domain.com): Error: Sending log messages too
fast, throttling..
Oct 26 15:26:38 dovecot: Error: child 9497 (imap) killed with signal 6 (core
dumps disabled)
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error: imap[0x80f0e17]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error: imap[0x80fccc8]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error: imap[0x80efd3a]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
imap(buffer_write+0xd2)[0x80f0242]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
imap(buffer_append+0x26)[0x80f0366]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
imap(mail_transaction_log_append+0x5dc)[0x80d457c]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error: imap[0x80c90d9]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
imap(mail_index_sync_commit+0xa5)[0x80cc625]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
/usr/lib/dovecot/imap/lib20_virtual_plugin.so[0xb7de7cee]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
/usr/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x71c)[0xb7dea7cc]
Oct 26 15:26:39 IMAP(gozhda.a at domain.com): Error:
imap(mailbox_sync+0x35)[0x80b6335]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(cmd_select_full+0x3d8)[0x8065088]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(cmd_select+0x19)[0x80657e9]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error: imap[0x8067a9c]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error: imap[0x8067b35]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(client_handle_input+0x2d)[0x8067ced]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(client_input+0x5f)[0x80686af]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(io_loop_handler_run+0xe0)[0x80fae60]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
imap(io_loop_run+0x20)[0x80fa2e0]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error: imap(main+0x5ea)[0x807116a]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error:
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7e35725]
Oct 26 15:26:40 IMAP(gozhda.a at domain.com): Error: imap[0x80602b1]
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: ======= Memory map:
=======Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 08048000-08129000
r-xp 00000000 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 08129000-0812a000 r--p
000e0000 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 0812a000-0812c000 rw-p
000e1000 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 0812c000-0bbbd000 rw-p
0812c000 00:00 0 [heap]
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 92600000-92621000 rw-p
92600000 00:00 0
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: 92621000-92700000 ---p
92621000 00:00 0
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: b280d000-b2819000 r-xp
00000000 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: b2819000-b281a000 r--p
0000b000 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: b281a000-b281b000 rw-p
0000c000 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhda.a at domain.com): Error: b2822000-b7d88000 rw-p
b2822000 00:00 0
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7d88000-b7d90000 r--s
00000000 08:11 24109678
/data/mail/domain.com/gozhda.a/data/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7d90000-b7d95000 r--s
00000000 08:11 24109800
/data/mail/domain.com/gozhda.a/data/.Supplier.Furniture.Prima
Ridhacitra.Inbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7d95000-b7d9a000 r--s
00000000 08:11 24117515
/data/mail/domain.com/gozhda.a/data/.Supplier.Furniture.Kappa
Salotti.Outbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7d9a000-b7d9f000 r--s
00000000 08:11 24109096
/data/mail/domain.com/gozhda.a/data/.Supplier.Furniture.Keoma
Salotti.Inbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7d9f000-b7da4000 r--s
00000000 08:11 24109729 /data/mail/domain.com/gozhda.a/data/.Supplier.Elements
of illumination.Laber Agent.2 Outbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7da4000-b7da9000 r--s
00000000 08:11 24109097 /data/mail/domain.com/gozhda.a/data/.Supplier.Elements
of illumination.Laber Agent.1 Inbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7da9000-b7dae000 r--s
00000000 08:11 24117749 /data/mail/domain.com/gozhda.a/data/.Structure of
Agromat Company.Auto Logistics.1 Inbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7dae000-b7dbd000 r-xp
00000000 08:02 562992 /lib/libbz2.so.1.0.5
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7dbd000-b7dbe000 r--p
0000e000 08:02 562992 /lib/libbz2.so.1.0.5
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7dbe000-b7dbf000 rw-p
0000f000 08:02 562992 /lib/libbz2.so.1.0.5
Oct 26 15:26:42 IMAP(gozhda.a at domain.com): Error: b7dbf000-b7dd1000 r-xp
00000000 08:02 562990 /lib/libz.so.1.2.3
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dd1000-b7dd2000 r--p
00011000 08:02 562990 /lib/libz.so.1.2.3
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dd2000-b7dd3000 rw-p
00012000 08:02 562990 /lib/libz.so.1.2.3
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dd7000-b7dda000 r--s
00000000 08:11 24109083 /data/mail/domain.com/gozhda.a/data/dovecot.index.log
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dda000-b7ddd000 r-xp
00000000 08:02 269577 /usr/lib/dovecot/lib20_zlib_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7ddd000-b7dde000 r--p
00002000 08:02 269577 /usr/lib/dovecot/lib20_zlib_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dde000-b7ddf000 rw-p
00003000 08:02 269577 /usr/lib/dovecot/lib20_zlib_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7ddf000-b7dec000 r-xp
00000000 08:02 269941 /usr/lib/dovecot/lib20_virtual_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dec000-b7ded000 r--p
0000c000 08:02 269941 /usr/lib/dovecot/lib20_virtual_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7ded000-b7dee000 rw-p
0000d000 08:02 269941 /usr/lib/dovecot/lib20_virtual_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7dee000-b7df1000 r-xp
00000000 08:02 272179 /usr/lib/dovecot/lib20_expire_plugin.so
Oct 26 15:26:43 IMAP(gozhda.a at domain.com): Error: b7df1000-b7df2000 r--p
00002000 08:02 272179 /usr/lib/dovecot/lib20_expire_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7df2000-b7df3000 rw-p
00003000 08:02 272179 /usr/lib/dovecot/lib20_expire_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7df3000-b7df5000 r-xp
00000000 08:02 269836 /usr/lib/dovecot/lib11_trash_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7df5000-b7df6000 r--p
00001000 08:02 269836 /usr/lib/dovecot/lib11_trash_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7df6000-b7df7000 rw-p
00002000 08:02 269836 /usr/lib/dovecot/lib11_trash_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7df7000-b7e04000 r-xp
00000000 08:02 270039 /usr/lib/dovecot/lib10_quota_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e04000-b7e05000 r--p
0000c000 08:02 270039 /usr/lib/dovecot/lib10_quota_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e05000-b7e06000 rw-p
0000d000 08:02 270039 /usr/lib/dovecot/lib10_quota_plugin.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e06000-b7e07000 rw-p
b7e06000 00:00 0
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e07000-b7e1b000 r-xp
00000000 08:02 562206 /lib/libpthread-2.9.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e1b000-b7e1c000 r--p
00013000 08:02 562206 /lib/libpthread-2.9.so
Oct 26 15:26:44 IMAP(gozhda.a at domain.com): Error: b7e1c000-b7e1d000 rw-p
00014000 08:02 562206 /lib/libpthread-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7e1d000-b7e1f000 rw-p
b7e1d000 00:00 0
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7e1f000-b7f5c000 r-xp
00000000 08:02 563472 /lib/libc-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f5c000-b7f5e000 r--p
0013d000 08:02 563472 /lib/libc-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f5e000-b7f5f000 rw-p
0013f000 08:02 563472 /lib/libc-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f5f000-b7f62000 rw-p
b7f5f000 00:00 0
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f62000-b7f69000 r-xp
00000000 08:02 563080 /lib/librt-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f69000-b7f6a000 r--p
00006000 08:02 563080 /lib/librt-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f6a000-b7f6b000 rw-p
00007000 08:02 563080 /lib/librt-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f6b000-b7f6d000 r-xp
00000000 08:02 563473 /lib/libdl-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f6d000-b7f6e000 r--p
00001000 08:02 563473 /lib/libdl-2.9.so
Oct 26 15:26:45 IMAP(gozhda.a at domain.com): Error: b7f6e000-b7f6f000 rw-p
00002000 08:02 563473 /lib/libdl-2.9.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f6f000-b7f70000 rw-p
b7f6f000 00:00 0
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f70000-b7f71000 r-xp
00000000 08:02 269571 /usr/lib/dovecot/lib20_autocreate_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f71000-b7f72000 r--p
00000000 08:02 269571 /usr/lib/dovecot/lib20_autocreate_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f72000-b7f73000 rw-p
00001000 08:02 269571 /usr/lib/dovecot/lib20_autocreate_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f73000-b7f75000 r-xp
00000000 08:02 270032 /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f75000-b7f76000 r--p
00001000 08:02 270032 /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f76000-b7f77000 rw-p
00002000 08:02 270032 /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f77000-b7f93000 r-xp
00000000 08:02 563474 /lib/ld-2.9.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f93000-b7f94000 r--p
0001c000 08:02 563474 /lib/ld-2.9.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: b7f94000-b7f95000 rw-p
0001d000 08:02 563474 /lib/ld-2.9.so
Oct 26 15:26:46 IMAP(gozhda.a at domain.com): Error: bfb7f000-bfb94000 rw-p
bffeb000 00:00 0 [stack]
Oct 26 15:26:47 IMAP(gozhda.a at domain.com): Error: ffffe000-fffff000 r-xp
00000000 00:00 0 [vdso]
Oct 26 15:26:57 IMAP(gozhda.a at domain.com): Panic: data stack: Out of memory
when allocating 268435472 bytes
And so on...
I have tried to grow mail_process_size from 256 to 512, but this didn't
help.
My question - is there some hardcoded limit for mail directories or it's a
bug ?
dovecot -n:
# 1.2.6: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.26-gentoo-r4 i686 Gentoo Base System release 1.12.11.1
log_path: /var/log/dovecot/dovecot-error.log
info_log_path: /var/log/dovecot/dovecot.log
protocols: imaps managesieve
ssl_cert_file: /etc/ssl/dovecot/imaps.crt
ssl_key_file: /etc/ssl/dovecot/imaps.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(managesieve): /usr/libexec/dovecot/managesieve-login
login_greeting: Server ready.
login_processes_count: 20
login_max_processes_count: 512
mail_max_userip_connections(default): 20
mail_max_userip_connections(imap): 20
mail_max_userip_connections(managesieve): 10
first_valid_uid: 8
last_valid_uid: 8
first_valid_gid: 12
last_valid_gid: 12
mail_drop_priv_before_exec: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(managesieve): /usr/libexec/dovecot/managesieve
mail_plugins(default): quota imap_quota trash expire zlib autocreate virtual
mail_plugins(imap): quota imap_quota trash expire zlib autocreate virtual
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(managesieve): /usr/lib/dovecot/managesieve
imap_client_workarounds(default): delay-newmail
imap_client_workarounds(imap): delay-newmail
imap_client_workarounds(managesieve):
namespace:
type: private
separator: /
location: maildir:~/data
inbox: yes
list: yes
subscriptions: yes
namespace:
type: private
separator: /
prefix: Company/
location: virtual:/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++
list: yes
lda:
postmaster_address: postmaster at domain.com
hostname: mail.domain.com
mail_plugins: quota trash expire sieve virtual
quota_full_tempfail: yes
sendmail_path: /usr/sbin/sendmail
auth_socket_path: /var/run/dovecot/auth-master
log_path: /var/log/dovecot/dovecot-deliver.log
info_log_path: /var/log/dovecot/dovecot-deliver.log
global_script_path: /etc/dovecot/sieve/default.sieve
sieve_global_dir: /etc/dovecot/sieve
auth default:
mechanisms: plain login
default_realm: domain.com
cache_size: 10240
cache_negative_ttl: 0
user: dovecot_auth
master_user_separator: *
worker_max_count: 50
passdb:
driver: passwd-file
args: /etc/dovecot/passdb/master.pwd
master: yes
passdb:
driver: passwd-file
args: /etc/dovecot/passdb/users.pwd
passdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
userdb:
driver: prefetch
userdb:
driver: ldap
args: /etc/dovecot/dovecot-userdb-ldap.conf
userdb:
driver: passwd-file
args: /etc/dovecot/passdb/users.pwd
socket:
type: listen
client:
path: /var/run/dovecot/auth-client
mode: 432
user: mail
group: dovecot_auth
master:
path: /var/run/dovecot/auth-master
mode: 384
user: mail
group: mail
plugin:
quota_warning: storage=90%% /etc/dovecot/plugins/quota_warning.sh 90
quota: maildir:Mailbox quota
quota_rule: *:storage=500M
quota_rule2: Trash:storage=10%%
trash: /etc/dovecot/plugins/dovecot-trash.conf
expire: Trash 30 Spam 30
expire_dict: proxy::expire
autocreate: Drafts
autocreate2: Sent
autocreate3: Spam
autocreate4: Trash
autosubscribe: Drafts
autosubscribe2: Sent
autosubscribe3: Spam
autosubscribe4: Trash
sieve: ~/.dovecot.sieve
sieve_dir: ~/sieve
sieve_extensions: +notify
sieve_before: /etc/dovecot/sieve/default.sieve
dict:
expire: sqlite:/etc/dovecot/plugins/expire.conf