In the case of the unavailable USB drive automount, the SSH session does
not hang if the following scripts are prevented from executing:


sudo chmod -x /etc/update-motd.d/91-release-upgrade
sudo chmod -x /etc/update-motd.d/98-fsck-at-reboot


The culprits can be found with:

sudo bpftrace -e 'tracepoint:syscalls:sys_enter_execve /str(args->filename) == 
"/usr/bin/stat"/ { printf("%s (PID %d) is executing stat\n", comm, pid); }'
Attaching 1 probe...
release-upgrade (PID 4146571) is executing stat
update-motd-fsc (PID 4146833) is executing stat


In 98-fsck-at-reboot, the following line probably triggers the automounts:


ext_partitions=$(mount | awk '$5 ~ /^ext(2|3|4)$/ { print $1 }' | grep -v 
"/dev/nbd" || true)


But why does an incoming SSH session trigger scripts in /etc/update-
motd.d/ in the first place?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2130843

Title:
  SSH sessions blocked on unavailable automounts by default in Ubuntu
  25.10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2130843/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to