Thursday 1 October 2020

Re: systemd PathExists triggers

For reference, it was reported upstream originally as a regression [1]
until Poettering confirmed that it was a fix for a broken behaviour
[2].

For those interested in the details, reading the discussion there
might help understand the context a little better.

[1] https://github.com/systemd/systemd/issues/16669
[2] https://github.com/systemd/systemd/issues/16669#issuecomment-691193254

On Thu, Oct 1, 2020 at 10:21 AM Dimitri John Ledkov <xnox@ubuntu.com> wrote:
>
> Conditions* are unaffected at all, and are unrelated to the issue at
> hand whatsoever.
>
> On Thu, 1 Oct 2020 at 08:33, Christian Ehrhardt
> <christian.ehrhardt@canonical.com> wrote:
> >
> > On Wed, Sep 30, 2020 at 7:43 PM Brian Murray <brian@ubuntu.com> wrote:
> > >
> > > Recently there was a systemd change regarding PathExists for
> > > systemd.path units that made systemd behave the way it was documented to
> > > work. The effect being that if the PathExists or PathExistsGlob
> > > condition is met the service is continually started which may not be the
> > > behavior some packages expect as it didn't used to work that way.
> > >
> > > As an example apport's autoreport service uses PathExistsGlob to check
> > > for a .crash file and then calls whoopsie-upload-all which used to run
> > > once when the .crash file appeared. As of Groovy whoopsie-upload-all was
> > > called continuously thereby causing systemd to use 100% of your CPU[1].
> > >
> > > While this is resolved for apport's case, the Foundation's team thought
> > > it was worth mentioning as other package's services may also be
> > > impacted.
> >
> > Thanks Brian for your warning!
> > I see in your list some .path files e.g. the aforementioned
> > apport-autoreport.path
> > that I understand if using a PathExist* will have changed. Of those the list [2]
> > contains 9 to look at.
> >
> > I beg your pardon, but the list is vast due to including any
> > "Type=oneshot" as well.
> > And from the summary you gave I don't see why those are included as well.
> > Looking at the first in the list that probably everyone has installed I see:
> > a)
> > /lib/systemd/system/alsa-restore.service there are no associated .path
> > files, only
> > ConditionPathExists in the unit itself - are those also affected?
> > b)
> > Looking slightly further /lib/systemd/system/apt-daily.service even
> > has no associated
> > .path nor any *Exist* statement.
> >
> > My question would now be - are those files of type (a) or (b) all also
> > affected in
> > some way or is the "critical list" actually much shorter? I was wondering if you
> > could help to clarify before everyone that feels responsible for a package with
> > a file in that list is diving into and re-understanding the case.
> >
> > Thanks in advance,
> > Christian
> >
> > > An archive search[2] (thanks Seth!) was done of services which are
> > > Type=oneshot or utilize a PathExists or PathExistsGlob. Briefly scanning
> > > the list the following packages should probably be looked at:
> > >
> > > mandos-client
> > > ostree
> > > python-diskimage-builder
> > > ubuntu-report
> > >
> > > [1] http://launchpad.net/bugs/1891657
> > > [2] https://paste.ubuntu.com/p/k5Gj7rQ9FX/
> > >
> > > Cheers,
> > > --
> > > Brian Murray
> > >
> > > --
> > > ubuntu-devel mailing list
> > > ubuntu-devel@lists.ubuntu.com
> > > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
> >
> >
> >
> > --
> > Christian Ehrhardt
> > Staff Engineer, Ubuntu Server
> > Canonical Ltd
> >
> > --
> > ubuntu-devel mailing list
> > ubuntu-devel@lists.ubuntu.com
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
>
>
>
> --
> Regards,
>
> Dimitri.
>
> --
> Regards,
>
> Dimitri.
>
> --
> ubuntu-devel mailing list
> ubuntu-devel@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

--
Tiago Stürmer Daitx
Software Engineer
tiago.daitx@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel