Shutdown/reboot hangs forever if an autossh process is started by rc.local

Bug #1656237 reported by Ivan Kozik
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

If an autossh process is started by /etc/rc.local, a xenial system is no longer able to shut down. It seems to hang forever, not just for a few minutes.

Repro steps:

As root:

# Set up an autossh tunnel (in this example, from localhost to localhost):
apt-get install autossh openssh-server
ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
ssh root@localhost true
  "yes", accept the fingerprint

# Test that autossh works:
autossh -f -L 127.0.0.2:22:127.0.0.1:22 root@localhost -N
ps auxw | grep autossh
  autossh should be listed

# Add to /etc/rc.local before exit line:
autossh -f -L 127.0.0.2:22:127.0.0.1:22 root@localhost -N &

# Enable rc-local service if necessary:
systemctl enable rc-local.service

Reboot.

After booted into system, `shutdown -r now`. Observe that systemd always hangs forever during shutdown.

# lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

# dpkg -l | grep systemd
ii libpam-systemd:amd64 229-4ubuntu13 amd64 system and service manager - PAM module
ii libsystemd0:amd64 229-4ubuntu13 amd64 systemd utility library
ii libsystemd0:i386 229-4ubuntu13 i386 systemd utility library
ii systemd 229-4ubuntu13 amd64 system and service manager
ii systemd-sysv 229-4ubuntu13 amd64 system and service manager - SysV links

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Dan Streetman (ddstreet)
Changed in systemd (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.