Skip to content

Parallel pushes fail with invalid written size #2706

@tonistiigi

Description

@tonistiigi

Description

The push handler does not work properly if there are multiple pushes of the same blob running concurrently. It seems that both pushes write to the same place and one of them will fail with an error saying that twice as many bytes were written as are in the descriptor.

This is not only the case when two competing pushes are pushing same data to the same location but it is quite easy to hit it when just pushing a single manifest list as the subimages can easily contain duplicates. Also possible to hit it by just pushing multiple images that share some layers to the same repo.

Steps to reproduce the issue:

  1. Push an image(s)/manifest-list with same layers

Output of containerd --version:

v1.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions