containerd / containerd/nerdctl

[LOGS]: logs are lost when detaching

Open
#4,233 1 comment 1 reaction 1 assignee Claimed by @fahedouch View on GitHub
area/logging bug
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.