Bug#321085: marked as done (Mail::Box lock file sometimes put in current working dir with lock method multi)

Debian Bug Tracking System owner at bugs.debian.org
Fri Aug 26 23:33:24 UTC 2005


Your message dated Fri, 26 Aug 2005 17:57:15 -0500
with message-id <20050826225714.GH20041 at gwolf.org>
and subject line Mail::Box lock file sometimes put in current working dir with lockmethod multi
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.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 3 Aug 2005 11:02:11 +0000
>From rainer.schoepf at proteosys.com Wed Aug 03 04:02:11 2005
Return-path: <rainer.schoepf at proteosys.com>
Received: from comedy.dante.de [80.237.210.73] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E0H0l-0002yz-00; Wed, 03 Aug 2005 04:02:11 -0700
Received: from comedy.dante.de (localhost. [127.0.0.1])
	by comedy.dante.de (8.13.4/8.13.4/Debian-3) with ESMTP id j73B28pH026508
	for <submit at bugs.debian.org>; Wed, 3 Aug 2005 13:02:08 +0200
Received: (from ftpmaint at localhost)
	by comedy.dante.de (8.13.4/8.13.4/Submit) id j73B28E9026444;
	Wed, 3 Aug 2005 13:02:08 +0200
Message-Id: <200508031102.j73B28E9026444 at comedy.dante.de>
X-Authentication-Warning: comedy.dante.de: ftpmaint set sender to rainer.schoepf at proteosys.com using -f
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-15"
From: =?iso-8859-15?q?Rainer_Sch=F6pf?= <rainer.schoepf at proteosys.com>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Mail::Box lock file sometimes put in current working dir with lock method
 multi
X-Mailer: reportbug 3.8
Date: Wed, 03 Aug 2005 13:02:08 +0200
X-Debbugs-Cc: rainer.schoepf at proteosys.com
X-DANTE-Spam-Score: -2.4 () ALL_TRUSTED
X-Scanned-By: MIMEDefang 2.51 on 80.237.210.73
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by comedy.dante.de id j73B28pH026508
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2005_01_02

Package: libmail-box-perl
Version: 2.055-1
Severity: important

Under certain conditions (see below), Mail::Box creates a folder lock
file called -- in the current directory. This is not only completely
useless, but it also fails to remove it if the current working dir is
changed between folder open and close (since it tries to remove "./--").

I'm aware that the documentation says that you _must_ specify a lockfile
name. However, if I do not give a full pathname, it is still interpreted
relative to the current dir, resulting in a "cannot unlink" message when
the folder is closed.

How to reproduce:=20

my $mgr    =3D Mail::Box::Manager->new;
my $folder =3D $mgr->open(folder =3D> $filename,
                        access =3D> "rw",
			lock_file =3D> "mylock",
			lock_type =3D> "Multi");


Suggestions:=20
a) produce an error during folder open if the lock file name is
still "--" to protect against the missing lock_file option.
b) convert the name into a full path before creating the lock file.

 Rainer Sch=F6pf

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686-smp
Locale: LANG=3Den_US.ISO-8859-15, LC_CTYPE=3Den_US.ISO-8859-15 (charmap=3D=
ISO-8859-15)

Versions of packages libmail-box-perl depends on:
ii  libdigest-hmac-perl           1.01-3     create standard message inte=
grity=20
ii  libio-stringy-perl            2.110-1    Perl5 modules for IO from sc=
alars=20
ii  libmailtools-perl             1.62-1     Manipulate email in perl pro=
grams
ii  libmime-types-perl            1.15-1     Perl extension for determini=
ng MIM
ii  libobject-realize-later-perl  0.15-3     Delayed creation of objects
ii  libtimedate-perl              1.1600-4   Time and date functions for =
Perl
ii  liburi-perl                   1.35-1     Manipulates and accesses URI=
 strin
ii  perl                          5.8.4-8    Larry Wall's Practical Extra=
ction=20
ii  perl-base [libscalar-list-uti 5.8.4-8    The Pathologically Eclectic =
Rubbis

-- no debconf information

---------------------------------------
Received: (at 321085-done) by bugs.debian.org; 26 Aug 2005 23:22:25 +0000
>From gwolf at prodigy.net.mx Fri Aug 26 16:22:25 2005
Return-path: <gwolf at prodigy.net.mx>
Received: from nlpproxy02.prodigy.net.mx (smtp.prodigy.net.mx) [148.235.52.22] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E8nWj-0000Ih-00; Fri, 26 Aug 2005 16:22:25 -0700
Received: from smtp.prodigy.net.mx (nlpproxy02 [148.235.52.22])
 by smtp.prodigy.net.mx
 (iPlanet Messaging Server 5.2 HotFix 2.05 (built Mar  3 2005))
 with ESMTP id <0ILU00FRSRIZ0A at smtp.prodigy.net.mx>; Fri,
 26 Aug 2005 18:21:00 -0500 (CDT)
Received: from
 gwolf.org(dsl-201-144-65-125.prod-infinitum.com.mx	[201.144.65.125])
 by smtp.prodigy.net.mx(iPlanet Messaging Server 5.2 HotFix	2.05 (built Mar  3
 2005))with ESMTP id	<0ILU00FTPRIX2J at smtp.prodigy.net.mx>; Fri,
 26 Aug 2005 18:20:57 -0500 (CDT)
Received: by gwolf.org (Postfix, from userid 1000)	id 15FB24AF9B; Fri,
 26 Aug 2005 17:57:15 -0500 (GMT+5)
Date: Fri, 26 Aug 2005 17:57:15 -0500
From: Gunnar Wolf <gwolf at gwolf.org>
Subject: Re: Mail::Box lock file sometimes put in current working dir with
	lockmethod multi
To: 321085-done at bugs.debian.org
Message-id: <20050826225714.GH20041 at gwolf.org>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-disposition: inline
User-Agent: Mutt/1.5.9i
X-imss-version: 2.030
X-imss-result: Passed
X-imss-scores: Clean:53.56897 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:4 C:4 M:4 S:4 R:4 (8.0000 8.0000)
Delivered-To: 321085-done at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02

This looks like the documented behavior - What I get from running your
example on a maildir is:

No locking possible for maildir folders. at /home/gwolf/cvs/pkg-perl/packages/libmail-box-perl/trunk/lib//Mail/Box/Manager.pm line 253
        (in cleanup) Can't call method "unlock" on an undefined value at /home/gwolf/cvs/pkg-perl/packages/libmail-box-perl/trunk/lib//Mail/Box.pm line 366.

But if I am working on a mbox folder, I get no error messages. Now, as
explained in the Mail::Box::Maildir man page, maildir does not provide
any locking mechanisms:

        lock_file          L<Mail::Box>     <not used>
        lock_timeout       L<Mail::Box>     <not used>
        lock_type          L<Mail::Box>     C<'NONE'> (constant)
        lock_wait          L<Mail::Box>     <not used>
        locker             L<Mail::Box>     undef

...I am closing this bug, as it is just acting as documented. If I
misunderstood it, feel free to re-open it.

Greetings,

-- 
Gunnar Wolf - gwolf at gwolf.org - (+52-55)1451-2244 / 5623-0154
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF



More information about the pkg-perl-maintainers mailing list