Skip to content

podman pull locks and holds podman run #25862

@stepancheg

Description

@stepancheg

Feature request description

Cleanup first:

podman rmi -a -f

In first terminal, run

while :; do podman run alpine date; done

Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob f18232174bc9 done   |
Copying config aded1e1a5b done   |
Writing manifest to image destination
Sat Apr 12 04:26:40 UTC 2025
Sat Apr 12 04:26:41 UTC 2025
Sat Apr 12 04:26:41 UTC 2025
Sat Apr 12 04:26:41 UTC 2025
Sat Apr 12 04:26:42 UTC 2025
Sat Apr 12 04:26:42 UTC 2025
Sat Apr 12 04:26:42 UTC 2025
Sat Apr 12 04:26:43 UTC 2025
Sat Apr 12 04:26:43 UTC 2025
Sat Apr 12 04:26:43 UTC 2025
Sat Apr 12 04:26:44 UTC 2025
...

two/three times per second.

In a second terminal run

podman pull docker.io/library/centos:6
Trying to pull docker.io/library/centos:6...
Getting image source signatures
Copying blob ff50d722b382 done   |
Copying config 5bf9684f47 done   |
Writing manifest to image destination
5bf9684f472089d6d5cb636041d3d6dc748dbde39f1aefc374bbd367bd2aabbf

Somewhere after copying finished, podman invokes untar, and at this moment, podman run is paused until podman pull completes:

Sat Apr 12 04:26:49 UTC 2025
Sat Apr 12 04:26:50 UTC 2025
Sat Apr 12 04:26:50 UTC 2025   # two seconds delay until the following run
Sat Apr 12 04:26:52 UTC 2025
Sat Apr 12 04:26:52 UTC 2025
Sat Apr 12 04:26:53 UTC 2025

This is critical for larger images which can take minutes to unpack.

Suggest potential solution

podman pull could hold finer grained lock or locks, so it would not prevent running unrelated images.

Or podman pull could unpack layers into temp directory without acquiring lock, and then move.

Have you considered any alternatives?

Run podman images in separate stores, so they won't interfere.

Additional context

Using podman version 4.9.3. I have read changelog, does not seem to mention locking-related changes.

Ubuntu 24.04.2. Root.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.triagedIssue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions