Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#110 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, docker, shell

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Shell
Estrellas
487
Forks
51
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linuxserver/docker-kasm

Todos los issues de linuxserver/docker-kasm

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.