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

Re: Logout at apt upgrade





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. 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.

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.

Regards,
Tom Dial


      Thanks, best,

          Loïc


Reply to: