Hello list, After enabling virtual plugin in dovecot config, I got imap segmentation faults from time to time. I can't say what event trigs this behavior, but in logs I see: Jul 22 13:55:01 dovecot: Error: child 20908 (imap) killed with signal 11 (core dumped) Jul 22 13:56:43 dovecot: Error: child 19466 (imap) killed with signal 11 (core dumped) Jul 22 14:06:16 dovecot: Error: child 22629 (imap) killed with signal 11 (core dumped) Jul 22 14:08:17 dovecot: Error: child 22879 (imap) killed with signal 11 (core dumped) Here is my config section, which I added to enable virtual plugin: namespace private { prefix = Company/ separator = / location = virtual:/var/mail/virtual subscriptions = no } and "virtual" to mail_plugins in imap and lda section. Full dovecot -n config provided at the end of this message. I'm not sure, if it is save to enable virtual location for all users using the same path, but the main goal for me - to create dovecot-virtual files once for all users. Maybe INDEX-es should be personalize for this setup work correct ? ls -la /var/mail/virtual/ drwxr-xr-x 2 mail mail 4096 ??? 22 15:43 all drwxr-xr-x 2 mail mail 4096 ??? 22 15:37 favorites -rw-r--r-- 1 mail mail 14 ??? 22 13:53 .virtual-subscriptions cat /var/mail/virtual/all/dovecot-virtual #all emails * all cat /var/mail/virtual/favorites/dovecot-virtual #Mark messages * flagged Core dump: gdb /usr/libexec/dovecot/imap /data/mail/domain.com/koshikov.n/core GNU gdb 6.8 Copyright (C) 2008 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 "i686-pc-linux-gnu"... (no debugging symbols found) warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/dovecot/imap/lib10_quota_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib10_quota_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib11_trash_plugin.so... (no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib11_trash_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib20_autocreate_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib20_expire_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib20_expire_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib20_virtual_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib20_virtual_plugin.so Reading symbols from /usr/lib/dovecot/imap/lib20_zlib_plugin.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/dovecot/imap/lib20_zlib_plugin.so Reading symbols from /lib/libz.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib/libbz2.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libbz2.so.1 (no debugging symbols found) Core was generated by `imap'. Program terminated with signal 11, Segmentation fault. [New process 29801] #0 0xb7f6157c in ?? () from /usr/lib/dovecot/imap/lib20_virtual_plugin.so (gdb) bt full #0 0xb7f6157c in ?? () from /usr/lib/dovecot/imap/lib20_virtual_plugin.so No symbol table info available. #1 0x083895d8 in ?? () No symbol table info available. #2 0x00000573 in ?? () No symbol table info available. #3 0xbfbeada0 in ?? () No symbol table info available. #4 0xbfbeadc8 in ?? () No symbol table info available. #5 0xbfbeadeb in ?? () No symbol table info available. #6 0x08389da4 in ?? () No symbol table info available. #7 0xbfbeadb8 in ?? () No symbol table info available. #8 0x08389da8 in ?? () No symbol table info available. #9 0x00000000 in ?? () No symbol table info available. dovecot -n: # 1.2.1: /etc/dovecot/dovecot.conf Warning: Growing pool 'settings' with: 8192 # 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: 10 login_max_processes_count: 512 first_valid_uid: 8 last_valid_uid: 8 first_valid_gid: 12 last_valid_gid: 12 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: / inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: Company/ location: virtual:/var/mail/virtual list: yes namespace: type: public separator: / prefix: #Public/ location: maildir:/var/mail/public list: yes auth default: mechanisms: plain login 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=95%% /etc/dovecot/plugins/quota_warning.sh 95 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_before: /etc/dovecot/sieve/default.sieve dict: expire: sqlite:/etc/dovecot/plugins/expire.conf
On Jul 22, 2009, at 9:01 AM, Nikita Koshikov wrote:> Here is my config section, which I added to enable virtual plugin: > namespace private { > prefix = Company/ > separator = / > location = virtual:/var/mail/virtual > subscriptions = no > } > and "virtual" to mail_plugins in imap and lda section. Full dovecot - > n config provided at the end of this message. > I'm not sure, if it is save to enable virtual location for all users > using the same path, but the main goal for me - to create dovecot- > virtual files once for all users. Maybe INDEX-es should be > personalize for this setup work correct ?Yes, since each user's virtual mailbox would look different the index files have to be also separate for each user. Otherwise they'll just be recreated every time. location = virtual:/var/mail/virtual:INDEX=~/virtual Or something like that.> (no debugging symbols found)..> (gdb) bt full > #0 0xb7f6157c in ?? () from /usr/lib/dovecot/imap/ > lib20_virtual_plugin.so > No symbol table info available. > #1 0x083895d8 in ?? ()Still, it shouldn't crash. This backtrace with only "??" isn't useful. Having debugging symbols would help a lot in fixing this crash.
On Wed, 2009-07-22 at 21:54 +0300, Nikita Koshikov wrote:> > You can check if symbols are stripped with "file": > > > > /usr/local/libexec/dovecot/imap: ELF 32-bit LSB executable, Intel 80386, > > version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux > > 2.6.15, not stripped> > > Yes, you right, file echo's stripped. > > I'm using gentoo and its package manager - emerge. It compiles binaries for system from sources using ebuilds. I attach full compile log, can you tell me where stripping appear?There's no -g parameter given to gcc. The emerge overrides CFLAGS by adding -march=i686 etc. stuff in there, which also removes -g parameter. Try to figure out some way to add it back. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090722/184a877c/attachment-0002.bin>
> There's no -g parameter given to gcc. The emerge overrides CFLAGS by > adding -march=i686 etc. stuff in there, which also removes -g parameter. > Try to figure out some way to add it back.(gdb) bt full #0 0xb7d80080 in virtual_storage_sync_init () from /usr/lib/dovecot/imap/lib20_virtual_plugin.so No symbol table info available. #1 0x08070294 in imap_sync_init (client=0x8134a40, box=0x813d480, imap_flags=IMAP_SYNC_FLAG_SAFE, flags=0) at imap-sync.c:146 ctx = (struct imap_sync_context *) 0x83809b8 __PRETTY_FUNCTION__ = "imap_sync_init" #2 0x0807057a in cmd_sync_delayed (client=0x8134a40) at imap-sync.c:591 cmd = <value optimized out> first_expunge = <value optimized out> first_nonexpunge = <value optimized out> __PRETTY_FUNCTION__ = "cmd_sync_delayed" #3 0x08067b64 in client_handle_input (client=0x8134a40) at client.c:728 ret = false remove_io = false handled_commands = true __PRETTY_FUNCTION__ = "client_handle_input" #4 0x0806838f in client_input (client=0x8134a40) at client.c:752 cmd = <value optimized out> output = (struct ostream *) 0x8134bf4 bytes = <value optimized out> __PRETTY_FUNCTION__ = "client_input" #5 0x080fa720 in io_loop_handler_run (ioloop=0x812e9b0) at ioloop-epoll.c:208 ctx = (struct ioloop_handler_context *) 0x812eab8 event = (const struct epoll_event *) 0x812eaf8 list = (struct io_list *) 0x8134c78 io = (struct io_file *) 0x8134c50 tv = {tv_sec = 0, tv_usec = 395850} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 j = 0 call = <value optimized out> #6 0x080f9ba0 in io_loop_run (ioloop=0x812e9b0) at ioloop.c:338 No locals. #7 0x08070e15 in main (argc=Cannot access memory at address 0xe ) at main.c:323 No locals. (gdb)