Skip to content

repo-updater: potential data race in `DebugDump`

Created by: unknwon

We released the mutex too early and does not make a value copy of *repoUpdate.Repo field. This field is a pointer and could be mutated inside enqueue:

https://github.com/sourcegraph/sourcegraph/blob/15a355625716e43035e15946f6755997df991dc3/cmd/repo-updater/repos/scheduler.go#L348-L355

It happens very rare since this is in the debug endpoint.