Skip to content

--memory should error on amounts that cause the VM for a container to not boot #1202

@Peyton-Spencer

Description

@Peyton-Spencer

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Run any container with the --memory flag. The container hangs indefinitely and never produces output. Without the flag, it works instantly.

# Works fine — prints output and exits immediately
echo "test" | container run -i --rm --entrypoint /bin/echo docker.io/debian:bookworm-slim "hello"
# Output: hello

# Hangs indefinitely — any --memory value, even small ones
echo "test" | container run -i --rm --memory 512 --entrypoint /bin/echo docker.io/debian:bookworm-slim "hello"
# (hangs forever, no output, no error)

Tested systematically with timeout and system cycling between each run:

Test --memory Output Exit
A none NO-MEMORY 0 (success)
B --memory 1024 (empty) 124 (timeout after 20s)
C none (control) NO-MEMORY-CONTROL 0 (success)

Each test was preceded by a full container system stop / container system start cycle and pkill -9 of any stale processes to ensure clean state.

The bug is 100% reproducible with any --memory value (tested 512, 1024, 2048, 4096). Without the flag, containers work perfectly every time.

Impact: The hung container also leaves stale state that prevents subsequent containers from starting until the system is cycled.

Current behavior

container run --memory <any-value> hangs indefinitely. The process stays alive but the container never initializes — no output on stdout or stderr.

Expected behavior

The container should start with the specified memory limit and produce output normally.

Environment

- OS: macOS 26.3 (25D125)
- Xcode: N/A
- Container: container CLI version 0.9.0 (build: release, commit: 3e49dce)
- Arch: arm64 (Apple Silicon)

Relevant log output

# No log output — the container simply never starts.
# container system status reports healthy before and during the hang.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions