Skip to content

[LOGS]: logs are lost when detaching #4233

Open

Description

@apostasie

Description

If you detach from a ti container, stdout after the detach is lost.

Seen in #4176

Tag @fahedouch

Steps to reproduce the issue

nerdctl rm -f foo

nerdctl run -ti --name foo debian sh -c -- "echo see me; sleep 5; echo see me too; sleep 1";

# detach ctrl+p ctrl+q immediately after seeing "see me"

Now:

nerdctl logs -f foo

Outputs:

see me

Should output:

see me
see me too

Describe the results you received and expected

Logs to be complete.

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Activity

  1. changed the title [-][LOGGING]: logs are lost when detaching[/-] [+][LOGS]: logs are lost when detaching[/+] on May 9, 2025
  2. added
    bug
    and removed
    kind/unconfirmed-bug-claim
    on May 9, 2025
  3. self-assigned this
    on May 9, 2025
  4. fahedouch commented on May 9, 2025

    @fahedouch
    Member

    The logic for IO persistence has been moved to the nerdctl side; when nerdctl exits, things stop. In an ideal world, this logic should be handled by the shim. I had a PR in this direction; I will see how I can fix this.

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

Metadata

Metadata

Assignees

Labels

area/loggingbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions