toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

Failure to attach to container when run under sudo

Open mmcnutt opened this issue 9 months ago • 2 comments

Running a toolbox under sudo fails to give a bash prompt

Steps how to reproduce the behaviour

  1. create a toolbox with "sudo toolbox"
  2. enter toolbox with sudo toolbox enter -v
  3. Error: OCI runtime error: crun: read pipe failed

can attach to the container manually with podman exec bash

Expected behaviour a prompt in the toolbox

Actual behaviour returned to normal session

Output of toolbox --version (v0.0.90+) toolbox version 0.1.2

Toolbx package info (rpm -q toolbox) toolbox version 0.1.2

Output of podman version Client: Podman Engine Version: 5.5.2 API Version: 5.5.2 Go Version: go1.24.4 Git Commit: e7d8226745ba07a64b7176a7f128e4ef53225a0e Built: Tue Jun 24 10:00:00 2025 Build Origin: Fedora Project OS/Arch: linux/amd64

Info about your OS Fedora Kinoite 42 Version: 42.20250711.0 (2025-07-11T01:13:49Z) BaseCommit: 68d69807ffe91391c07966798a4fb50e928901ba5168f038224c7bec369964f

Additional context

reproducible across multiple machines and users https://discussion.fedoraproject.org/t/sudo-toolbox-enter-fails-in-today-kinoite-42/156833/4

mmcnutt avatar Jul 12 '25 08:07 mmcnutt

Sorry, for the late response. Yes, I ran into this the other day while trying to figure out what's going on with https://github.com/containers/toolbox/pull/1704

I confess that i don't have any immediate insight into what's going on.

Have you been regularly using sudo toolbox ..., and did this start happening only recently?

debarshiray avatar Sep 11 '25 22:09 debarshiray

This was part of my network administration workflow - I'd run couple of tools like nmap into a sudo toolbox. I've since worked around this issue by running the tools by other methods.

It started failing to attach maybe a week or 2 before I logged the bug, about the time the fedora discussion thread was opened, probably lines up with when fedora bumped the version to 0.1.2 https://koji.fedoraproject.org/koji/buildinfo?buildID=2726516 - sorry that doesnt give an accurate date around a commit that might have caused it

mmcnutt avatar Sep 12 '25 22:09 mmcnutt