containers / libkrun

A dynamic library providing Virtualization-based process isolation capabilities
Apache License 2.0
901 stars 74 forks source link

Container stops without error when many env variables specified #93

Closed Agalin closed 1 year ago

Agalin commented 1 year ago

When running a container through podman/crun in krun mode it's not possible to specify more than 26 environment variables.

If more variables are specified container exits (without any visible errors).

Environment: Debian 11 libkrun built from #92 libkrunfw 3.8.1 Both self-built without any special flags.

slp commented 1 year ago

Thanks for reporting this. libkrun already has an alternative way to pass the environment variables that's used in TEE mode. This mechanism requires the container configuration (podman inspect ...) to be written to a well-known file (/.krun_config.json), so we just need to teach crun to do that.

I've created https://github.com/containers/crun/issues/1069 to discuss this there.

Agalin commented 1 year ago

Awesome! I feared it would require a huge reimplementation in krun (didn't check sev-related code, didn't even know that tee refers to it 😓). That would also fix #94 and make #95 a non-issue I believe.

slp commented 1 year ago

Recent versions of libkrun read the environment variables from a file, so this should no longer be reproducible. Please feel free to reopen this one if the issue persists.