[darcs-users] can't get repository lock

Petr Rockai me at mornfall.net
Thu Jun 24 11:48:12 UTC 2010


Dan Pascu <dan at ag-projects.com> writes:
> Any idea what could be causing this?
>
> I should mention that none is doing any write operations in those repositories
> except the cron job that does pull regularly. Otherwise  the repositories are
> used by trac-darcs in a read-only mode (show  patches, files, ...). Is it
> possible that a read-only operation that  trac-darcs uses to inspect the repo
> may lock it so a pull is not  possible at that moment?

The following commands use withRepoLock:

Add.lhs
AmendRecord.lhs
Apply.lhs
Convert.lhs
Get.lhs
MarkConflicts.lhs
Move.lhs
Optimize.lhs
Pull.lhs
Record.lhs
Remove.lhs
Repair.lhs
Replace.lhs
Revert.lhs
Rollback.lhs
SetPref.lhs
Tag.lhs
Unrecord.lhs
Unrevert.lhs

so if any of those commands was running at the time, this would manifest
as waiting for repository lock...

Another option is that some darcs process previously died without
cleaning up the lock, but the result would be a stuck repository in that
case: I presume the operation just waits for a bit and proceeds?

One option would be to have darcs write some explanatory text into
_darcs/lock (like, what command it is running and maybe its pid) so that
the waiting process could provide that info along the "waiting for lock"
informational message...

It would be also helpful if you could file this in the tracker so it
does not get lost.

Thanks,
   Petr.


More information about the darcs-users mailing list