Setup: Unable to take shared lock on $STACKDIR: an exclusive lock is held by [user=\$USER, pid=26430]

Has anyone seen the eups based error before:

setup: Unable to take shared lock on $STACKDIR: an exclusive lock is held by [user=$USER, pid=26430]

Google allowed me to trace it to this file:

I have had issues installing the stack and getting it to work (Ubuntu 12.04) and so have created a dedicated user account on my machine, and managed to install the stack successfully to this fresh user account.

The error shows up when typing any of the following things:

setup pipe_tasks
source ..../loadLSST.bash

I have tried to kill the process id (always 26430) but it doesn’t exist.

I can’t say what happened before this error showed up as we have an undergrad working with the stack right now.

I also noticed a .eups directory in the home directory: perhaps something needs to be cleared from a cache in here?

Apologies if this issue is light on information, but this error seemed to come out of nowhere.

Eups locking is known to be broken. There are options for turning it off that I forget (hopefully someone else can reply with help on that), but you can probably get out of whatever hole you’re in right now by running eups admin clearLocks.

  1. Add to ~/.eups/ = None
  2. Or add the same line to the directory given by eups path 0 to make it stack-wide rather than just for you. (This has already been done for the buildbot stack in /home/lsstsw on lsat-dev.)

Note: I think eups locking is mostly overly protective. There are only very rare cases when it might be actually broken. But it does get in the way a lot more than it should.


Our undergrad (who is better than me!) found in the stack base directory a directory called .lockDir and within it modified the name of a file within it called exclusive-stack.26430 and the problem went away.

He also just tried changing the name back and doing eups admin clearLocks which has appeared to have deleted the .lockDir directory and also fixed the problem.

I also added the file ~/.eups/ with the line = None

As suggested.


I don’t know of any bugs in the locking, but it’s too aggressive to be useful.