phacility/phabricator · warning · DiffusionDaemonLockException
Another process is currently discovering repository "%s", sk
Error message
Another process is currently discovering repository "%s", skipping discovery.
What it means
Thrown by PhabricatorRepositoryDiscoveryEngine::discoverCommits() when it cannot acquire the per-repository repo.look lock (newRepositoryLock with 'repo.look'). Phabricator serializes discovery per repository; if another daemon or process already holds the lock, the engine throws DiffusionDaemonLockException so the caller skips this round instead of blocking. The daemon treats it as try-again-later, not as a hard failure.
Source
Thrown at src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php:45
public function getRepairMode() {
return $this->repairMode;
}
/**
* @task discovery
*/
public function discoverCommits() {
$repository = $this->getRepository();
$lock = $this->newRepositoryLock($repository, 'repo.look', false);
try {
$lock->lock();
} catch (PhutilLockException $ex) {
throw new DiffusionDaemonLockException(
pht(
'Another process is currently discovering repository "%s", '.
'skipping discovery.',
$repository->getDisplayName()));
}
try {
$result = $this->discoverCommitsWithLock();
} catch (Exception $ex) {
$lock->unlock();
throw $ex;
}
$lock->unlock();
return $result;
}
View on GitHub (pinned to 5720a38cfe)
Solutions
- Do nothing if it only appears in daemon logs with no other symptoms; the daemon retries discovery on the next cycle
- Check for a concurrent process: 'phd status' and look for a manual bin/repository command still running
- If no process holds it but the error persists, restart daemons with 'phd restart' so stale locks are released
- In clusters, verify only the intended devices discover the repository (Almanac service bindings)
Defensive patterns
Strategy: retry
Try / catch
try {
id(new PhabricatorRepositoryDiscoveryEngine())
->setRepository($repository)
->discoverCommits();
} catch (DiffusionDaemonLockException $ex) {
// another process holds repo.look; skip this round and retry later
phlog($ex->getMessage());
return;
} Prevention
- Do not run manual 'bin/repository discover' while daemons are active; pause the repository first
- Keep exactly one discovery source per repository in cluster configurations
- Treat lock skips in daemon logs as noise unless discovery makes no progress across many cycles
When it happens
Trigger: Running 'bin/repository discover <repo>' manually while the repository discovery daemon is mid-run; two overlapping daemon tasks for the same repository; a previously killed process that left the repo.look lock held; cluster setups where two devices discover the same repository.
Common situations: Admin manually runs discovery to debug missing commits while phd daemons are active; daemons restarted without clearing stale locks; scheduled jobs overlapping with the pull-plus-discovery pipeline on large repositories.
Related errors
- Another process is currently updating repository "%s", skipp
- No repository "%s" exists!
- Commit "%s" has not been discovered yet! Run discovery befor
- No such repository "%s"!
- Repository "%s" does not exist.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/658b8c319c15c2b1.
Report an issue: GitHub.