[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Logout at apt upgrade



On Thu 01 Dec 2022 at 17:45:25 (-0700), Tom Dial wrote:
> On 11/29/22 15:35, Loïc Grenié wrote:
> >      Dear Debian users,
> > 
> >      when I apt upgrade my system, I often (one every three, more
> >    or less) find myself brutally logged out of the window system,
> >    with systemd services painfully restarting (or failing to restart).
> >    The only way I can recover is usually to reboot. I've tried to
> >    manually stop, kill the leftover processes and restart the services,
> >    one after the other, but it's very long and does not always work.
> >    I have observed this situation for a few years (maybe two or three,
> >    maybe more, I'm slow to bore).
> > 
> >      Am I the only one? Is there a way to upgrade the system without
> >    rebooting as it used to be a few years ago? I remember updating
> >    libc.so without rebooting -- only the kernel needed reboot, and
> >    the window system, if specific files changed.
> > 
> 
> This behavior happens. I don't recall having seen explicit warnings, but the upgrade section in the release notes for several recent releases alludes to ssh restarts interrupting the operator connection to the upgrade processes.

There are good reasons for this warning in the Release Notes.
For example, stretch ceased to support some old ssh protocols,
and IIRC jessie was the first to outlaw remote root login by
password, so it makes sense to check that you're not relying
on those facilities, and in any case after upgrading ssh, to
always check that you can make a new connection /before/
logging out of the old connection that you upgraded via.

But these considerations are for major release upgrades,
not even point-releases, whereas the OP wrote "one every
three" or thereabouts, so they must have been routine ones.

> I've experienced this and observed that the upgrade process continues, although disconnected from the operator. As you noted, update to udev (or any package that requires udev restart may trigger this, and the same is true of gdm (to my knowledge) and possibly other window managers.

Well Gnome was blamed in the first reply of this thread.
As for udev, I think my buster installations were upgraded
six times, from 241-5 to 241-7~deb10u{3,4,5,6,7,8}, with
no ill effects. Perhaps DMs or DEs add problematical udev
rules that I've never caught sight of.

> Doing upgrades using a terminal in a desktop environment carries a risk, although I never have seen damage from this. At worst, I had to run "dpkg --configure --pending" and reissue the upgrade command.
> 
> The simplest way to avoid this is to run the update or upgrade from one of the console terminals available by pressing <ctrl><alt>,<f1-f6> (one or more of these is used by X, but any one that has a login prompt will do. A slightly better, but inconvenient, alternative is to use a serial console, which requires extra equipment and upfront configuration. It usually is not necessary.

I'd agree with the first, but the second sounds rather OTT unless
you're upgrading a headless box.

Cheers,
David.

Reply to: