You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Unable to stop a container when it's frozen. #576
@zjwangmin Hi! Can you provide a full set of steps that reproduces the issue? I see a docker system stop command and docker exec command but I'm not sure what they have to do with each other.
Also, I'm guessing that you did alias docker=container. Can you confirm that?
@zjwangmin Hi! Can you provide a full set of steps that reproduces the issue? I see a docker system stop command and docker exec command but I'm not sure what they have to do with each other.
Also, I'm guessing that you did alias docker=container. Can you confirm that?
@jglogan I pulled the CentOS 7 image and ran the container with container run --name centos7 -dit -m 4G -v /Users/wangmin/work:/root/work centos:7 /sbin/init. Then, I compiled a large project and performed some operations inside the container. (Previously, when I allocated less memory to the container, it would often freeze during the make process. After increasing the memory, some operations still had a probability of causing a freeze.) Finally, executing yum update led to the container system freezing, and I couldn't stop the container, even with container system stop. Also, yes, I did create a soft link from docker to container. Thank you.
I'm not running heavy workloads — mostly just coding in VS Code connected via Remote-SSH. Despite that, the container occasionally becomes unresponsive (frozen), and I'm unable to stop or remove it even with container system stop.
I have encountered this problem as well. My macOS version is 15.7, on an M1 Macbook Air, 8 GB RAM, container version 0.4.1 (the current release). The Dockerfile that I used to create the container is:
FROM python:alpine
WORKDIR /content
RUN apk add bash
CMD ["bash"]
The commands that I used are:
container build --tag python-in-alpine --file Dockerfile .# error, because "container system start" hasn't been run yet
container system start
container build --tag python-in-alpine --file Dockerfile .
container run --volume $HOME/containers/volumes/foo/:/content/foo --rm python-in-alpine # not what I wanted
container run --volume $HOME/containers/volumes/foo/:/content/foo -it --rm python-in-alpine
After running pip3 install tensorflowjs and pip3 install --prefer-binary tensorflowjs (both failed for probably unrelated reasons), the container froze (i.e. was unresponsive to input) with the bash prompt displaying.
The commands container stop, container kill, container system stop did not work (they did not return, but seemed to be stuck). The CPU usage was maxed out (4 cores were at 100%). Memory usage was low. Sending SIGTERM using the "Activity Monitor" to the 400% CPU process was successful in stopping the process.
Edit: Alternatively, it is at ~0%, 100% or 200% CPU after other attempts.
Often, a "Segmentation fault" occurs, the shell prompt appears, and after entering another shell command, the container "freezes."
I'm seeing this too. Building a large CMake-based C++ project succeeds on first run, but eventually random processes involved in the build (cmake, ar, make, even ps) start hanging and/or using 100% CPU. The processes also become unkillable inside the container, i.e. kill -9 does nothing. container stop and container rm -f both hang.
I've allocated all cores (14) and 24GB of 48GB total memory to the container.
#293 mentions something similar for x86_64 / Rosetta, but I'm building in a arm64 container on a MBP M4. No Rosetta installed.
The same build runs fine when using podman and podman machine (with Apple virtualization) and the same resource configuration.
The kernel panic can be triggered by using /proc/sysrq-trigger interface; since it is not enabled by default, but makefile of containerization does have it kernel:
container run --kernel containerization/kernel/vmlinux -ti alpine
echo c > /proc/sysrq-trigger
Will log and container stop will hang:
[ 66.235116] sysrq: Trigger a crash
[ 66.235560] Kernel panic - not syncing: sysrq triggered crash
[ 66.235700] SMP: stopping secondary CPUs
[ 66.252410] Kernel Offset: 0x317ef4000000 from 0xffff800080000000
[ 66.252578] PHYS_OFFSET: 0xffffaeaa00000000
[ 66.252610] CPU features: 0x000,00000030,00845250,ca067723
[ 66.252674] Memory Limit: none
[ 66.252714] ---[ end Kernel panic - not syncing: sysrq triggered crash ]---
Possibly hit this on container 0.12.3 — container stop, container kill, and container rm -f all hung indefinitely on a long-running container (had been up ~2 days).
What unstuck it: ps showed a per-container host process of the form
kill -TERM <pid> on that specific PID moved the container to stopped immediately, after which container rm <id> succeeded normally with no further hang.
Posting in case naming the specific process (the per-container container-runtime-linux start --uuid <name>) helps anyone else hitting this — the existing comments mention killing "the stuck process" generically but don't pin down which one.
Activity
jglogan commentedon Sep 5, 2025
@zjwangmin Hi! Can you provide a full set of steps that reproduces the issue? I see a
docker system stopcommand anddocker execcommand but I'm not sure what they have to do with each other.Also, I'm guessing that you did
alias docker=container. Can you confirm that?minsvip commentedon Sep 5, 2025
@jglogan I pulled the CentOS 7 image and ran the container with
container run --name centos7 -dit -m 4G -v /Users/wangmin/work:/root/work centos:7 /sbin/init. Then, I compiled a large project and performed some operations inside the container. (Previously, when I allocated less memory to the container, it would often freeze during themakeprocess. After increasing the memory, some operations still had a probability of causing a freeze.) Finally, executingyum updateled to the container system freezing, and I couldn't stop the container, even withcontainer system stop. Also, yes, I did create a soft link fromdockertocontainer. Thank you.Yinwhe commentedon Sep 17, 2025
I've encountered this issue quite frequently. When it happens, CPU usage spikes while memory usage remains relatively low:
I start the container using the following command:
The dev-container image is a minimal Ubuntu-based image with SSH service enabled:
I'm not running heavy workloads — mostly just coding in VS Code connected via Remote-SSH. Despite that, the container occasionally becomes unresponsive (frozen), and I'm unable to stop or remove it even with container system stop.
gandaro commentedon Sep 18, 2025
I have encountered this problem as well. My macOS version is 15.7, on an M1 Macbook Air, 8 GB RAM,
containerversion 0.4.1 (the current release). The Dockerfile that I used to create the container is:The commands that I used are:
After running
pip3 install tensorflowjsandpip3 install --prefer-binary tensorflowjs(both failed for probably unrelated reasons), the container froze (i.e. was unresponsive to input) with the bash prompt displaying.The commands
container stop,container kill,container system stopdid not work (they did not return, but seemed to be stuck). The CPU usage was maxed out (4 cores were at 100%). Memory usage was low. Sending SIGTERM using the "Activity Monitor" to the 400% CPU process was successful in stopping the process.Edit: Alternatively, it is at ~0%, 100% or 200% CPU after other attempts.
Often, a "Segmentation fault" occurs, the shell prompt appears, and after entering another shell command, the container "freezes."
mpolden commentedon Sep 23, 2025
I'm seeing this too. Building a large CMake-based C++ project succeeds on first run, but eventually random processes involved in the build (
cmake,ar,make, evenps) start hanging and/or using 100% CPU. The processes also become unkillable inside the container, i.e.kill -9does nothing.container stopandcontainer rm -fboth hang.I've allocated all cores (14) and 24GB of 48GB total memory to the container.
#293 mentions something similar for x86_64 / Rosetta, but I'm building in a arm64 container on a MBP M4. No Rosetta installed.
The same build runs fine when using
podmanandpodman machine(with Apple virtualization) and the same resource configuration.macOS 26.0
container CLI version 0.4.1 (build: release, commit: 4ac18b5)
AlmaLinux 10 container
mpolden commentedon Sep 23, 2025
Here is the kernel log output when processes start hanging. Looks like a bug in the kernel (or the virtualization layer doing something bad)? https://gist.github.com/mpolden/5ecb0658d428fc6a161f26bd7b443824
vsarunas commentedon Jan 25, 2026
The kernel panic can be triggered by using
/proc/sysrq-triggerinterface; since it is not enabled by default, but makefile of containerization does have it kernel:Will log and container stop will hang:
JaewonHur commentedon Jan 27, 2026
Let me look into it!
bixu commentedon May 10, 2026
Possibly hit this on
container0.12.3 —container stop,container kill, andcontainer rm -fall hung indefinitely on a long-running container (had been up ~2 days).What unstuck it:
psshowed a per-container host process of the formkill -TERM <pid>on that specific PID moved the container tostoppedimmediately, after whichcontainer rm <id>succeeded normally with no further hang.Posting in case naming the specific process (the per-container
container-runtime-linux start --uuid <name>) helps anyone else hitting this — the existing comments mention killing "the stuck process" generically but don't pin down which one.Wire xcodebuildmcp into alapenna-container via Unix-socket bridge