Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] Kasm does not start after an unclean shutdown when the stale containerd pid belongs to another process

オープン
#110 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, docker, shell

調査の方向性

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
  1. Let Kasm start.
  2. docker kill kasm
  3. 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
  4. docker start kasm: the log loops on failed to start containerd: timeout waiting for containerd to start, svc-kasm fails, 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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxserver/docker-kasm のほかの issue

linuxserver/docker-kasm の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。