57 messages in net.sourceforge.lists.courier-users[courier-users] Re: OpenBSD 3.2 break...
FromSent OnAttachments
Sam VarshavchikJan 13, 2003 3:46 pm 
Richard LyonsJan 13, 2003 5:57 pm 
D. J. BernsteinJan 13, 2003 6:11 pm 
Sam VarshavchikJan 13, 2003 9:11 pm 
Russell NelsonJan 13, 2003 9:46 pm 
Sam VarshavchikJan 13, 2003 10:19 pm 
Russell NelsonJan 13, 2003 11:11 pm 
Sam VarshavchikJan 13, 2003 11:35 pm 
James GravesJan 14, 2003 7:36 am 
mw-l...@csi.huJan 14, 2003 7:39 am 
Sam VarshavchikJan 14, 2003 3:22 pm 
mw-l...@csi.huJan 14, 2003 11:13 pm 
Sam VarshavchikJan 15, 2003 5:11 am 
Matthias AndreeJan 15, 2003 9:55 am 
Sam VarshavchikJan 15, 2003 3:11 pm 
Matthias AndreeJan 15, 2003 4:13 pm 
Sam VarshavchikJan 15, 2003 4:48 pm 
Johan LindhJan 15, 2003 10:16 pm 
Peter C. NortonJan 15, 2003 11:52 pm 
Bill MichellJan 16, 2003 1:30 am 
Johan LindhJan 16, 2003 2:00 am 
Matthias AndreeJan 16, 2003 2:22 am 
Bill MichellJan 16, 2003 2:28 am 
Matthias AndreeJan 16, 2003 2:28 am 
Matthias AndreeJan 16, 2003 2:45 am 
David LaightJan 16, 2003 3:14 am 
Sam VarshavchikJan 16, 2003 4:58 am 
Sam VarshavchikJan 16, 2003 5:01 am 
Johan LindhJan 16, 2003 6:28 am 
Bob JohnsonJan 16, 2003 7:42 am 
James GravesJan 16, 2003 8:18 am 
Alex...@nokia.comJan 16, 2003 8:58 am 
Bill MichellJan 16, 2003 9:06 am 
Johan LindhJan 16, 2003 9:45 am 
Matthias AndreeJan 16, 2003 9:46 am 
Matthias AndreeJan 16, 2003 9:47 am 
Liviu DaiaJan 16, 2003 12:17 pm 
mw-l...@csi.huJan 16, 2003 12:48 pm 
Sam VarshavchikJan 16, 2003 2:55 pm 
Matthias AndreeJan 16, 2003 3:11 pm 
Peter C. NortonJan 16, 2003 6:13 pm 
Sam VarshavchikJan 16, 2003 7:03 pm 
in...@lauwira.orgJan 16, 2003 10:20 pm 
Sam VarshavchikJan 17, 2003 4:47 am 
Matthias AndreeJan 17, 2003 7:55 am 
in...@lauwira.orgJan 17, 2003 8:41 am 
Saxon JonesJan 17, 2003 9:44 am 
in...@lauwira.orgJan 17, 2003 10:49 am 
mw-l...@csi.huJan 17, 2003 12:30 pm 
Sam VarshavchikJan 17, 2003 2:35 pm 
Mike LemoineJan 17, 2003 3:07 pm 
in...@lauwira.orgJan 17, 2003 3:12 pm 
Saxon JonesJan 17, 2003 3:44 pm 
in...@lauwira.orgJan 17, 2003 3:48 pm 
Matthias AndreeJan 18, 2003 5:05 am 
Matthias AndreeJan 18, 2003 5:06 am 
in...@lauwira.orgJan 20, 2003 9:57 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: OpenBSD 3.2 breaks Courier, Qmail.Actions...
From:James Graves (jgra@deltamobile.com)
Date:Jan 14, 2003 7:36:40 am
List:net.sourceforge.lists.courier-users

Sam Varshavchik <mrs@courier-mta.com> wrote:

It's been brought to my attention that OpenBSD 3.2 can assign the same pid to different processes in the same chronological second (that is, one process terminates, and its pid is immediately assigned to a new process that's created soon thereafter).

Since filenames for messages in maildirs are generated based on the combination of the pid, and the current time, in seconds, there is now a race condition that will result in loss or corruption of mail. This breaks Courier and Qmail. Example: process A delivers a message to a maildir just before process B reads Maildir/new, and A's message is moved to Maildir/cur a short time after it's been delivered, and A exits; meanwhile process C starts, and delivers mail to the same maildir; its generated filename will now be the same; so now you will have two messages with the same base filename in the maildir).

This is not theoretical. This been brought to my attention after someone managed to succesfully deliver two messages with the same filename, on a piddly Athlon (as part of a Courier "stress test"). Let's have a round of applause for such a noteworthy accomplishment!

Ah, I was testing Courier on a OpenBSD 3.1 machine, and noticed a bit of odd behavior. This must be the cause of it!

I had previously run the stress test for mail delivery. When delivering a large number of messages at once (like 5000) using that test script, I would see a few (like 1 to 3) messages somehow dropped. I never got any error messages from Courier, and nothing else seemed to be a problem. No stuck processes or anything. At first I thought it was an NFS problem (all Maildirs were NFS mounted), but setting up an account for local delivery didn't help.

I've applied the patch to my copy of Courier 0.39.1 on that same OpenBSD 3.1 machine and re-run the perftest1 program. Now it seems to work fine, with no dropped messages.

Kudos to Sam and whoever it was that made the connection to recycled PIDs.