Re: [courier-users] imapd locking against itself? (long post, sorry)
Brought to you by:
mrsam
|
From: Need C. <nee...@gm...> - 2011-11-01 01:34:06
|
On Saturday, October 22, 2011, Need Coffee <nee...@gm...> wrote: > On Sat, Oct 22, 2011 at 10:55 AM, Sam Varshavchik <mr...@co...> wrote: >> Need Coffee writes: > > [snip] > >> But I'm guessing that this also happens when the imap server has already >> created a lock file, then it gets killed, and on a busy server, the process >> id might get recycled quickly enough before some other process removes the >> stale lock. The logic that checks for stale locks won't remove the lock file >> if the process ID recorded in the lock file still exists, but it's the same >> process ID. >> >> That's easy enough to fix, but you still have a problem that's aborting the >> IMAP processes in the first place. > > The testsuite ends this way, but when serving mail, the imapd process doesn't > abort -- it creates the lockfile, and somehow the same instance continues > attempting to create it again. The ktrace snippet was just an iteration or > two but it loops forever (until killed). I usually use a commandline mail > client and it blocks waiting on its imapd -- which from ps will have been > running for a long time at that point. I apologize if my description gave > the wrong impression, but I am sure the process is the same -- it's not pid > reuse. > >> This patch should fix both the imap process getting stuck because of a lock >> file left over from an aborted process with the same pid, and the reformime >> segfault. But you still have an unresolved root cause for the aborted >> process, that's yet to be determined. > > Thanks for the fast answer! I've applied these and are testing now. I'll > report back what I find... Sorry for the delay, I wanted to be sure it worked on all the clients. Since applying the patch the issue has not recurred. Thanks very much for the quick solution! |