Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Timo Sirainen

On 14.5.2007, at 17.54, Ralf Hildebrandt wrote:


One, just one (!) of our users gets:

May 14 16:47:17 postamt dovecot: imap-login: Login:  
user=username, method=PLAIN, rip=141.42.x.y, lip=ip.of.the.server
May 14 16:47:17 postamt dovecot: imap-login: Login:  
user=username, method=PLAIN, rip=141.42.x.y, lip=ip.of.the.server
May 14 16:47:17 postamt dovecot: IMAP(username): maildir_file_do(/ 
var/admhome/username/Maildir) racing


This happens at every login? I thought I'd never see this racing  
error. It means that Dovecot tried to some operation to a maildir  
file. But the operation failed, because the file was just renamed  
(eg. flag changed). So it located the file again, and found it. Then  
it tried the operation again, but it failed the same way. This was  
tried 10 times until it gave this racing error.


I think it's a bit unlikely that the filename was changing that fast.  
So there's probably a bug somewhere.. Could get strace output from  
those two logins and send them to me? You can do this with eg.:


mail_executable = /usr/local/bin/run-imap.sh

run-imap.sh:

#!/bin/sh
exec strace -tt -s 1000 -o /tmp/imap.$USER.`time +%u`.$$.log /usr/ 
local/libexec/dovecot/imap




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Ralf Hildebrandt
* Timo Sirainen [EMAIL PROTECTED]:

 This happens at every login? I thought I'd never see this racing  
 error.

I found the reason:

The User had a symlink in his $HOME/Maildir/cur, which pointed to a
NON-existing file :(

Courier-IMAP ignored that, dovecot bailed out.

I removed the bogus symlink and all is well now.

 It means that Dovecot tried to some operation to a maildir  
 file.

Yep.

-- 
Ralf Hildebrandt (i.A. des IT-Zentrums) [EMAIL PROTECTED]
Charite - Universitätsmedizin BerlinTel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-BerlinFax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBFsend no mail to [EMAIL PROTECTED]


Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Timo Sirainen
On Tue, 2007-05-15 at 11:48 +0200, Ralf Hildebrandt wrote:
 * Timo Sirainen [EMAIL PROTECTED]:
 
  This happens at every login? I thought I'd never see this racing  
  error.
 
 I found the reason:
 
 The User had a symlink in his $HOME/Maildir/cur, which pointed to a
 NON-existing file :(

I've changed Dovecot's behavior now also:

x fetch * body
imap(tss): Error: Maildir: Symlink destination doesn't
exist: /home/tss/Maildir/cur/dgdgd
* 40 FETCH (BODY (text plain NIL NIL NIL 7bit 0 0 NIL NIL NIL))
x OK Fetch completed.

So it logs an error but still goes ahead without disconnecting the
client.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Ralf Hildebrandt
* Timo Sirainen [EMAIL PROTECTED]:

 I've changed Dovecot's behavior now also:
 
 x fetch * body
 imap(tss): Error: Maildir: Symlink destination doesn't
 exist: /home/tss/Maildir/cur/dgdgd
 * 40 FETCH (BODY (text plain NIL NIL NIL 7bit 0 0 NIL NIL NIL))
 x OK Fetch completed.
 
 So it logs an error but still goes ahead without disconnecting the
 client.

Great! Thank you.

Success story: We were using courier-imap with 9000 User accounts here
at Charite and yesterday I switched to dovecot for imap, imaps and
pop3s. The load dropped from 50-60 to 2 (!) during noon.

Excellent!

-- 
Ralf Hildebrandt (i.A. des IT-Zentrums) [EMAIL PROTECTED]
Charite - Universitätsmedizin BerlinTel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-BerlinFax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBFsend no mail to [EMAIL PROTECTED]


Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Stephan Holl
Hello Ralf,

Ralf Hildebrandt [EMAIL PROTECTED], [20070515 - 12:37:36]

 * Timo Sirainen [EMAIL PROTECTED]:
 
  I've changed Dovecot's behavior now also:
  
  x fetch * body
  imap(tss): Error: Maildir: Symlink destination doesn't
  exist: /home/tss/Maildir/cur/dgdgd
  * 40 FETCH (BODY (text plain NIL NIL NIL 7bit 0 0 NIL NIL
  NIL)) x OK Fetch completed.
  
  So it logs an error but still goes ahead without disconnecting the
  client.
 
 Great! Thank you.
 
 Success story: We were using courier-imap with 9000 User accounts here
 at Charite and yesterday I switched to dovecot for imap, imaps and
 pop3s. The load dropped from 50-60 to 2 (!) during noon.
 
 Excellent!

Are you willing to elaborate a bit about your setup, hardware, config,
etc?
This would be good to know what mailsystem is behind that values :-)

Thanks
Stephan



Re: [Dovecot] maildir_file_do(/var/admhome/user/Maildir) racing

2007-05-15 Thread Ralf Hildebrandt
* Stephan Holl [EMAIL PROTECTED]:

 Are you willing to elaborate a bit about your setup, hardware, config,
 etc?
 This would be good to know what mailsystem is behind that values :-)

Debian/testing, hand-rolled 2.6.21.1-NOHZ-SMP kernel
The users are stored in /etc/passwd (for historical reasons (don't ask))
Dual Xeon 2.8GHz with 3GB RAM
1,8TB mailstore (ext3, external SCSI RAID)

-- 
Ralf Hildebrandt (i.A. des IT-Zentrums) [EMAIL PROTECTED]
Charite - Universitätsmedizin BerlinTel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-BerlinFax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBFsend no mail to [EMAIL PROTECTED]