Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 29754
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: Lockfile problem with perl 5.005_05
Download (untitled) / with headers
text/plain 696b
(Using CPAN.pm from SVN) If another CPAN shell is running, another shell cannot be started. The error message is: $ /usr/perl5.005_05/bin/perl -MCPAN -eshell CPAN: File::HomeDir loaded ok (v0.66) CPAN: Term::ANSIColor loaded ok (v1.12) CPAN.pm panic: Found invalid lockfile '/usr/local/src/CPAN/.lock', please remove. Cannot proceed. Exitcode 255 I don't see anything suspicous about the lock file: $ ls -al /usr/local/src/CPAN/.lock -rw-rw---- 1 eserte wheel 0 3 Okt 23:34 /usr/local/src/CPAN/.lock $ lsof /usr/local/src/CPAN/.lock COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME perl 7628 eserte 6uW VREG 0,98 0 2284629 /mnt/i386/usr/local/src/CPAN/.lock
Subject: Re: [rt.cpan.org #29754] Lockfile problem with perl 5.005_05
Date: Thu, 04 Oct 2007 08:33:28 +0200
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Download (untitled) / with headers
text/plain 941b
Show quoted text
>>>>> On Wed, 03 Oct 2007 18:07:35 -0400, "Slaven_Rezic via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> Wed Oct 03 18:07:33 2007: Request 29754 was acted upon. > Transaction: Ticket created by SREZIC > Queue: CPAN > Subject: Lockfile problem with perl 5.005_05 > Broken in: (no value) > Severity: Unimportant > Owner: Nobody > Requestors: SREZIC@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=29754 >
Show quoted text
> (Using CPAN.pm from SVN)
Show quoted text
> If another CPAN shell is running, another shell cannot be started. The > error message is:
Show quoted text
> $ /usr/perl5.005_05/bin/perl -MCPAN -eshell > CPAN: File::HomeDir loaded ok (v0.66) > CPAN: Term::ANSIColor loaded ok (v1.12) > CPAN.pm panic: Found invalid lockfile '/usr/local/src/CPAN/.lock', > please remove. Cannot proceed.
Did you remove it and retry? I'm not sure but maybe it leads us to a clue? -- andreas
CC: SREZIC [...] cpan.org
Subject: Re: [rt.cpan.org #29754] Lockfile problem with perl 5.005_05
Date: 04 Oct 2007 22:25:16 +0200
To: bug-CPAN [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
Download (untitled) / with headers
text/plain 1.9k
"(Andreas J. Koenig) via RT" <bug-CPAN@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=29754 > >
> >>>>> On Wed, 03 Oct 2007 18:07:35 -0400, "Slaven_Rezic via RT" <bug-CPAN@rt.cpan.org> said:
>
> > Wed Oct 03 18:07:33 2007: Request 29754 was acted upon. > > Transaction: Ticket created by SREZIC > > Queue: CPAN > > Subject: Lockfile problem with perl 5.005_05 > > Broken in: (no value) > > Severity: Unimportant > > Owner: Nobody > > Requestors: SREZIC@cpan.org > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=29754 >
> >
> > (Using CPAN.pm from SVN)
>
> > If another CPAN shell is running, another shell cannot be started. The > > error message is:
>
> > $ /usr/perl5.005_05/bin/perl -MCPAN -eshell > > CPAN: File::HomeDir loaded ok (v0.66) > > CPAN: Term::ANSIColor loaded ok (v1.12) > > CPAN.pm panic: Found invalid lockfile '/usr/local/src/CPAN/.lock', > > please remove. Cannot proceed.
> > Did you remove it and retry? I'm not sure but maybe it leads us to a clue? >
It seems to be indeed a flushing problem. The truss output shows no write to the lock file until to the very end of the shell lifetime. With this change: Index: lib/CPAN.pm =================================================================== --- lib/CPAN.pm (Revision 2305) +++ lib/CPAN.pm (Arbeitskopie) @@ -1113,6 +1113,7 @@ seek $fh, 0, 0; truncate $fh, 0; + $fh->autoflush(1); $fh->print($$, "\n"); $fh->print(hostname(), "\n"); $self->{LOCK} = $lockfile; the problem goes away. For some reason this problem does not occur with newer perls, but maybe this is some difference due to perlio vs. stock stdio. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tkruler - Perl/Tk program for measuring screen distances http://ptktools.sourceforge.net/#tkruler


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.