Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2024-02-29 Thread Michael Biebl

Am 28.02.24 um 22:22 schrieb Richard Lewis:

On Wed, 28 Feb 2024 18:37:41 +0100 Michael Biebl  wrote:


On Fri, 17 Nov 2023 14:40:05 +0100 Christoph Anton Mitterer
 wrote:

Package: systemd
Version: 255~rc2-1



Because of #1056135 I was downgradin systemd/udev packages to 254.5-1.
While apt was still running, this causes the whole desktop environment
(I use cinnamon) to be killed (and all processes in it ;-) ).




My guess is, that the failures you encountered are due to the following
change in v255:

"""
  Service Manager:

  * The way services are spawned has been overhauled.


I couldnt follow the bit i deleted, and this maybe jumping to
conclusions: are there any implications for upgrading to/after 255
within a desktop environment?
should something be said in the release-notes?



No, upgrades should work fine.
That said, the usual recommendations for dist-upgrades apply
https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#upgrade-preparations

I.e. it is generally not recommended to dist-upgrade from within a 
desktop session although usually it works.


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2024-02-28 Thread Richard Lewis
On Wed, 28 Feb 2024 18:37:41 +0100 Michael Biebl  wrote:

> On Fri, 17 Nov 2023 14:40:05 +0100 Christoph Anton Mitterer
>  wrote:
> > Package: systemd
> > Version: 255~rc2-1

> > Because of #1056135 I was downgradin systemd/udev packages to 254.5-1.
> > While apt was still running, this causes the whole desktop environment
> > (I use cinnamon) to be killed (and all processes in it ;-) ).


> My guess is, that the failures you encountered are due to the following
> change in v255:
>
> """
>  Service Manager:
>
>  * The way services are spawned has been overhauled.

I couldnt follow the bit i deleted, and this maybe jumping to
conclusions: are there any implications for upgrading to/after 255
within a desktop environment?
should something be said in the release-notes?



Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2024-02-28 Thread Michael Biebl

Control: severity -1 wishlist
Control: tags -1 + help

Hi Christoph

On Fri, 17 Nov 2023 14:40:05 +0100 Christoph Anton Mitterer 
 wrote:

Package: systemd
Version: 255~rc2-1
Severity: important

Hey.

Because of #1056135 I was downgradin systemd/udev packages to 254.5-1.
While apt was still running, this causes the whole desktop environment
(I use cinnamon) to be killed (and all processes in it ;-) ).

Tried it twice, happened twice.


I acknowledge that not being able to downgrade is a nuisance.
systemd is not special in that regard though. Quite a few packages that 
I now need to convert their on-disk-files on upgrades to a new format 
which is not easily reversible.
None of those packages have explicit maintainer scripts code though, 
which would prevent a downgrade.

So we do not plan to add maintainer scripts code in systemd either.

My guess is, that the failures you encountered are due to the following 
change in v255:


"""
Service Manager:

* The way services are spawned has been overhauled. Previously, a
  process was forked that shared all of the manager's memory (via
  copy-on-write) while doing all the required setup (e.g.: mount
  namespaces, CGroup configuration, etc.) before exec'ing the 
target
  executable. This was problematic for various reasons: several 
glibc
  APIs were called that are not supposed to be used after a 
fork but

  before an exec, copy-on-write meant that if either process (the
  manager or the child) touched a memory page a copy was 
triggered, and

  also the memory footprint of the child process was that of the
  manager, but with the memory limits of the service. From this 
version

  onward, the new process is spawned using CLONE_VM and CLONE_VFORK
  semantics via posix_spawn(3), and it immediately execs a new 
internal
  binary, systemd-executor, that receives the configuration to 
apply

  via memfd, and sets up the process before exec'ing the target
  executable. The systemd-executor binary is pinned by file 
descriptor

  by each manager instance (system and users), and the reference is
  updated on daemon-reexec - it is thus important to reexec all 
running

  manager instances when the systemd-executor and/or libsystemd*
  libraries are updated on the filesystem.
"""

This is just a guess though.
There is only so much we can do as Debian systemd team. If that issue is 
important to you, please consider investigating this further and 
providing patches, ideally via a MR on salsa.


Michael



OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2023-11-17 Thread Christoph Anton Mitterer
On Fri, 2023-11-17 at 15:37 +0100, Michael Biebl wrote:
> downgrades are not officially supported by Debian.

Sure... and if it's not fixable... well then it's not. But at least it
would be better then to abort the downgrade if it's detected that e.g.
a DE is running.
In my case it didn't matter but people may have important/unsaved data
open.

And maybe there is just some accidental restart of dbus or so involved
(that usually kills of the DE, too).


Cheers,
Chris.



Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2023-11-17 Thread Michael Biebl

Am 17.11.23 um 15:31 schrieb Christoph Anton Mitterer:

Control: tags -1 - moreinfo

Hey Luca.


On Fri, 2023-11-17 at 14:03 +, Luca Boccassi wrote:

Please attach the journal from around the time where the installation
was happening


Please see the attached file.

Also I just remembered, that with 255~rc2-1, and after it happened that
downgrading killed my DE session... I logged into Cinnamon again, and
when *then* pressing the power button, it wasn't even like in #1056135,
that *only* the Hibernation button was missing, but *no* pop-up dialog
(with at least Suspend, Cancel, Restart, Shutdown) showed up, and it
went straight without any further confirmation into shutdown.


Just a word of warning: downgrades are not officially supported by Debian.
They might just work most of the time for more trivial packages, but 
often they don't (e.g. because data structures have changed that are 
converted on upgrades but not on downgrades).



Regards,
Michael





OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1056137: systemd: downgrading systemd packages kills off the desktop environment

2023-11-17 Thread Luca Boccassi
Control: tags -1 moreinfo

On Fri, 17 Nov 2023 14:40:05 +0100 Christoph Anton Mitterer
 wrote:
> Package: systemd
> Version: 255~rc2-1
> Severity: important
> 
> Hey.
> 
> Because of #1056135 I was downgradin systemd/udev packages to 254.5-
1.
> While apt was still running, this causes the whole desktop
environment
> (I use cinnamon) to be killed (and all processes in it ;-) ).
> 
> Tried it twice, happened twice.

Please attach the journal from around the time where the installation
was happening

-- 
Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part