Public bug reported:

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

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

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

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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to