Quoting David Carter <dpc22@xxxxxxxxx>:
On Mon, 21 Jan 2008, Michael Menge wrote:i used mbexamine user/testuser | less to check the check the mailbox of testuser. I forgot to quit less over the weekend and today i discoverd two problems. 1. The mailbox was blocked. No new mails were deliverd to this mailbox.The mailbox was left in a locked state. (fcntl() or flock() locks on both cyrus.header and cyrus.index).
I know, but i don't understand why the mailbox was left in a locked state. even if the mbexamine needs a to lock the mailbox it should release the lock if it's not needed anymore.
2. After quitting less, the new mails had been delivered multiple times depending on the retries of lmtpd.I imagine that you had a whole stack of lmtp processes waiting to acquire the lock on the mailbox. I'm a little suprised that something didn't time out, but I guess that the entire message would be sitting in the staging directory before lmtpd attempts to lock the target mailbox.
Postfix reportet time outs, and attempted an other delivery. But i can't tell howmany lmtpd-processes waited for a lock on the mailbox and if any of them timed out, but the user reportet that he had some mails deliverd 70 times, so i thing none timed out all all got deliverd when the lock was released.
is this a (known) bug? Are there other cyrus tools which will have the same effect? unexpunge -l ?Any command line tool which locks a mailbox and then generates output will have the same behaviour. unexpunge would be the obvious example. Whether this is a bug is debatable. Neither mbexamine or unexpunge actually needs to lock the mailbox when they are just dumping mailbox state, but locking is normally the safest course of action. They aren't supposed to be long running processes.
I know that these processed aren't supposed to be long running, but the lock should be hold as short as possible.
-- David Carter Email: David.Carter@xxxxxxxxxxxxx University Computing Service, Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH. ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
-------------------------------------------------------------------------------- M.Menge Tel.: (49) 7071/29-70316 Universitaet Tuebingen Fax.: (49) 7071/29-5912Zentrum fuer Datenverarbeitung mail: michael.menge@xxxxxxxxxxxxxxxxxxxx
Waechterstrasse 76 72074 Tuebingen
Attachment:
smime.p7s
Description: S/MIME krytographische Unterschrift
---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html