[Mailman-Developers] race condition in locking ?
Sat, 5 Feb 2000 23:21:30 +0100
On Sat, Feb 05, 2000 at 08:56:53PM +0100, Ricardo Kustner wrote (in private):
> Traceback (innermost last):
> File "/usr/local/mailman/scripts/driver", line 112, in run_main
> File "../Mailman/Cgi/admindb.py", line 123, in main
> File "/usr/local/mailman/Mailman/MailList.py", line 819, in Save
> File "../Mailman/ListAdmin.py", line 90, in SaveRequestsDb
> File "../Mailman/ListAdmin.py", line 74, in __closedb
> assert self.Locked()
> if you need to see the logs/error or logs/lock files let me know...
[ CC: the list, because of the questions at the bottom ]
Hmmm. I think I found the problem, but I'm not entirely sure. It looks like
the default MailList lock timeout is 60 seconds, and that that is too short
for your machine. You should see some 'stolen!' or (in my LockFile version)
'broken!' messages, in your logs/locks file.
In any case, you can easily try it out; in Mailman/MailList.py, on or around
line 282, there should be a 'lifetime = 60', inside the constructor for the
maillists' lockfile. Changing the '60' in, say, '600', should give you
better mileage, at least until your machine gets so heavily loaded that a
simple admin request takes ten full minutes to process ;)
I'm not sure what the Right Fix is, however. MailList.MailList does not have
an advertised way of setting the lock lifetime, nor of refresh()ing the
lock. Maybe someone with more experience (barry ? any other active
developers) can shed light here... Is the usual solution to raise the
initial lock timeout, passing lock timeout in the constructor, adding the
two functions and calling them where appropriate, or just using __lock
BTW, whoever documented that part of the code, thank you ;) with the 'TBD'
remark above the lockfile constructor this was a sucker to find. It really
means a lot to have it so well documented.
Thomas Wouters <firstname.lastname@example.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!