Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version

2009-11-06 Thread Nikita Koshikov
On Thu, 05 Nov 2009 12:52:08 -0500
Timo Sirainen t...@iki.fi wrote:

 On Sat, 2009-10-31 at 10:42 +0200, Nikita Koshikov wrote:
  The patch helped with quotas, but it raises new error - segmentation error
 
 gdb backtrace would be helpful. But how to actually get it could be a
 bit difficult, since I guess kernel thinks expire-tool is a setuid
 program.
 
 There are two ways I guess:
 
 a) Apply attached diff1 and see if core dump gets written. Once you get
 a core, use gdb expire-tool core, bt full.
This didn't create core file.

 
 b) If not, apply diff2 and start expire-tool. Then look up its pid and
 run gdb -p pid, cont, wait for crash, bt full.

I don't understand why gdb says no debugging symbols found for some dovecot's 
executables, all binaries under /usr/libexec/dovecot have not stripped

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.
Attaching to process 26407
Reading symbols from /usr/libexec/dovecot/expire-tool...(no debugging symbols 
found)...done.
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/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.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f02ac0 (LWP 26407)]
Loaded symbols for /lib/libpthread.so.0
(no debugging symbols found)
0xe424 in __kernel_vsyscall ()
(gdb) cont
Continuing.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7f02ac0 (LWP 26407)]
0xb7f88749 in ?? () from /lib/libc.so.6
(gdb) bt full
#0  0xb7f88749 in ?? () from /lib/libc.so.6
No symbol table info available.
Cannot access memory at address 0xbf690ff8
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/libexec/dovecot/expire-tool, process 26407




[Dovecot] unsubscribe

2009-11-06 Thread Jon Essen-Moller
On Thu, Nov 5, 2009 at 22:42, Lampa lamp...@gmail.com wrote:

 Hello,

 seems that LDA ignores deliver_log_format (still log with format:
 msgid=%m: %$)

 # 1.2.6: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.31 x86_64 Debian squeeze/sid xfs
 log_path: /var/log/dovecot/error.log
 info_log_path: /var/log/dovecot/info.log
 log_timestamp: %Y-%m-%d %H:%M:%S
 protocols: none
 listen: none
 disable_plaintext_auth: no
 login_dir: /var/run/dovecot/login
 login_executable: /usr/lib/dovecot/imap-login
 mail_location: maildir:/home/mail/%d/%n/Maildir
 mbox_write_locks: fcntl dotlock
 lda:
   postmaster_address: postmas...@domain.tld
  mail_plugins: sieve quota
   deliver_log_format: from=%f msgid=%m: %$
  auth_socket_path: /var/run/dovecot/auth-master
 auth default:
  mechanisms: plain login
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: static
args: uid=500 gid=500 home=/home/mail/%d/%n allow_all_users=yes
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail
 plugin:
  quota: dict:user::file:/home/mail/%d/%n/Maildir/dovecot-quota
  quota_rule: *:storage=500M:messages=1
  quota_warning: storage=95%% /etc/dovecot/quota-warning.sh
  quota_warning2: storage=80%% /etc/dovecot/quota-warning.sh
  global_script_path: /home/mail/globalsieverc


 Is there some change from this
 http://www.dovecot.org/list/dovecot/2009-April/039013.html or
 http://www.dovecot.org/list/dovecot/2009-May/039269.html ?

 --
 Lampa



Re: [Dovecot] mailbox count folders issues

2009-11-06 Thread Nikita Koshikov
On Thu, 29 Oct 2009 12:38:22 -0400
Timo Sirainen t...@iki.fi wrote:

 On Thu, 2009-10-29 at 12:11 +0200, Nikita Koshikov wrote:
  On Wed, 28 Oct 2009 14:17:52 -0400
  Timo Sirainen t...@iki.fi wrote:
  
   On Wed, 2009-10-28 at 10:39 +0200, Nikita Koshikov wrote:
  Oct 26 15:26:38 IMAP(gozhd...@domain.com): Panic: data stack: Out 
  of memory when allocating 268435472 bytes
  Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: *** glibc 
  detected *** imap: double free or corruption (!prev): 0x0812ba00 ***
   
   Oh, the double free is because of broken handling of out-of-memory
   error. http://hg.dovecot.org/dovecot-1.2/rev/acfef2f0fec3 probably fixes
   that.
  
  Sorry, but this patch didn't help.
 
 Not with the out of memory, but did it get rid of the double free or
 corruption error?
 
   Hmm. So I guess there's no memory corruption causing this, but I don't
   really see why it would try to allocate that much memory. 268435472 in
   hex is 0x1010, which is an interesting number but doesn't really
   help much either.
  268435456 is 256M which is max mail_process_size config setting, maybe this 
  values is in use ? 
 
 I guess it's just exponentially increasing the buffer size then until it
 reaches mail_process_size.
 
  I recompile dovecot binaries with debug symbols, but seemed that gdb 
  backtrace is broken.
 
 Yeah, it is. Hmm. Since the core isn't working, can you attach gdb to
 imap process while it's still running? So something like:
 
  - open the account so imap process starts
  - gdb -p imap process pid
  - gdb command: c
  - cause imap to crash - gdb should stop
  - gdb command: bt full
 

I found I way, to switch crash under telnet session and attach gdb to process, 
but this didn't produce valid trace:

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.
Attaching to process 29952
Reading symbols from /usr/libexec/dovecot/imap...(no debugging symbols 
found)...done.
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/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.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7dccac0 (LWP 29952)]
Loaded symbols for /lib/libpthread.so.0
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)
0xe424 in __kernel_vsyscall ()
(gdb) cont
Continuing.
(no debugging symbols found)

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7dccac0 (LWP 29952)]
0xe424 in __kernel_vsyscall ()
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) yes
Detaching from program: /usr/libexec/dovecot/imap, process 29952