Skip to content

Race condition in applyDiffWithOptions #148

@mtrmac

Description

@mtrmac

I’m trying to fix storage tests in c/image after 3 years they basically didn’t work at all (containers/image#1729 ), and I’m running into a race condition that reproduces 100% for me.

Arguably the interface and implementation of NewInputTarStream just don’t match.

Alternatively, c/storage could probably deal with this itself by ensuring uncompressed is not really accessed after the .Close(), using something like https://github.com/containers/image/blob/main/internal/uploadreader/upload_reader.go (which exists to work around a similar problem in net/http).

Cc: @vbatts

Metadata

Metadata

Assignees

Labels

storageRelated to "storage" package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions