phacility/phabricator · warning · DiffusionDaemonLockException

Another process is currently updating repository "%s", skipp

Error message

Another process is currently updating repository "%s", skipping pull.

What it means

Thrown by PhabricatorRepositoryPullEngine::pullRepository() when the per-repository repo.pull lock cannot be acquired because another process is already pulling this repository. Pulls are serialized per repository so two processes never write the same working copy concurrently; on contention the engine throws DiffusionDaemonLockException so the caller (pull daemon or task worker) skips this round and retries later.

Source

Thrown at src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:32

 * @task svn      Pulling Subversion Working Copies
 * @task internal Internals
 */
final class PhabricatorRepositoryPullEngine
  extends PhabricatorRepositoryEngine {


/* -(  Pulling Working Copies  )--------------------------------------------- */


  public function pullRepository() {
    $repository = $this->getRepository();

    $lock = $this->newRepositoryLock($repository, 'repo.pull', true);

    try {
      $lock->lock();
    } catch (PhutilLockException $ex) {
      throw new DiffusionDaemonLockException(
        pht(
          'Another process is currently updating repository "%s", '.
          'skipping pull.',
          $repository->getDisplayName()));
    }

    try {
      $result = $this->pullRepositoryWithLock();
    } catch (Exception $ex) {
      $lock->unlock();
      throw $ex;
    }

    $lock->unlock();

    return $result;
  }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Treat as transient in daemon logs; the next pull cycle retries automatically
  2. Check 'phd status' and running processes for a pull of the same repository that is still active or hung
  3. If a pull is hung (large repo, slow network), let it finish or terminate it cleanly, then retry
  4. Restart daemons with 'phd restart' if a stale lock is suspected
Defensive patterns

Strategy: retry

Try / catch

try {
  id(new PhabricatorRepositoryPullEngine())
    ->setRepository($repository)
    ->pullRepository();
} catch (DiffusionDaemonLockException $ex) {
  // repo.pull held elsewhere; skip and let the next cycle retry
  return;
}

Prevention

When it happens

Trigger: A pull task for the repository still in flight when another task for the same repository starts; manual 'bin/repository pull' racing the daemon; slow pulls on large repos or high-latency networks widening the overlap window; stale lock from a killed pull process.

Common situations: Very large repositories whose pulls outlast the scheduling interval; administrators manually pulling to debug while daemons run; lingering worker processes after a phd restart.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/1c40d959928cccf1. Report an issue: GitHub.