Skip to content

🐞 Dagger "close dagger session" fails when using _EXPERIMENTAL_DAGGER_CACHE_CONFIG #11328

@cbochula

Description

@cbochula

What is the issue?

I have a simple module which builds an image and publishes it to ECR. I've also configured it to export the layer cache using _EXPERIMENTAL_DAGGER_CACHE_CONFIG. However, with this configured, it appears that the cache exporter exceeds the timeout window, causing the call to fail with:

ERR cleanup failed msg="close dagger session" err="shutdown: do shutdown: Post \"http://dagger/shutdown\": context deadline exceeded" duration=41.927581741s
Error: cleanup failed: "close dagger session": shutdown: do shutdown: Post "http://dagger/shutdown": context deadline exceeded

However, the engine logs indicate that the cache export succeeded:

time="2025-10-29T21:56:10Z" level=debug msg="finalized exporter" client_hostname=ip-192-168-129-205.ec2.internal client_id=ok6hevirad0rna055o310r3z8 session_id=4va5gib23c6dq54nb6xcf16jv spanID=aeaeb215ffcdec27 traceID=7e41954a60b711f98df1bcfe63d287c1
time="2025-10-29T21:56:10Z" level=debug msg="waited for cache export" client_hostname=ip-192-168-129-205.ec2.internal client_id=ok6hevirad0rna055o310r3z8 session_id=4va5gib23c6dq54nb6xcf16jv spanID=aeaeb215ffcdec27 traceID=7e41954a60b711f98df1bcfe63d287c1
time="2025-10-29T21:56:10Z" level=debug msg="done running cache export for client ok6hevirad0rna055o310r3z8" client_hostname=ip-192-168-129-205.ec2.internal client_id=ok6hevirad0rna055o310r3z8 session_id=4va5gib23c6dq54nb6xcf16jv spanID=aeaeb215ffcdec27 traceID=7e41954a60b711f98df1bcfe63d287c1

Note: I recently upgraded from 0.18.16, where this timeout did not occur and a long cache export did not cause a shutdown failure.

Dagger version

dagger v0.19.3 (image://registry.dagger.io/engine:v0.19.3) linux/amd64

Steps to reproduce

No response

Log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions