[Mailman-Users] weird locking behavior...

Brian Behlendorf brian at hyperreal.org
Fri May 14 07:37:13 CEST 1999

Hi.  Sorry for the newbie question.

FreeBSD 3.1-STABLE, qmail 1.03, python 1.5.2, delivering through a
virtualhost using a "mailman" user in /var/qmail/control/virtualhosts.

When a user subscribes through the public interface, two lockfiles
get created/touched in the locks directory:
  laswell# ls -l /home/mailman/locks/
  total 1
  -rw-rw-rw-  1 nobody  mailman   0 May 13 21:15 developer-announce.lock
  -rw-rw-r--  1 nobody  mailman  85 May 13 21:16 pending_subscriptions.lock

However, even after the script finishes running, those lockfiles remain.
Maybe I'm misunderstanding the point of the lockfiles, but it seems like
they should disappear after the process is completed.  This may be a clue
to the real problem:

The presence of these lockfiles causes mailcmd to hang.  The subscriber
can send the confirmation message, it confirms them, the confirmation
"welcome to the list" message gets back to the subscriber, but then the
process doesn't die:

mailman 64327  0.0  0.1   776  360  p1  I    10:01PM   0:00.00 bin/qmail-local -- mailman /home/mailman mailman-developer-announce-request - developer-announce-request lists.sourcexchange.com brian at hy
mailman 64329  0.0  0.1   496  292  p1  I    10:01PM   0:00.00 /bin/sh -c /home/mailman/mail/wrapper mailcmd developer-announce
mailman 64330  0.0  0.5  2680 1320  p1  I    10:01PM   0:00.15 /usr/local/bin/python /home/mailman/scripts/mailcmd developer-announce
mailman 64332  0.0  0.0     0    0  p1  Z    -         0:00.00  (sh)

ktrace on 64330 shows nothing, so something weird is getting triggered.  
When that process is killed, a message is sent to the subscriber:

  This is an automated response.

  There were problems with the email commands you sent to Mailman via
  the administrative address
  developer-announce-request at lists.sourcexchange.com.  If you want to
  reach the human being that manages this mailing list, please send your
  message to developer-announce-admin at lists.sourcexchange.com.  The
  following is a detailed description of the problems.

  ***** confirm 156719
  >>>>> Invalid confirmation number!
  Note that confirmation numbers e...

Heh, that "e..." sounds like it would have been interesting to hear!  And
note that it says "Invalid conf #", yet it succeeded, since the address
got subscribed and everything.  Nothing else is logged about that hung
process explaining why.

While this process is hung, pages on the web site hang, and further mail
processes hang too.  In short, the situation is not good.  =)

OK, so it sounds like one of the FAQ questions, right?  But I've gone
through the INSTALL notes as well as FAQ.* and it all looked kosher to me.
All the web scripts are setgid mailman and the mail wrapper is setgid as

When I built the program I used 

  ./configure --with-cgi-gid=65534 --with-mail-gid=500

I do not see those "WANTED gid blah, GOT gid blah" messages, so I think
this is correct.  I actually tried following the advice in README.QMAIL
about setting the mail gid to be "nofiles", but then I started getting
that "WANTED/GOT" message, so I went back to gid 500, i.e. "mailman".

I could sit here all day killing python like a video game, but I'd rather
fix this.  What did I do wrong?

Let me know if anyone needs more data.



More information about the Mailman-Users mailing list