sshd is not restarted properly on libc6 upgrades
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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/
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.
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.
Ok, I've built the branch linked to this report in a PPA here:
https:/ /launchpad. net/~clint- fewbar/ +archive/ fixes
Note that that PPA is full of other things that aren't dependencies of mysql, so be careful using the ppa, upgrades may break your box. :)