[Mailman-Developers] List locks not getting relinquished

Chris Boulter chris at jellybaby.net
Mon Jan 19 12:43:04 EST 2004


Hi,

I'm having some problems with lists not getting unlocked. I don't really
know how to set about debugging this and I haven't found anything in this
list's archive or the documentation to help. My Mailman installation is
quite non-standard, so it may be hard to provide help, but I'd appreciate
hints about how to debug the locking mechanism (for instance, can I tell
which process created a lock?).

I'm using Mailman 2.1.2. We have sync_members running in a loop from a
daemon, syncing ~500 lists every few hours. Of these, half a dozen lists are
failing (and my daemon has to forcibly kill the sync_members process when it
detects a timeout). There seems to be no common feature to the lists which
fail. When it happens, I can forcibly break the locks and restore correct
behaviour by manually deleting Mailman/locks/*, but then the problem recurs
eventually. However, once I've broken the locks, I can successfully run
sync_members on the lists from the command line hundreds or thousands of
times without failure, either making changes to the subscribers or not each
time.

I tried setting
        LIST_LOCK_DEBUGGING = On
but didn't find the result enlightening (I can post some here if anyone
thinks this is a good place to look).

So maybe it's something about the daemon which doesn't relinquish a lock.
What the daemon does is mostly to run sync_members but occasionally to run
newlist or a Python script of my devising (to change a user's password on a
list, or change the list owner). Possibly my own scripts are bad: I don't
know much about Python, but I've checked them as carefully as I can. I've
posted them here in case any kind individual could cast an eye over them
(mostly kludged together from distributed Mailman code):
        http://chris.jellybaby.net/mailman/

The command being run by the daemon, and the stacktrace when I ran the
command manually and hit ^C are below (nb I've modified sync_members and
added an '--ignore-invalid' option, so the line numbers below aren't correct
for the standard distro).


/usr/local/mailman/bin/sync_members --ignore-invalid --welcome-msg=no
--goodbye-msg=no --notifyadmin=no --file /var/tmp/mlmsync124897.tmp
latin.america
^CTraceback (most recent call last):
  File "/usr/local/mailman/bin/sync_members", line 301, in ?
    main()
  File "/usr/local/mailman/bin/sync_members", line 234, in main
    mlist = MailList.MailList(listname)
  File "/usr/local/mailman/Mailman/MailList.py", line 122, in __init__
    self.Lock()
  File "/usr/local/mailman/Mailman/MailList.py", line 155, in Lock
    self.__lock.lock(timeout)
  File "/usr/local/mailman/Mailman/LockFile.py", line 312, in lock
    self.__sleep()
  File "/usr/local/mailman/Mailman/LockFile.py", line 496, in __sleep
    time.sleep(interval)
KeyboardInterrupt

Many thanks,
Chris



More information about the Mailman-Developers mailing list