[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#43651: marked as done ([AMENDMENT 13/10/1999] mailbox locking)



Your message dated Sat, 6 Nov 1999 21:13:58 +0000 (GMT)
with message-id <E11kD9q-0000Vf-00@polya>
and subject line Fixed in debian-policy 3.1.0.0
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 28 Aug 1999 12:46:23 +0000
Received: (qmail 17576 invoked from network); 28 Aug 1999 12:46:22 -0000
Received: from postfix.rhein.de (193.175.27.8)
  by master.debian.org with SMTP; 28 Aug 1999 12:46:22 -0000
Received: by postfix.rhein.de (Postfix, from userid 5)
	id 3464E128B4; Sat, 28 Aug 1999 14:45:51 +0200 (MET DST)
Received: from luv (luv)
	by aiur (rbsmtp 2.3pl8bMS);
	Sat Aug 28 14:45:50 1999
	using /var/spool/bsmtp/out/q20698.01.935844350
Received: from spinnaker.rhein.de (root@spinnaker.rhein.de [193.175.27.129])
	by luv.rhein.de (8.9.3/8.9.3/Debian/GNU) with ESMTP id OAA02746;
	Sat, 28 Aug 1999 14:44:13 +0200
Received: (from roland@localhost)
	by spinnaker.rhein.de (8.9.3/8.9.3/Debian/GNU) id OAA19576;
	Sat, 28 Aug 1999 14:44:11 +0200
Date: Sat, 28 Aug 1999 14:44:11 +0200
Message-Id: <199908281244.OAA19576@spinnaker.rhein.de>
From: Roland Rosenfeld <roland@spinnaker.de>
Subject: debian-policy: [PROPOSAL] mailbox locking
To: submit@bugs.debian.org
X-Mailer: bug 3.2.2
Sender: roland@spinnaker.rhein.de

Package: debian-policy
Version: 3.0.1.1
Severity: normal

The Debian policy is not very clear in the definition of the way,
mailbox locking should be implemented.  It only points to a "reference 
implementation" (liblockfile), which is said to be NFS-safe, but it
isn't with Linux kernel 2.2.* (see other messages in debian-policy and 
debian-devel about this problem).

So I propose to change the following paragraph:

     All Debian MUAs and MTAs have to use the `maillock' and `mailunlock'
     functions provided by the `liblockfile' packages to lock and unlock
     mail boxes. These functions implement a NFS-safe locking mechanism.
     (It is ok if MUAs and MTAs don't link against liblockfile but use a
     _compatible_ mechanism. Please compare the mechanisms very carefully!)

I had a look over the mailbox locking programs and there are <25%
which use liblockfile, all others implement locking themselves (some
of them in a compatible way, some without...).

So I think we should change the above paragraph to something which
explicitly says, how locking has to be implemented:

     All Debian MUAs, MTAs, MDAs and other mailbox accessing programs
     (like IMAP daemons) have to lock the mailbox in a NFS-safe way.
     This means that fcntl() locking has to be combined with dot
     locking.  To avoid dead locks, a program has to use fcntl() first
     and dot locking after this or alternatively implement the two
     locking methods in a non blocking way[1].  Using the functions
     `maillock' and `mailunlock' provided by the `liblockfile*'[2]
     packages is the recommended way to realize this.

     Footnotes: 
     [1] If it is not possible to establish both locks, the system
         shouldn't wait for the second lock to be established, but
         remove the first lock, wait a (random) time, and start over
         locking again.
     [2] liblockfile version >= .... (fill in a version number here,
         which implements the above noted non blocking mechanism
         without blocking).


Thomas Roessler <roessler@guug.de> posted a skeleton of maillock() to
debian-devel, maybe we should place this somewhere in the policy or in
/usr/[share/]doc/debian-policy/ or take this as a basis for a new
version of liblockfile:

int do_lock (const char *path, int fd, int retries)
{
        int i;
        int rv;
        
        for (i = 0; i < retries; i++)
        {
                if ((rv = do_fcntl_lock (fd)) == -1 && errno != EAGAIN)
                        return -1;
                else if (rv == 0)
                {
                        if (do_dotlock (path) == 0)
                                return 0;
                        do_fcntl_unlock (fd);
                }
                sleep (rand() % 10);
        }
        return -1;
}


Ciao

        Roland
---------------------------------------
Received: (at 43651-done) by bugs.debian.org; 6 Nov 1999 21:31:45 +0000
Received: (qmail 17140 invoked from network); 6 Nov 1999 21:15:11 -0000
Received: from mserv1c.u-net.net (195.102.240.33)
  by master.debian.org with SMTP; 6 Nov 1999 21:15:11 -0000
Received: from [195.102.196.44] (helo=polya)
	by mserv1c.u-net.net with esmtp (Exim 2.10 #35)
	id 11kD9x-0005Qp-00; Sat, 6 Nov 1999 21:14:05 +0000
Received: from jdg by polya with local (Exim 3.03 #1 (Debian))
	id 11kD9q-0000Vf-00; Sat, 06 Nov 1999 21:13:58 +0000
Subject: Fixed in debian-policy 3.1.0.0
To: 8221-done@bugs.debian.org, 17621-done@bugs.debian.org, 
 19179-done@bugs.debian.org, 24695-done@bugs.debian.org, 
 32448-done@bugs.debian.org, 32449-done@bugs.debian.org, 
 33076-done@bugs.debian.org, 40766-done@bugs.debian.org, 
 40767-done@bugs.debian.org, 41095-done@bugs.debian.org, 
 41121-done@bugs.debian.org, 41232-done@bugs.debian.org, 
 41547-done@bugs.debian.org, 41829-done@bugs.debian.org, 
 42358-done@bugs.debian.org, 42447-done@bugs.debian.org, 
 42849-done@bugs.debian.org, 43651-done@bugs.debian.org, 
 44620-done@bugs.debian.org, 44643-done@bugs.debian.org, 
 44922-done@bugs.debian.org, 45307-done@bugs.debian.org, 
 45318-done@bugs.debian.org, 45561-done@bugs.debian.org, 
 46516-done@bugs.debian.org, 48570-done@bugs.debian.org
Date: Sat, 6 Nov 1999 21:13:58 +0000 (GMT)
X-Mailer: ELM [version 2.4ME+ PL60 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11kD9q-0000Vf-00@polya>
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>

These bugs have been fixed in debian-policy 3.1.0.0; changelog follows.

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg


Changes: debian-policy (3.1.0.0) unstable; urgency=low
 .
  * Add instructions on /usr/doc -> /usr/share/doc symlinks (closes:
    #45561, #42447, #48570)
  * Added source dependencies (closes: #41232)
  * Deprecated /etc/rc.boot (closes: #32448, #32449)
  * Update-rc.d now only legal way to automatically access /etc/rc?.d
    directoried (closes: #41547)
  * FHS compliant location of examples (closes: #42849)
  * Added ispell-dictionary to virtual-packages.list (following new
    suggestions: no objections => accept) (closes: #8221)
  * Added man-browser to virtual-packages.list (closes: #24695)
  * Added ident-server to virtual-packages.list (closes: #45307)
  * Alphabeticised virtual packages list ;)
  * Corrected GPL reference in proposal.sgml
  * Clarification of "extra" priority (closes: #33076)
  * Remove buggy and seriously problematic licenses from list of contrib
    package criteria (closes: #45318)
  * Move docs to /usr/share/doc with a compatibility symlink (closes:
    #41829)
  * Update to FHS 2.1 draft #3 (for /var/state etc. changes).
  * Correct /var/lib/games -> /var/games (closes: #42358)
  * Added MIME subpolicy (closes: #46516)
  * Added support for VISUAL (closes: #41121)
  * Clarify non-dependence on /usr/local (closes: #44922)
  * Modified description of mail spool locking (closes: #43651)
  * Clarified wording of conffiles and configuration files (closes:
    #40766, #40767)
  * Changed description of release numbers (closes: #44620)
  * Added changelog.html -> changelog requirement (closes: $40934)
  * packaging-manual now correctly installs its docs (closes: #44643)
  * The packaging manual now discusses version numbers based on dates
    (closes: #17621)
  * Mention ls -f for testing order in which files appear on disk (closes:
    #19179)
  * Change order of '.' and '+' in description of version numbers (closes:
    #41095)
  * s/fields/field names/ in section 4.1 of packaging manual for clarity
  * Add Build-Depends-Indep: field to control file


Reply to: