[Bug 709468] [NEW] sshd is not restarted properly on libc6 upgrades

Clint Byrum clint at fewbar.com
Fri Jan 28 19:58:36 UTC 2011


Public bug reported:

The logic that libc6 uses to restart services on libc6 upgrade involves
calling invoke-rc.d $service restart.

invoke-rc.d is totally upstart unaware, and relies entirely on upstart
job files being symlinked to /lib/init/upstart-job

ssh is unique in that its init.d script has been kept, untouched, to
enable use/testing in chroots.

The problem is, this means that on libc6 upgrade, we actually start a
new sshd:

Jan 28 11:41:50 lucid sshd[1499]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1499]: error: Bind to port 22 on :: failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1499]: fatal: Cannot bind any address.
Jan 28 11:41:50 lucid sshd[1502]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1502]: error: Bind to port 22 on :: failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1502]: fatal: Cannot bind any address.
Jan 28 11:41:50 lucid sshd[1505]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1505]: error: Bind to port 22 on :: failed: Address already in use.
Jan 28 11:41:50 lucid sshd[1505]: fatal: Cannot bind any address.

The parent just sits there waiting. Now this parent is reaped by
/etc/init.d/sendsigs, but the main process managed by upstart is not.
Even though it should be in the process of shutting down thanks to the
fix for bug #603363 (not backported to lucid yet), it may not have
stopped quite yet, so / fails the remount to readonly.

Suggested immediate fix is to have the init.d script actually check to
see if the upstart job is running, and restart it instead.

Long term once the session support lands in upstart, this init.d script
should be removed anyway.

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

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in ubuntu.
https://bugs.launchpad.net/bugs/709468

Title:
  sshd is not restarted properly on libc6 upgrades



More information about the Ubuntu-server-bugs mailing list