v1.9.1 — Memory leak fixes & stop reliability
Fixed
- Kill
console-serve on container stop — orphaned console
processes no longer hold overlay file descriptors, preventing
dentry/page cache from being released by the kernel.
- SIGKILL both unshare parent and container init — `unshare --
kill-child` does not fire when killed with SIGKILL, and container
init (PID 1 in its PID namespace) ignores SIGTERM from the host
namespace. Both are now killed directly with SIGKILL.
- Replace
proc.Wait() with polling — dck stop runs in a
separate process where the target was reparented to init, so `Wait(
) returned ECHILD immediately. Replaced with kill(pid, 0)`
polling with timeout.
- Cancel healthcheck goroutine on stop — healthcheck now uses
a cancellable context.Context to prevent dangling goroutines.
- Prevent double-cleanup race — added mutex +
cleanupStarted
flag to serialize Stop() and monitorContainer() cleanup paths.
- Try normal
umount before lazy — non-lazy unmount lets the
kernel release dentry and page cache immediately; lazy fallback if
references still exist.