Skip to content

Containerd multipart fetch cancelled by progress timeout #12811

Open

Description

@azr

Description

We experienced a multipart fetch bug in production on containerd v2.2.1.

Symptom: Image pulls failing with context canceled followed by 16 "aborted" errors after 5-minute progress timeout.

Environment:

  • containerd v2.2.1
  • concurrent_layer_fetch_buffer = 8388608 (8MB chunks)
  • max_concurrent_downloads = 32
  • Large image layer: ~15GB

Logs:

time="2026-01-23T08:17:47Z" level=error 
  msg="cancel pulling image docker.io/lmsysorg/sglang:v0.5.6 because of no progress in 5m0s"
time="2026-01-23T08:17:47Z" level=info 
  msg="stop pulling image: active requests=13, bytes read=14505964507"
level=error msg="PullImage failed" 
  error="context canceled\naborted\naborted\naborted..." (16 aborted errors)

I think that one request gets "exhausted" by the other ones, but, we are still downloading other chunks, and the progress timeout hits.

Steps to reproduce the issue

  1. conf multipart fetch
  2. pull a large image
  3. ( this happens sporadically )

Describe the results you received and expected

I expected the pull to pull

What version of containerd are you using?

v2.2.1

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Activity

  1. azr commented on Jan 23, 2026

    @azr
    ContributorAuthor

    If my root cause analysis is correct, here are some solutions:

    • Adding a timeout-per-chunk so that a stalled pull is cancelled earlier would help retry the pull earlier, at the expense of redownloading these chunks.

    • bump the timeout from 5 min to something more ?

    • move the progress timeout a bit closer to the fetch, and if any chunk is downloading, not timeout.

    • bumping the MaxIdleConns to something higher would help, but not solve the issue, I think it could be a good idea to make this higher anyways though. This is the current default:

    func DefaultHTTPTransport(defaultTLSConfig *tls.Config) *http.Transport {
    return &http.Transport{
    Proxy: http.ProxyFromEnvironment,
    DialContext: (&net.Dialer{
    Timeout: 30 * time.Second,
    KeepAlive: 30 * time.Second,
    FallbackDelay: 300 * time.Millisecond,
    }).DialContext,
    MaxIdleConns: 10,
    IdleConnTimeout: 30 * time.Second,
    TLSHandshakeTimeout: 10 * time.Second,
    TLSClientConfig: defaultTLSConfig,
    ExpectContinueTimeout: 5 * time.Second,
    }
    }

    • somehow give priority to early chunks, and add slowdowns on the later chunks if one chunk gets stuck, but that would make the code more complex, and slow and meh.
  2. fuweid commented on Jan 23, 2026

    @fuweid
    Member

    It sounds like head-of-line blocking. If first one is blocked, event if rest of them are still working on download, it will be considered as no-progress. We can write some UT test case to verify this behaviour.

  3. strigazi commented on Mar 4, 2026

    @strigazi

    Hello @azr ,

    What i have noticed recently when setting concurrent_layer_fetch_buffer = 33554432 and max_concurrent_downloads = 32, is a failure rate of at least 5% with "context canceled" However, I do not see aborted errors (I'm pasting the error from containerd below.).

    Is it the same issue? Also, it looks like that #12802 is the same?

    Errors in containerd
    time="2026-03-03T02:02:16.312156545Z" level=error msg="failed to cleanup \"extract-297543922-tkoN sha256:aa62f7b0f621af0336d6f64fee7a96766580aac01011b117a4e57588e167ca10\"" error="snapshot extract-297543922-tkoN sha256:aa62f7b0f621af0336d6f64fee7a96766580aac01011b117a4e57588e167ca10 does not exist: not found"
    time="2026-03-03T02:02:16.313933116Z" level=error msg="PullImage \"docker.io/lmsysorg/sglang:v0.4.3-cu124-srt\" failed" error="rpc error: code = Canceled desc = failed to pull and unpack image \"docker.io/lmsysorg/sglang:v0.4.3-cu124-srt\": failed to copy: context canceled"
    time="2026-03-03T02:02:16.314008887Z" level=info msg="stop pulling image docker.io/lmsysorg/sglang:v0.4.3-cu124-srt: active requests=0, bytes read=10797330687"
    
    containerd config snippet
     [plugins."io.containerd.transfer.v1.local"]
        concurrent_layer_fetch_buffer = 33554432
        max_concurrent_downloads = 32
    
  4. dosubot commented on Aug 3, 2026

    @dosubot

    Hi, @azr. I'm Dosu, and I'm helping the containerd team manage their backlog and am marking this issue as stale.

    Issue Summary

    • You reported sporadic image pull failures in containerd v2.2.1 on large layers.
    • The failures appear during multipart downloads that stall and are then canceled after about 5 minutes with context canceled and aborted errors.
    • You suspected the progress timeout may be firing even while other chunks are still active, which could point to head-of-line blocking or progress-tracking issues.
    • Follow-up discussion suggested this may be related to no-progress behavior, and a unit test was proposed to help verify the timeout path.
    • A later report described similar context canceled failures with concurrent_layer_fetch_buffer = 33554432 and max_concurrent_downloads = 32, possibly matching the same underlying issue.

    Next Steps

    • Please let us know if this is still relevant on the latest version of containerd.
    • If it is still reproducible, you can keep the discussion open by commenting here; otherwise, this issue will be automatically closed in 7 days.

    Thanks for your understanding and contribution.

  5. github-actions commented on Aug 18, 2026

    @github-actions

    This issue was closed because it has been stale for 2 weeks with no activity. Feel free to reopen or create a new issue if you would like to continue working on it.

  6. reopened this on Oct 13, 2026
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

    area/distributionkind/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions