GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

v0.11.0 panics "semaphore: released more than held goroutine" #127

Closed ingwarsw closed 1 year ago

ingwarsw commented 1 year ago

TL;DR

v0.11.0 panics with error (v0.10.0 was ok)

http: panic serving 169.254.1.1:38424: semaphore: released more than held
goroutine 24 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1850 +0xbf
panic({0x6fef00, 0x7f79e0})
    runtime/panic.go:890 +0x262
golang.org/x/sync/semaphore.(*Weighted).Release(0xc000428190, 0x0?)
    golang.org/x/sync@v0.1.0/semaphore/semaphore.go:103 +0xbc"

Expected behavior

Should not panic..

Observed behavior

No response

Debug log output

No response

Additional information

Log line before I see

failed to clean repo "gcr.io/xxxr": failed to list tags for repo gcr.io/xxx: Get "https://gcr.io/v2/xxx/tags/list?n=1000": context canceled
sethvargo commented 1 year ago

Hi @ingwarsw - can you please provide more of the logs or run with the environment variable GCRCLEANER_LOG set to debug?

sethvargo commented 1 year ago

Actually nevermind - I found it.