Improper parsing or tokenization of command string with krun handler
When using the krun runtime handler with podman, commands with special characters often fail due to an apparent bug in parsing. For example, the following command works fine:
$ podman run --rm alpine /bin/sh -c 'ls && sleep 30'
bin
dev
...
But the following command fails:
$ podman run --rm --annotation run.oci.handler=krun alpine /bin/sh -c 'ls && sleep 30'
[2025-07-24T20:13:40Z ERROR devices::virtio::console::device] Couldn't get terminal dimensions: ENOTTY: Not a typewriter
[2025-07-24T20:13:40Z ERROR devices::virtio::console::device] Couldn't get terminal dimensions: ENOTTY: Not a typewriter
ls: 66: No such file or directory
ls: sleep: No such file or directory
ls: 30: No such file or directory
@slp @tylerfanelli @jakecorrenti PTAL
Should it be moved to libkrun?
The problem is that init is not translating unicode characters to ascii. Easy to fix. I've created https://github.com/containers/libkrun/issues/382 to track it.
I see that libkrun issue 382 has now been closed
- https://github.com/containers/libkrun/issues/382
and marked as fixed by
- https://github.com/containers/libkrun/pull/397
@slp fine to close the issue here?
@giuseppe Yes, it should be fixed now.