Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 29780
Status: new
Priority: 0/
Queue: CPAN

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

Bug Information
Severity: Normal
Broken in: 1.9203
Fixed in: (no value)



Subject: Locking issue when starting two CPAN shells simultaneously
If two CPAN shells are started at (nearly) the same time, then one shell gets stuck in this loop: Could not lock lockfile with flock: Bad file descriptor; retrying Could not lock lockfile with flock: Resource temporarily unavailable; retrying ... (Linux version) or Could not lock lockfile with flock: ; retrying Could not lock lockfile with flock: Resource temporarily unavailable; retrying ... (FreeBSD version) The problem seems to be caused by the line 967 in checklock(): if (-f $lockfile && -M _ > 0) { This means if the other process created the lockfile after start of this process, then the normal lock check code will be bypassed. I think the -M condition can be removed safely. Regards, Slaven