Repository navigation
Closed
Description
Description
Version: v2.8.3-23
time="2025-10-11T03:26:30.88517253Z" level=info msg="PurgeUploads starting: olderThan=2025-10-04 03:26:30.885111496 +0000 UTC m=-604259.992670915, actuallyDelete=false"
panic: runtime error: index out of range [0] with length 0
goroutine 8 [running]:
github.com/docker/distribution/registry/storage.getOutstandingUploads.func1({0xfb8020, 0xc000663700})
/go/src/github.com/docker/distribution/registry/storage/purgeuploads.go:73 +0x55e
github.com/docker/distribution/registry/storage/driver/s3-aws.(*driver).doWalk.func1(0xc00023ea00, 0x30?)
/go/src/github.com/docker/distribution/registry/storage/driver/s3-aws/s3.go:1023 +0x613
github.com/docker/distribution/vendor/github.com/aws/aws-sdk-go/service/s3.(*S3).ListObjectsV2PagesWithContext(0xc00005c258, {0x7f7cacbf9a88, 0xc000240310}, 0xc0003b6d70, 0xc0003b3a60, {0x0, 0x0, 0x0})
/go/src/github.com/docker/distribution/vendor/github.com/aws/aws-sdk-go/service/s3/api.go:4198 +0x174
github.com/docker/distribution/registry/storage/driver/s3-aws.(*driver).doWalk(0xc000406300, {0xfb8538, 0xc0002402a0}, 0xc000092b48, {0xc00022e691, 0x20}, {0xfa9abe, 0x1}, 0xc0003bcb70)
/go/src/github.com/docker/distribution/registry/storage/driver/s3-aws/s3.go:982 +0x33d
github.com/docker/distribution/registry/storage/driver/s3-aws.(*driver).Walk(0xc000406300, {0xfb8538, 0xc0002402a0}, {0xc0001c3b00, 0x20}, 0xc0003bcb70)
/go/src/github.com/docker/distribution/registry/storage/driver/s3-aws/s3.go:930 +0x149
github.com/docker/distribution/registry/storage/driver/base.(*Base).Walk(0xc000329c70, {0xfb7db8?, 0xc000402140?}, {0xc0001c3b00, 0x20}, 0xc0003bcb70)
/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go:239 +0x20d
github.com/docker/distribution/registry/storage.getOutstandingUploads({0xfb7db8, 0xc000402140}, {0xfbf6f0, 0xc000329c70})
/go/src/github.com/docker/distribution/registry/storage/purgeuploads.go:70 +0x1d7
github.com/docker/distribution/registry/storage.PurgeUploads({0xfb7db8, 0xc000402140}, {0xfbf6f0, 0xc000329c70}, {0xc23042d9b4c1bac8, 0xfffdda6dc1c8ed3d, 0x1617140}, 0x0)
/go/src/github.com/docker/distribution/registry/storage/purgeuploads.go:34 +0x116
github.com/docker/distribution/registry/handlers.startUploadPurger.func1()
/go/src/github.com/docker/distribution/registry/handlers/app.go:1123 +0x325
created by github.com/docker/distribution/registry/handlers.startUploadPurger in goroutine 1
/go/src/github.com/docker/distribution/registry/handlers/app.go:1111 +0x2eb
Reproduce
storage:
maintenance:
uploadpurging:
enabled: true
age: 168h
interval: 24h
dryrun: true
Expected behavior
No response
registry version
Version: v2.8.3-23 (goharbor/registry-photon:v2.14.0)
Additional Info
No response
Metadata
Metadata
Assignees
Labels
No labels
Activity
milosgajdos commentedon Oct 11, 2025
Please upgrade to v3. v2 is no longer supported (we need to update README)
fix(storage): bounds-check the file basename in PurgeUploads Walk cal…
fix(storage): guard empty basename in PurgeUploads walk callback
fix(storage): guard empty basename in PurgeUploads walk callback