Upload purger goroutine never exits
Author: jpeachCreated Aug 27, 2026Updated Aug 27, 2026
Description
In handlers.NewApp() there is a call to startUploadPurger, which creates a background goroutine to call storage.PurgeUploads. The goroutine runs forever and there's no way to interrupt it, so it leaks when you call (app *App) Shutdown().
Seems like the shutdown should also stop and background threads that the app starts.
Reproduce
Observed in internal unit tests.
app := handlers.NewApp(...)
app.Shutdown()
/// purge upload still runningExpected behavior
No response
registry version
v3.0.0
Additional Info
No response
Source: distribution/distribution