Skip to content

oras copy --from-oci-layout hangs indefinitely after push completes #2101

Closed as not planned

Description

@karnarokEpoch

What happened in your environment?

oras copy --from-oci-layout hangs after reaching 100%. The artifact is
successfully pushed (confirmed by querying the registry API), but ORAS never
exits. Ctrl+C is required. Debug output shows some requests receive no response.

Hangs indefinitely after 100%. Ctrl+C required.

The artifact IS present despite the hang (PS: see notes):

curl -s http://localhost:5000/v2/nginx/tags/list
# {"name":"nginx","tags":["1.31.2"]}

Debug output (--debug) shows some requests receive no response:

# oras copy --from-oci-layout --debug \
#   ./oci-layout:alpine-latest localhost:5000/nginx:1.31.2
...
[2026-07-06T12:55:41.575580874+02:00][ERROR]: <-- Response #30
Error in getting response: failed to perform "Push" on destination: Put "http://localhost:5000/v2/nginx/blobs/uploads/9c34b623-15d4-4197-a3a4-89df63508067?digest=sha256%3Ae95a6c7ea7d49b37920899b023ecd0e32796c976c1748491f76cae53ba86d13a": EOF

[2026-07-06T12:55:41.575758006+02:00][ERROR]: <-- Response #24
Error in getting response: failed to perform "Push" on destination: Put "http://localhost:5000/v2/nginx/blobs/uploads/9c34b623-15d4-4197-a3a4-89df63508067?digest=sha256%3Ae95a6c7ea7d49b37920899b023ecd0e32796c976c1748491f76cae53ba86d13a": EOF

[2026-07-06T12:55:41.575759037+02:00][ERROR]: <-- Response #31
Error in getting response: failed to perform "Push" on destination: Put "http://localhost:5000/v2/nginx/blobs/uploads/9c34b623-15d4-4197-a3a4-89df63508067?digest=sha256%3Ae95a6c7ea7d49b37920899b023ecd0e32796c976c1748491f76cae53ba86d13a": EOF

Error from destination registry for "localhost:5000/nginx:1.31.2": Put "http://localhost:5000/v2/nginx/blobs/uploads/9c34b623-15d4-4197-a3a4-89df63508067?digest=sha256%3Ae95a6c7ea7d49b37920899b023ecd0e32796c976c1748491f76cae53ba86d13a": EOF

Notes

Also happened with docker.io/library/alpine:3.24.1 and docker.io/library/hello-world:latest.
Size or number of layers doesn't seems to be an important factor for the behavior.

CTRL+C after 1sec of stalling is good enought.
Sometimes, I need to run the command and CTRL+C multiple times for the image to be fully pushed to the registry.

I intensively use ORAS to push multiple artefacts to AWS ECR. Never had an issue (and i still don't).
It's maybe related to reading from oci-layout locally?

What did you expect to happen?

Command completes and exits after push is confirmed.

How can we reproduce it?

# 1. Start Zot
podman run -d -p 5000:5000 --name zot ghcr.io/project-zot/zot-linux-amd64:v2.1.18

# 2. Save alpine to OCI layout
oras copy --to-oci-layout docker.io/library/nginx:1.31.2 ./oci-layout:nginx-1.31.2

# 3. Push from OCI layout to Zot — hangs after 100%
oras copy --from-oci-layout ./oci-layout:nginx-1.31.2 localhost:5000/nginx:1.31.2

# 4. Cleanup
rm -rf oci-layout/
podman stop zot && podman rm zot

What is the version of your ORAS CLI?

Tested on ORAS 1.3.2 with two different registries (Zot and Docker Distribution
registry:3.1.1) — both affected.

What is your OS environment?

OS: Fedora release 43 amd64

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    bug
    triage
    on Jul 7, 2026
  2. TerryHowe commented on Jul 7, 2026

    @TerryHowe
    Member

    Did you look at the errors on zot? Sounds like it is failing and/or hanging.

  3. karnarokEpoch commented on Aug 4, 2026

    @karnarokEpoch
    Author

    Did you look at the errors on zot? Sounds like it is failing and/or hanging.

    I did not look for an error in Zot or Registry. I thought that if I have the issue with Zot and Registry, it might be an ORAS issue, more than an OCI Registry issue.

    I reproduced the problem with both registry, and had the same problem, but without a clear error log from the OCI registry side (zot might be the most verbose one):

    podman run -d -p 5000:5000 --name zot --rm -e ZOT_LOG_LEVEL=debug ghcr.io/project-zot/zot-linux-amd64:v2.1.18
    
    oras copy --from-oci-layout ./oci-layout:nginx-1.31.2 localhost:5000/nginx:1.31.2
    ...
    Error from destination registry for "localhost:5000/nginx:1.31.2": Put "http://localhost:5000/v2/nginx/blobs/uploads/336f61a7-966b-4082-b7dc-308aa15b51c9?digest=sha256%3A39694cde734ef95d7d1da72615bb7b8361a035a0a2f92458acc533e5ae239e16": EOF

    Searching in logs I found the start of the POST at 36:18.

    Image

    It timed out at 37:18.

    Image

    Just before you have the error timeout, but it seems triggered by zot.

    Image

    And if you look at content-length on response, you can see that Zot got all the blob.

    Image
  4. karnarokEpoch commented on Aug 4, 2026

    @karnarokEpoch
    Author

    I did try something new.
    Copy directly from remote registry, download speed is faster, but I ended up twice with a fatal error (not all the time).
    It seems unrelated to the initial issue topic, it fails in the display module

    λ oras copy docker.io/library/nginx:1.31.2 localhost:5000/nginx:1.31.2
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    4
    └─ sha256:30a2f13cf24a67d1721ebe2603515897a1f9824553c16f1b699cc565fb01b77f
    ✓ Copied  application/vnd.oci.image.config.v1+json     241/241  B 100.00%    1
      └─ sha256:1ee363b9632259f9ffdba3bba5a0a56844520e105ec94f9fb6e7f4d59c2fbc1b
    ✓ Copied  application/vnd.oci.image.layer.v1.tar+gz. 26.7/26.7 MB 100.00%     
      └─ sha256:9ce68cca63faf1f06434dd1423cb52db0d4251ee3f1838e43e5893fae28f9267
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.87/8.87 KB 100.00%   27
      └─ sha256:8870c81b28342ca2f04849ba4b1b00f5b17d5bbd0c2bc312149f02006d035739
    ✓ Copied  application/vnd.oci.image.config.v1+json     241/241  B 100.00%    2
      └─ sha256:30671a8142d93d2ada3f6713bb7dd463b0fa11ebe4dabe9f28f4fda509940fb3
    ✓ Copied  application/vnd.in-toto+json               2.69/2.69 MB 100.00%  200
      └─ sha256:29456554d20582e08dbf07df42c2c1473aa07884caff1df7e455fb4c46bffd14
    ✓ Copied  application/vnd.oci.image.config.v1+json   8.89/8.89 KB 100.00%    1
      └─ sha256:9d70fb16ecbac27a4d3c00bc7ef5676e6268e59fae1d5182634782e03c676684  ⠸ [              ......](2.57 MB/s) Copying applic. 17.90/25.1 MB  71.20%     
      └─ sha256:595dff0ab19d1b3158ec1aea949a19600a194f9d4ffd298111b6a94c77768bfb  ⠏ [                 ...](2.06 MB/s) Copying applic. 25.20/28.4 MB  88.85%     
      └─ sha256:062e450697faa5f02a3a74eba9864ee4d79bc9cfbd65769fc6cdff2c05c6a053  ⠋ [....................](   0  B/s)  application/vnd.oc. -/241  B   0.00%   37
      └─ sha256:ab107692bdfcc879cabddb44a50b1b192df7c628b897d6c321925db08255f026  
    panic: send on closed channel
    
    goroutine 69 [running]:
    oras.land/oras/cmd/oras/internal/display/status/progress.(*messenger).Fail(0xc000695068, {0xb18620, 0xee1590})
     oras.land/oras/cmd/oras/internal/display/status/progress/messenger.go:46 +0x74
    oras.land/oras/internal/progress.(*readTracker).Read(0xc0005358c0, {0xc0000aa000?, 0xb18660?, 0xc00055ba40?})
     oras.land/oras/internal/progress/tracker.go:105 +0xf3
    io.discard.ReadFrom({}, {0x7e47dc122530, 0xc000800190})
     io/io.go:666 +0x6d
    io.copyBuffer({0xb18aa0, 0xf17fe0}, {0x7e47dc122530, 0xc000800190}, {0xc0002de000, 0x8000, 0x8000})
     io/io.go:415 +0x151
    io.CopyBuffer({0xb18aa0?, 0xf17fe0?}, {0x7e47dc122530?, 0xc000800190?}, {0xc0002de000?, 0xc00055bbe0?, 0x4790a5?})
     io/io.go:402 +0x36
    net/http.(*transferWriter).doBodyCopy(0xc000556280, {0xb18aa0, 0xf17fe0}, {0x7e47dc122530, 0xc000800190})
     net/http/transfer.go:417 +0xe5
    net/http.(*transferWriter).writeBody(0xc000556280, {0xb19480, 0xc0004061c0})
     net/http/transfer.go:377 +0x393
    net/http.(*Request).write(0xc0002b08c0, {0xb19480, 0xc0004061c0}, 0x0, 0xc0002388a0, 0x0)
     net/http/request.go:762 +0xa8d
    net/http.(*persistConn).writeLoop(0xc0001dc120)
     net/http/transport.go:2600 +0x174
    created by net/http.(*Transport).dialConn in goroutine 65
     net/http/transport.go:1945 +0x17a5
    λ oras copy docker.io/library/nginx:1.31.2 localhost:5001/nginx:1.31.2
    ✓ Copied  application/vnd.oci.image.config.v1+json                                                                               8.89/8.89 KB 100.00%  198ms
      └─ sha256:30a2f13cf24a67d1721ebe2603515897a1f9824553c16f1b699cc565fb01b77f
    ✓ Copied  application/vnd.oci.image.config.v1+json                                                                               8.87/8.87 KB 100.00%  186ms
      └─ sha256:8870c81b28342ca2f04849ba4b1b00f5b17d5bbd0c2bc312149f02006d035739
    ⠋ [                   .](5.27 MB/s) Copying application/vnd.oci.image.layer.v1.tar+gzip                                         26.70/26.7 MB  99.99%     3s
      └─ sha256:9ce68cca63faf1f06434dd1423cb52db0d4251ee3f1838e43e5893fae28f9267
    ✓ Copied  application/vnd.oci.image.config.v1+json                                                                                 241/241  B 100.00%   48ms
      └─ sha256:1ee363b9632259f9ffdba3bba5a0a56844520e105ec94f9fb6e7f4d59c2fbc1b
    ✓ Copied  application/vnd.oci.image.config.v1+json                                                                               8.89/8.89 KB 100.00%   21ms
      └─ sha256:9d70fb16ecbac27a4d3c00bc7ef5676e6268e59fae1d5182634782e03c676684
    ⠹ [           .........](6.88 MB/s) Copying application/vnd.oci.image.layer.v1.tar+gzip                                         17.00/28.4 MB  59.86%     2s
      └─ sha256:062e450697faa5f02a3a74eba9864ee4d79bc9cfbd65769fc6cdff2c05c6a053
    ✓ Copied  application/vnd.oci.image.config.v1+json                                                                                 241/241  B 100.00%   57ms
      └─ sha256:30671a8142d93d2ada3f6713bb7dd463b0fa11ebe4dabe9f28f4fda509940fb3
    ⠴ [    ................](4.21 MB/s) Copying application/vnd.oci.image.layer.v1.tar+gzip                                          5.11/25.1 MB  20.37%     1s
      └─ sha256:595dff0ab19d1b3158ec1aea949a19600a194f9d4ffd298111b6a94c77768bfb
    panic: send on closed channel
    
    goroutine 102 [running]:
    oras.land/oras/cmd/oras/internal/display/status/progress.(*messenger).Fail(0xc0005d4480, {0xb18620, 0xee1590})
     oras.land/oras/cmd/oras/internal/display/status/progress/messenger.go:46 +0x74
    oras.land/oras/internal/progress.(*readTracker).Read(0xc0002dbe90, {0xc000284000?, 0xb18660?, 0xc0001efa40?})
     oras.land/oras/internal/progress/tracker.go:105 +0xf3
    io.discard.ReadFrom({}, {0x762981322588, 0xc0002d0110})
     io/io.go:666 +0x6d
    io.copyBuffer({0xb18aa0, 0xf17fe0}, {0x762981322588, 0xc0002d0110}, {0xc0005b2000, 0x8000, 0x8000})
     io/io.go:415 +0x151
    io.CopyBuffer({0xb18aa0?, 0xf17fe0?}, {0x762981322588?, 0xc0002d0110?}, {0xc0005b2000?, 0xc000384be0?, 0x4790a5?})
     io/io.go:402 +0x36
    net/http.(*transferWriter).doBodyCopy(0xc000138140, {0xb18aa0, 0xf17fe0}, {0x762981322588, 0xc0002d0110})
     net/http/transfer.go:417 +0xe5
    net/http.(*transferWriter).writeBody(0xc000138140, {0xb19480, 0xc0003ae000})
     net/http/transfer.go:377 +0x393
    net/http.(*Request).write(0xc0003be640, {0xb19480, 0xc0003ae000}, 0x0, 0xc0000a6750, 0x0)
     net/http/request.go:762 +0xa8d
    net/http.(*persistConn).writeLoop(0xc000422480)
     net/http/transport.go:2600 +0x174
    created by net/http.(*Transport).dialConn in goroutine 94
     net/http/transport.go:1945 +0x17a5
  5. TerryHowe commented on Aug 5, 2026

    @TerryHowe
    Member

    The send on closed channel panic reported in this comment has been split out into #2125 (labeled help wanted) with a full root-cause analysis and suggested fix.

    That panic is a concrete, fixable ORAS CLI concurrency bug (a use-after-close race on the progress channel — net/http's writeLoop goroutine keeps reading the tracked reader after messenger.Close() closes the update channel).

    The original symptom in this issue — oras copy --from-oci-layout hanging after 100% with an EOF on the blob PUT — appears to be a registry/transport timeout (Zot logged the full blob received, then timed out) or oras-go retry behavior, rather than a CLI bug. Closing this in favor of the tracked, actionable panic in #2125. If the hang persists independently of the panic, please reopen with --debug output around the retry/backoff and we can triage it (likely upstream in oras-go).

  6. TerryHowe commented on Aug 5, 2026

    @TerryHowe
    Member

    Thanks for your issue. Created a new issue so it could be fixed burning less tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions