[BUG] Kasm does not start after an unclean shutdown when the stale containerd pid belongs to another process
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bash, docker, shell
- 領域
- backend, devops, infrastructure
調査の方向性
The issue is in the container's entrypoint script, likely dockerd-entrypoint.sh, which currently only deletes docker*.pid files. Examine the script to understand the startup sequence. The fix involves adding logic to clean up /run/docker/containerd/containerd.pid if it exists and points to a non-containerd process. Test by reproducing the unclean shutdown scenario and verifying dockerd starts correctly.
索引モデルが issue の本文から書いたものです。
説明
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
/run is not a tmpfs in this image, so after an unclean shutdown (docker kill, power loss, OOM kill), /run/docker/containerd/containerd.pid is still there when the container starts again. dockerd-entrypoint.sh only deletes docker*.pid. If another process has been given that pid by the time dockerd starts, dockerd takes it for a running containerd (moby, pidfile.Read), never starts its own and gives up with failed to start containerd: timeout waiting for containerd to start. s6 restarts it, and it fails again for as long as that process lives.
svc-kasm/run only waits for /var/run/docker.sock to exist, so it goes on without dockerd and fails (unable to start service svc-kasm: command exited 1). Once dockerd does start, the Kasm containers come back through their restart policy, but svc-kasm stays failed, so svc-kasm/finish does not run on the next stop.
I hit it once after docker kill kasm and docker start kasm. Pointing the pid file at a process that always exists reproduces it every time.
Expected Behavior
Kasm starts after an unclean shutdown.
Steps To Reproduce
- Let Kasm start.
docker kill kasm- Make the stale pid point at a live process (pid 1 always exists):
echo 1 > containerd.pid && docker cp containerd.pid kasm:/run/docker/containerd/containerd.pid docker start kasm: the log loops onfailed to start containerd: timeout waiting for containerd to start,svc-kasmfails, and Kasm stays down.
Environment
- OS: Ubuntu 24.04.4 LTS (kernel 6.18, cgroup v1)
- How docker service was installed: docker-ce 29.3.1 from Docker's apt repository
- Workspace image: kasmweb/remmina:1.19.0-rolling-daily
CPU architecture
x86-64
Docker creation
docker run -d --name kasm --privileged --network host --stop-timeout 90 \
-e KASM_PORT=443 \
-v /path/to/kasm/data:/opt \
lscr.io/linuxserver/kasm:1.19.0-ls150
# plus HTTPS_PROXY and a CA bundle for the test VM's egress proxy
Container logs
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 911
User GID: 911
───────────────────────────────────────
Linuxserver.io version: 1.19.0-ls150
Build-date: 2026-09-22T23:50:52+00:00
───────────────────────────────────────
[custom-init] No custom files found, skipping...
Failed to fetch workspace list, falling back to local list.json: fetch failed
failed to start containerd: timeout waiting for containerd to start
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Pulling Latest Kasm Service Images
time="2026-09-23T12:47:32Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Upgrading rolling plugins
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Starting Kasm Services
time="2026-09-23T12:47:32Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
s6-rc: warning: unable to start service svc-kasm: command exited 1
failed to start containerd: timeout waiting for containerd to start
failed to start containerd: timeout waiting for containerd to start
failed to start containerd: timeout waiting for containerd to start
failed to start containerd: timeout waiting for containerd to start
failed to start containerd: timeout waiting for containerd to start
failed to start containerd: timeout waiting for containerd to start
- 主要言語
- Shell
- スター
- 487
- フォーク
- 51
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linuxserver/docker-kasm のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
linuxserver/docker-kasm#111 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
linuxserver/docker-kasm#107 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
linuxserver/docker-kasm#106 ·
-
work-in-progress
linuxserver/docker-kasm#83 · コメント 3 件 · 担当者 1 名 ·
linuxserver/docker-kasm の issue をすべて見る
似ている issue
-
Bob Shell support オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
openSUSE/python-rpm-macros#219 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
YunoHost-Apps/adguardhome_ynh#258 ·
-
steam-short-session-tracker: incorrect registry backup path resets settings during automatic repair オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ValveSoftware/SteamOS#2829 ·