containerd / containerd/nerdctl
`nerdctl ps` is slow when there are containers whch have `Unknown` status
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### Description
When a container's shim process is stopped (e.g., via `kill -STOP`), `nerdctl ps` and `nerdctl ps -a` take approximately **4 seconds** to return results.
```bash
$ time sudo nerdctl ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
real 0m4.068s
user 0m0.007s
sys 0m0.017s
$ time sudo nerdctl ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69e240372293 docker.io/library/alpine:latest "sleep inf" 14 seconds ago Unknown hoge
real 0m4.033s
user 0m0.002s
sys 0m0.003s
```
### Steps to reproduce the issue
```bash
ID=$(sudo nerdctl run -d --name hoge alpine sleep inf)
PID=$(ps aux | grep "containerd-shim.*$ID" | grep -v grep | awk '{print $2}')
sudo kill -STOP $PID
sudo nerdctl ps -a
```
### Describe the results you received and expected
Improve the display speed of the response when executing the `nerdctl ps` or `nerdctl ps -a` command where `Unknown` containers exist.
### What version of nerdctl are you using?
latest
Details
```bash
$ sudo nerdctl version
Client:
Version: 30bc9938.m
OS/Arch: linux/arm64
Git commit: 30bc99387ff83cad68ea6f323560fd929b23fdb6.m
buildctl:
Version: v0.18.0
GitCommit: 95d190ef4f18b57c717eaad703b67cb2be781ebb
Server:
containerd:
Version: 89c7170db.m
GitCommit: 89c7170db5d4f11868508001dda9ff18775705e1.m
runc:
Version: 1.2.2
GitCommit: v1.2.2-0-g7cb36325
```
### Are you using a variant of nerdctl? (e.g., Rancher Desktop)
Lima
### Host information
Details
```bash
$ sudo nerdctl info
Client:
Namespace: default
Debug Mode: false
Server:
Server Version: 89c7170db.m
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Log: fluentd journald json-file none syslog
Storage: native overlayfs stargz
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.11.0-29-generic
Operating System: Ubuntu 24.10
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.812GiB
Name: lima-haytok
ID: 149f0072-b6bb-4d8a-97d8-e3b856af08c3
```
```bash
$ uname -ra
Linux lima-haytok 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:32:41 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.