Skip to content

Creation of Zstd:chunked layers seems racy #1979

@mtrmac

Description

@mtrmac

Reading the code (not testing this),

layer, err := s.imageRef.transport.store.CreateLayer(id, lastLayer, nil, "", false, nil)
creates a layer, and
if err := s.imageRef.transport.store.ApplyDiffFromStagingDirectory(layer.ID, diffOutput.Target, diffOutput, nil); err != nil {
later fills the contents.

AFAICS the layer is, in the meantime, visible to other processes, who can find it based on the deterministic “chain ID”, and try to use it, while the contents are missing.

Cc: @giuseppe

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA defect in an existing functionality (or a PR fixing it)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions