[ Copied to Majordomo-workers due to the included patch ]
[ Petter Nilsen writes: ]
>
> See the attached message from the bounce I got yesterday. I'm pretty
> sure what the problem is, and it's caused by majordomo. I haven't
> checked, and most likely won't since I don't want to experiment with
> majordomo which is running quite a few lists. Anyway, he's my theory
> about the problem:
>
> - majordomo receives a message to a mailing list
> - majordomo receives a admin unsubscribe message from me for the same
> list
> - majordomo updates the subscribtion list for this list, but doesn't
> create a lockfile to keep others away until it's done.
> - majordomo tries to pass the subscribtion list to sendmail, which
> fails since it's being modified. Also, it doesn't check if anyone is
> actually modifying the list of subscribers (using that non-existing
> lock file). The alias loop breaks, the mail bounces.
>
> Is this the correct scenario? From what I can see from the sources,
> this could very well be the case. Any chance of a fix coming fairly
> soon?
It's true that there's no locking of the list between Mj and the MTA (do
any MTAs even attempt to lock included files?). In fact I noted this
awhile back (see the thread starting with:
http://www.hpc.uh.edu/majordomo-users/9704/msg00346.html
The problem is a window when Mj is unsubscribing an address between the
time the list file is unlinked and the updated file is linked to the
list file name.
I proposed a patch but never got around to doing it when someone claimed
that rename() didn't exist in Perl 4. Seems to work fine in 4.036, so
here 'tis:
--- majordomo.orig Sun Apr 20 11:11:49 1997
+++ majordomo Thu May 1 09:46:05 1997
@@ -457,9 +457,8 @@
# we deleted exactly 1 name, so now we shuffle the files
link("$listdir/$clean_list", "$listdir/$clean_list.old") ||
&abort("link(\"$listdir/$clean_list\", \"$listdir/$clean_list.old\"): $!");
- unlink("$listdir/$clean_list");
- link("$listdir/$clean_list.new", "$listdir/$clean_list") ||
- &abort("link(\"$listdir/$clean_list.new\", \"$listdir/$clean_list\"): $!");
+ rename("$listdir/$clean_list.new", "$listdir/$clean_list") ||
+ &abort("rename(\"$listdir/$clean_list.new\", \"$listdir/$clean_list\"): $!");
unlink("$listdir/$clean_list.old");
if (defined $deflist) {
print REPLY "Succeeded (from list $deflist).\n";
--
Dave Wolfe
Follow-Ups:
References:
|
|