The 0.2.14 change that fixes this is upstream PR 1530 (commit 1c9a1eb2,
upstream issue 1527). The suspend_pty change of PR 1601 alone does not
fix it, which matches the failed test of 0.2.13-0ubuntu1.2~ppa1
(d/p/fix-suspend-pty-resume.patch).
Cause: with stdout or stdin piped, sudo-rs starts the command in the
background of its own pty. When a process below the command uses the
terminal (here apt-get after its dpkg run), the kernel stops the whole
process group with SIGTTOU or SIGTTIN. The monitor then gives the group
the pty foreground, but resumes only the command pid with kill(), so
apt-get stays in T+. PR 1530 changes the three kill() calls in
MonitorClosure::send_signal (src/exec/use_pty/monitor.rs) to killpg(),
as sudo.ws does.
strace -f of the archive binary 0.2.13-0ubuntu1.2, as root, on echo |
sudo sh -c 'sh -c "read x </dev/tty && echo got-\$x"'. 415 is the
monitor, 416 the command, 417 its child:
417 --- stopped by SIGTTIN ---
416 --- stopped by SIGTTIN ---
415 ioctl(5, TIOCSPGRP, [416]) = 0
415 kill(416, SIGCONT) = 0
416 --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=415, si_uid=0}
---
Only 416 gets SIGCONT. The same run on the package from the attached
debdiff (417 monitor, 418 command, 419 child):
417 ioctl(5, TIOCSPGRP, [418]) = 0
417 kill(-418, SIGCONT) = 0
419 --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=417, si_uid=0}
---
418 --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=417, si_uid=0}
---
Tests: fresh ubuntu:26.04 containers, every command typed into an
interactive bash on a pty, as root and as a NOPASSWD user. Three .deb
builds: the archive 0.2.13-0ubuntu1.2, and 0.2.13-0ubuntu1.3 built from
the source package with PR 1530 only, and with PR 1530 and PR 1601 (the
attached debdiff).
Your installer.sh (apt-get update && apt-get upgrade -y, then apt-get
install ethtool libbpf1 lm-sensors -y), run as "sudo ./installer.sh 2>&1
| tee log":
* 0.2.13-0ubuntu1.2: apt-get upgrade -y stops in T+ right after "Processing
triggers for libc-bin". On a second run, with nothing left to upgrade, apt-get
install stops instead. kill -CONT on the stopped pid lets the script finish.
* PR 1530 only: finishes in about 4 to 6 seconds, no stop.
* PR 1530 and PR 1601: same.
Each finished log has 4 upgraded, 7 newly installed, "Setting up" for
lm-sensors, libbpf1 and ethtool, and the man-db trigger twice.
The reduced cases split the same way: a /dev/tty read with stdin piped,
stty with stdout piped, and "sudo ./apt-child.sh | cat" with apt-get
install --reinstall -y ethtool in the script. They hang on
0.2.13-0ubuntu1.2 and pass with PR 1530. The same three commands with no
pipe, in the foreground of the terminal, pass on every build. All these
runs used .deb packages. The result for PR 1601 alone, in the first
paragraph, came from a cargo build of the same Ubuntu tree.
Why the upload carries PR 1601 too (commit 59e764c7, bug 2146860): with
PR 1530 alone, upstream's regression test for issue 1598 (PR 1647, the
command stops itself with SIGTTOU four times, stdout piped) still fails.
Typed as "sudo sh ~/inner.sh | cat", bash prints "Stopped" and three fg
are needed. As upstream runs it, bash -c "set -m; ..." exits with status
150. With both patches it prints did-not-deadlock and exits 0. PR 1601
is a 3 line move in src/exec/use_pty/parent.rs.
The same upload fixes Ctrl-Z then fg under "sudo visudo" and "sudo sudo
-e FILE" (bug 2160212, same cause). On 0.2.13-0ubuntu1.2 the editor
stays in T+ after fg. With PR 1530, nano comes back and Ctrl-X ends with
"... unchanged".
The package: both patches are the upstream diffs unchanged, under DEP-3
headers, in debian/patches/backports/. They apply to 0.2.13-0ubuntu1.2
with quilt at fuzz 0 and no offset, and afterwards
src/exec/use_pty/monitor.rs and parent.rs are identical to upstream
v0.2.14. The source package built from the debdiff in a clean
ubuntu:26.04 container, the binary built from that .dsc as a plain user
with fakeroot, and dh_auto_test passed (179 passed, 0 failed). On that
binary the installer, the /dev/tty and stty cases, sudo visudo and the
1598 test ran once more and passed. Its sudo, su and visudo are byte
identical to those of the earlier build of the same two patches that ran
every shape above. The changelog closes bug 2150073, bug 2160212 and bug
2146860, and each of the three has its SRU template in the description.
Bug 2173063 (pmbootstrap install --fde on 26.04 echoes the password and
ignores Enter) looks like the same cause: on 2026-11-06 its reporter
wrote there that they and a sudo-rs maintainer had identified PR 1530 as
the fix. It was not reproduced here, so the changelog does not close it.
To move this on:
* The development task can be set to Fix Released: the fix is in 0.2.14, first
released as 0.2.14-1ubuntu2 in stonking, and tenacious has 0.2.14-1ubuntu4.1.
The same goes for bug 2160212. Bug 2146860 is already Fix Released.
* Please add a Resolute task to this bug, bug 2160212 and bug 2146860. My
account cannot nominate for a series.
* ~bamf0, you prepare the rust-sudo-rs uploads: can you take this debdiff into
the resolute SRU and get it sponsored? If nobody picks it up within a week, I
will subscribe ubuntu-sponsors.
** Description changed:
+ [ Impact ]
+
+ * On 26.04, sudo-rs leaves a process below the command stopped (state
+ T+) for good when the command runs in the background of sudo's pty and
+ that process uses the terminal. Nothing more is printed and the command
+ never returns.
+
+ * This happens when sudo's stdout or stdin is a pipe and a child of the
+ command changes the terminal settings or reads the terminal, as apt-get,
+ dpkg, stty and interactive installers do. The reporter's case is "sudo
+ ./installer.sh 2>&1 | tee log", where the script runs apt-get update,
+ apt-get upgrade -y and apt-get install. apt-get stops after its first
+ dpkg run. An installer run as "curl ... | sudo sh" that asks a question
+ on /dev/tty stops the same way.
+
+ * The same commands work with sudo.ws, the sudo of 24.04. The reporter
+ saw the apt-get case work with sudo-rs 0.2.10 on an early 26.04
+ snapshot. So scripts and installers that ran under sudo on 24.04 hang on
+ 26.04.
+
+ * Cause and fix: when the kernel stops the command's process group for
+ a terminal access from the background, the monitor process that owns the
+ pty gives the group the pty foreground and resumes it with
+ kill(command_pid, SIGCONT). That reaches the command but not the other
+ processes of its group, which stay stopped. Upstream PR 1530 (commit
+ 1c9a1eb2, in 0.2.14 and later) changes the three kill() calls in
+ MonitorClosure::send_signal (src/exec/use_pty/monitor.rs) to
+ killpg(command_pid, ...). The whole group then gets SIGCONT and the
+ signals sudo relays, as with sudo.ws.
+
+ [ Test Plan ]
+
+ Run this on a test machine or VM with a clean Ubuntu 26.04 install,
+ where /usr/bin/sudo is sudo-rs (the default). Test 1 runs apt-get
+ upgrade -y. The tests need a real terminal (the local console, a desktop
+ terminal or "ssh -t"), not a script or a non-interactive ssh session.
+ Use a user that may run sudo, and open two terminals, A and B, as that
+ user.
+
+ Steps:
+
+ a. Do the setup below in terminals A and B.
+ b. Run tests 1 to 8 with 0.2.13-0ubuntu1.2 to see the bug.
+ c. Install the update from -proposed (below).
+ d. Run tests 1 to 8 again in the same terminals.
+
+ Setup, in terminal A. First run this line on its own. It may ask for
+ your password:
+
+ sudo -v
+
+ sudo-rs keeps the password for 15 minutes, per terminal. If the tests
+ take longer, run "sudo -v" again before the next test, so that no
+ password prompt lands inside a test. Then paste this block as it is,
+ with no spaces in front of the lines, so the scripts and their EOF lines
+ stay intact:
+
+ cd ~
+ cat > ~/installer.sh <<'EOF'
+ #!/bin/bash
+ function performUpdateNUpgrade()
+ {
+ apt-get update && apt-get upgrade -y
+ apt-get install ethtool libbpf1 lm-sensors -y
+ }
+
+ performUpdateNUpgrade
+ EOF
+ cat > ~/stty-child.sh <<'EOF'
+ #!/bin/sh
+ stty -echo
+ stty echo
+ echo stty-child-done
+ EOF
+ cat > ~/apt-child.sh <<'EOF'
+ #!/bin/bash
+ apt-get install --reinstall -y ethtool
+ echo apt-child-done
+ EOF
+ cat > ~/term-check.sh <<'EOF'
+ #!/bin/sh
+ trap 'echo outer-term' TERM
+ sh -c 'trap "echo child-term && exit 0" TERM
+ while true
+ do
+ sleep 0.1
+ done'
+ echo outer-after-child
+ EOF
+ chmod +x ~/installer.sh ~/stty-child.sh ~/apt-child.sh ~/term-check.sh
+ sudo --version
+ echo $$
+
+ "sudo --version" prints the installed version, sudo-rs 0.2.13-0ubuntu1.2
+ before the update. "echo $$" prints the pid of terminal A's shell, which
+ test 7 needs.
+
+ Setup, in terminal B. Run "sudo -v" there too, since the password is
+ kept per terminal. Then these commands are used:
+
+ ps -eo pid,ppid,stat,wchan:32,args | awk '$3 ~ /^T/'
+ sudo lslocks -n -o COMMAND,PID,PATH | awk '$3 ~
/^\/var\/(lib|cache)\/(dpkg|apt)\//'
+ pgrep -a -x 'apt-get|apt|dpkg'
+ pgrep -a -f '/usr/bin/[u]nattended-upgrade'
+
+ The first lists every process in state T. The second lists the apt and
+ dpkg locks that are held. The third and fourth list running apt jobs and
+ a running unattended-upgrade. The idle unattended-upgrade-shutdown
+ helper is always there and is not listed. Before tests 1, 4 and 6, run
+ the second, third and fourth until all three print nothing, so that
+ unattended-upgrades or another apt job does not hold the dpkg lock
+ during the test.
+
+ Bug tests, in terminal A:
+
+ 1. The reporter's case, apt-get in a script with its output piped to
+ tee:
+
+ sudo apt-get purge -y lm-sensors
+ sudo ./installer.sh 2>&1 | tee log
+
+ The first line makes sure apt-get has a package to install.
+ Expected: apt-get update, then apt-get upgrade -y, then apt-get install,
+ which sets up lm-sensors ("Setting up lm-sensors ...", and ethtool or
+ libbpf1 only if they were not installed yet), then "Processing triggers
+ for man-db ..." and the prompt.
+
+ 2. stdin piped, a child reads /dev/tty:
+
+ echo | sudo sh -c 'sh -c "read x </dev/tty && echo got-\$x"'
+
+ Type hello and press Enter. Expected: got-hello, then the prompt.
+
+ 3. stdout piped, a child runs stty:
+
+ sudo ~/stty-child.sh | cat
+
+ Expected: stty-child-done, then the prompt.
+
+ 4. stdout piped, apt-get in a script, the reduced form of the report:
+
+ sudo ~/apt-child.sh | cat
+
+ Expected: apt-get reinstalls ethtool ("Setting up ethtool ..."),
+ then apt-child-done and the prompt.
+
+ With 0.2.13-0ubuntu1.2 each test from 1 to 4 hangs. In test 1 the output
+ stops after the first dpkg run, for example right after "Processing
+ triggers for man-db" and "Processing triggers for libc-bin" of apt-get
+ upgrade, as in the report. In tests 2 to 4 the expected line never
+ comes. Terminal B lists one process in state T+: apt-get upgrade -y (or
+ apt-get install ethtool libbpf1 lm-sensors -y when there was nothing to
+ upgrade), sh -c read x, stty -echo, or apt-get install --reinstall -y
+ ethtool. To get terminal A back, run "sudo kill -CONT PID" in terminal B
+ with the PID from that line. The test then finishes. In test 1 the
+ script may stop once more at the next apt-get, so check terminal B
+ again.
+
+ With 0.2.13-0ubuntu1.3 each test from 1 to 4 passes and terminal B lists
+ nothing.
+
+ Controls, in terminal A. The same commands, with no pipe, run in the
+ foreground of the terminal and still use it. They pass on both versions:
+
+ 5. sudo sh -c 'sh -c "read x </dev/tty && echo got-\$x"'
+
+ Type hello and press Enter. Expected: got-hello.
+
+ 6. sudo ~/stty-child.sh
+ sudo ~/apt-child.sh
+
+ Expected: stty-child-done, then apt-get reinstalls ethtool and
+ prints apt-child-done.
+
+ Regression tests, in terminal A:
+
+ 7. SIGTERM sent to sudo:
+
+ sudo ~/term-check.sh
+
+ In terminal B, with the number that "echo $$" printed in terminal A:
+
+ sudo pkill -TERM -x -P NUMBER sudo
+
+ Expected with 0.2.13-0ubuntu1.3, in terminal A: "Terminated", then
+ child-term, outer-term and outer-after-child, then the prompt, as with
+ sudo.ws. With 0.2.13-0ubuntu1.2 nothing appears, because only the
+ command gets SIGTERM. Press Ctrl-C there to get the prompt back.
+
+ 8. Ctrl-Z and fg while the command itself reads, and common use:
+
+ sudo sh -c 'read v && echo got-$v'
+
+ Press Ctrl-Z. The shell prints "Stopped". Run fg, type hello and
+ press Enter. Expected on both versions: got-hello. Then:
+
+ sudo id -u
+
+ Expected on both versions: 0.
+
+ Install the update: enable -proposed as
+ https://ubuntu.com/project/docs/SRU/reference/sru-verification/
+ describes, then run:
+
+ sudo apt install -t resolute-proposed sudo-rs
+ apt policy sudo-rs
+ sudo --version
+
+ "sudo --version" must print sudo-rs 0.2.13-0ubuntu1.3. Run "sudo -v"
+ again in both terminals before step d.
+
+ [ Where problems could occur ]
+
+ * The upload changes how the monitor process of the use_pty path
+ delivers signals to the command. If the change is wrong, it would show
+ as commands under sudo on a terminal that hang, that do not come back
+ after Ctrl-Z and fg, or that get interrupted or killed when they did not
+ before.
+
+ * Signals that sudo relays (SIGINT, SIGQUIT, SIGTSTP, SIGTERM, SIGHUP,
+ SIGUSR1, SIGUSR2) now reach every process in the command's process
+ group, not only the command. A "kill -HUP" or "kill -USR1" sent to sudo
+ to make the command reload now also hits helper children in that group,
+ and the default action of SIGHUP, SIGUSR1 and SIGUSR2 is to terminate.
+ Background children of a non-interactive shell ignore SIGINT and
+ SIGQUIT, but not SIGTERM, SIGHUP or SIGUSR1. This is how sudo.ws (24.04)
+ has always relayed signals. Test 7 shows the new behaviour.
+
+ * Ctrl-C: with no pipe, Ctrl-C already reached the whole group through
+ the pty. With stdout or stdin piped, the user's terminal stays cooked
+ until the first SIGTTOU or SIGTTIN stop, and until then sudo relays the
+ SIGINT from Ctrl-C. Before, only the command got it, so an apt-get or
+ dpkg run under "sudo ./script | tee log" did not get it. Now the whole
+ group gets it, as with sudo.ws, and Ctrl-C there now also reaches apt-
+ get or dpkg under the script.
+
+ * SIGCONT now reaches group members that were not stopped, or that
+ something else stopped on purpose (kill -STOP, a test harness pausing a
+ worker, a tracer such as strace). Programs with a SIGCONT handler, such
+ as shells, editors, pagers and curses programs, run it. sudo sends
+ SIGCONT only after the command stopped or after the user resumed sudo
+ with fg or bg.
+
+ * A command that moves itself into another process group of the same
+ session with setpgid would no longer get SIGCONT or relayed signals,
+ because killpg(command_pid) then misses it and the error is ignored.
+ Before, kill(command_pid) still reached it. sudo.ws behaves the same.
+ The command leads its own group, so it cannot call setsid, and the
+ setpgid(0, getpid()) of an interactive shell changes nothing for a group
+ leader.
+
+ * Not changed: processes in other groups or sessions (the jobs of an
+ interactive shell under sudo -s or sudo -i, setsid children, daemons,
+ tmux and screen, a nested sudo with its own pty). With Defaults
+ !use_pty, or with no terminal (cron, systemd units, most CI), sudo-rs
+ takes src/exec/no_pty.rs, which this upload does not touch. On SIGALRM,
+ sudo still ends only the command pid (SIGHUP, SIGTERM, then SIGKILL), as
+ in upstream 0.2.15. The monitor and the sudo parent are not in the
+ command's group, so killpg cannot signal sudo itself.
+
+ * The same change has shipped in upstream 0.2.14 (2026-06-23) and
+ 0.2.15 (2026-08-31), and in Ubuntu since 0.2.14-1ubuntu2 in 26.10
+ (2026-08-29), now 0.2.14-1ubuntu4.1 in 26.10 and 27.04. A search of
+ upstream issues opened since 2026-06-23 for killpg, SIGCONT, signal,
+ stopped, suspend, hang and deadlock found no report against it.
+
+ [ Other Info ]
+
+ * Upstream: issue 1527, PR 1530, commit
1c9a1eb2d4b746938338ff011c8b20c545188196, merged 2026-03-27, first released in
0.2.14.
+ https://github.com/trifectatechfoundation/sudo-rs/pull/1530
+
+ * The patch is the upstream diff unchanged from its "diff --git" line,
+ under a DEP-3 header with Applied-Upstream, in debian/patches/backports/
+ next to the existing backports. It applies to 0.2.13-0ubuntu1.2 with
+ quilt at fuzz 0 and no offset, and needs no other commit. killpg already
+ exists in 0.2.13, and no Ubuntu patch touches
+ src/exec/use_pty/monitor.rs. After the patch, monitor.rs is identical to
+ the one in upstream v0.2.14 and v0.2.15, so there is no follow-up fix to
+ carry.
+
+ * The same upload fixes LP: #2160212 (Ctrl-Z then fg on sudo visudo and
+ sudo sudo -e, same cause) and LP: #2146860 (upstream PR 1601, a stop of
+ the command itself while sudo is in the foreground, in
+ src/exec/use_pty/parent.rs). Each bug has its own template.
+
+ * Fixed in later releases: 26.10 (stonking) has the fix since
+ 0.2.14-1ubuntu2 and 0.2.14-1ubuntu4.1 in stonking-updates, and
+ tenacious, the current development series, has 0.2.14-1ubuntu4.1. So no
+ 26.10 task is needed. noble has rust-sudo-rs 0.2.2-1 in universe, which
+ is not the default sudo there. Its monitor.rs has the same three
+ kill(command_pid, ...) calls, but it was not tested and no noble task is
+ proposed.
+
+ * Upstream's per release backport branch for 26.04, ubuntu-raccoon-
+ backport, is at 0.2.13-0ubuntu1.2 (commit 7c962f3) and has neither PR
+ 1530 nor PR 1601.
+
+ * Why 26.04 shows it: the single pid kill() is old, and 0.2.2 has it
+ too. From 0.2.12, sudo-rs saves the signal dispositions it starts with
+ and restores them in the command before exec (SignalsState in
+ src/system/signal/state.rs, new in 0.2.12). Up to 0.2.11 the command
+ inherited the monitor's ignored SIGTTIN and SIGTTOU, so a background
+ read got EIO, tcsetattr went through, and nothing stopped. This is read
+ from the source, not tested. 24.04 uses sudo.ws, which relays with
+ killpg.
+
+ * Build: the source package was made from the debdiff in a clean
+ ubuntu:26.04 container, and the binary was built from that .dsc with
+ dpkg-buildpackage as a plain user with fakeroot (rustc and cargo
+ 1.93.1ubuntu1, debhelper 13.31ubuntu1, dh-cargo 33ubuntu3). dh_auto_test
+ passed, 179 passed and 0 failed. The _source.changes has Launchpad-Bugs-
+ Fixed: 2146860 2150073 2160212.
+
+ * Testing done: tests 1 to 6 ran in fresh ubuntu:26.04 containers,
+ typed into an interactive bash on a pty, as root and as a NOPASSWD user,
+ on three .deb builds: the archive 0.2.13-0ubuntu1.2, a build with only
+ the PR 1530 patch, and 0.2.13-0ubuntu1.3 with both patches. Tests 1 to 4
+ hang on 0.2.13-0ubuntu1.2 and pass on both other builds, and the
+ controls 5 and 6 pass on all three. In test 1 on 0.2.13-0ubuntu1.2, apt-
+ get upgrade -y stopped in T+ right after "Processing triggers for libc-
+ bin", and on a second run with nothing to upgrade apt-get install
+ stopped instead. kill -CONT let the script finish both times. Test 1 was
+ also run as the plan says, in one terminal: it hangs on
+ 0.2.13-0ubuntu1.2, then with the 0.2.13-0ubuntu1.3 .deb installed in
+ place of -proposed it passes. Tests 7 and 8 ran in a typed run of the
+ plan as the NOPASSWD user: on 0.2.13-0ubuntu1.2 test 7 prints nothing
+ until Ctrl-C, on 0.2.13-0ubuntu1.3 it prints Terminated, child-term,
+ outer-term and outer-after-child. Test 8 passes on both. Before each apt
+ test the driver waited until no apt or dpkg lock was held and no apt job
+ ran. The containers had no systemd and no unattended-upgrades. The
+ terminal B lines were checked in a container with unattended-upgrades
+ 2.12ubuntu9: the idle unattended-upgrade-shutdown helper is not listed,
+ and a running /usr/bin/unattended-upgrade is.
+
+ * All of this ran once more on .deb packages built from the attached
+ debdiff: tests 1 to 3 on the final build, and the rest on a build whose
+ debdiff differed only in changelog and DEP-3 text and whose sudo, su and
+ visudo binaries are byte identical. The results were the same.
+
+ * Ctrl-C check, in the same containers as root and as the NOPASSWD
+ user: a script whose child traps INT and prints child-int, Ctrl-C 2
+ seconds after the start. "sudo ./int-check.sh | cat" on
+ 0.2.13-0ubuntu1.2: the child never got SIGINT and kept running until it
+ was sent SIGINT by hand. On 0.2.13-0ubuntu1.3 the child printed child-
+ int at once. With no pipe, both builds printed child-int.
+
+ * An strace of the archive binary on test 2 shows the cause. The
+ monitor (415) calls ioctl(TIOCSPGRP, [416]) and then kill(416, SIGCONT),
+ and only the command (416) gets SIGCONT, while its child (417) stays
+ stopped. The 0.2.13-0ubuntu1.3 binary makes the same call as kill(-418,
+ SIGCONT), and both the command and its child get SIGCONT.
+
+ * The containers ran on a 6.18 kernel, not on a 26.04 install with its
+ 7.0 kernel. On a 26.04.1 install with kernel 7.0 and 0.2.13-0ubuntu1.2,
+ a bpftrace of a "curl ... | sudo sh" installer that stopped at its first
+ /dev/tty read showed the same sequence: SIGTTIN to the group, TIOCSPGRP,
+ then SIGCONT to the command only. kill -CONT on the stopped process let
+ it go on.
+
+ * Every run above used .deb packages. A cargo build of the same Ubuntu
+ tree with only the PR 1601 change, not a .deb, still hangs on the shapes
+ of tests 2 to 4. That matches the reporter's result with
+ 0.2.13-0ubuntu1.2~ppa1.
+
+ * The autopkgtest (debian/tests/run-cargo-tests.sh) runs cargo test, so
+ unit tests only. Upstream's compliance tests, which drive sudo on a
+ terminal, live in test-framework/, which is not in the crates.io tarball
+ the package builds from. No autopkgtest is added.
+
+ * Other reports with the same cause: LP: #2173063 (pmbootstrap install
+ --fde on 26.04 echoes the FDE password and ignores Enter). On 2026-11-06
+ its reporter wrote there that they and a sudo-rs maintainer had
+ identified PR 1530 as the fix. It was not reproduced here, so the
+ changelog does not close it.
+
+ [ Original Description ]
+
On Ubuntu 26.04 (where /usr/bin/sudo is implemented via sudo-rs), running
apt-get upgrade or install under sudo from a non‑interactive SSH +
Expect‑driven environment causes the apt-get process to enter a T+ (stopped)
state due to do_signal_stop(), causing the installation to hang indefinitely.
This problem does not reproduce when replacing sudo-rs with classic sudo
(sudo.ws) under identical conditions.
High level flow:
Host OS (launcher):
Ubuntu 22.04 LTS
Guest OS (QEMU VM):
Ubuntu 26.04 (daily / pre‑release)
user@localhost:~$ sudo --version
sudo-rs 0.2.13-0ubuntu1
sudo implementation:
- Failing: sudo-rs (default sudo in Ubuntu 26.04)
- Working: classic sudo (sudo.ws)
Invocation context:
SSH non‑interactive session
Command chain driven via shell script + Expect
No human‑attached TTY inside the guest
Guest OS debug information:
sudo ps -eo pid,ppid,stat,wchan:32,cmd | egrep 'apt|dpkg|ldconfig' | grep -v
grep
8809 7947 T+ do_signal_stop apt-get upgrade -y
pstree -ap output:
├─sshd,3270
│ ├─sshd-session,3757
│ │ └─sshd-session,3793
│ │ └─bash,3799
│ │ ├─sudo,3960 ./installer.sh ASL default
│ │ │ └─sudo,3964 ./installer.sh ASL default
│ │ │ └─installer.sh,3966 /home/user/installer.sh ASL
default
│ │ │ ├─installer.sh,7947 /home/user/installer.sh ASL
default
│ │ │ │ └─apt-get,8809 upgrade -y
│ │ │ └─tee,7948 -a /home/user/cbkc_output.log
│ │ └─tee,3961 installer_logs.txt
** Patch added: "rust-sudo-rs_0.2.13-0ubuntu1.3-v3.final.debdiff"
https://bugs.launchpad.net/ubuntu/+source/rust-sudo-rs/+bug/2150073/+attachment/6016019/+files/rust-sudo-rs_0.2.13-0ubuntu1.3-v3.final.debdiff
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150073
Title:
sudo-rs causes `apt-get install to enter `T+` when script stdout is
piped and stdin is a TTY
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-sudo-rs/+bug/2150073/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs