Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-49603

rpm-ostreed.service idle-timeout is too aggressive

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • CentOS Stream 9
    • rpm-ostree
    • None
    • None
    • 1
    • rhel-sst-rhcos
    • 3
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Core Packages - 257
    • None
    • None
    • None

      What were you trying to do that didn't work?

      I am currently debugging a curious bug in cockpit-ostree: after roughly a minute the UI stops updating, as it does not receive any signals from rpm-ostreed any more. Turns out this is because rpm-ostreed.service times out and exits.

      Please provide the package NVR for which bug is seen:

      rpm-ostree-2024.6-1.el9.x86_64

      How reproducible: Always

      Steps to reproduce

      • Edit /etc/rpm-ostreed.conf to set IdleExitTimeout=10 to iterate faster; the bug exists with the default 60s as well, but iteration takes too long then
      • Follow the automatic stopping with
        watch systemctl status rpm-ostreed
        

      Now do some D-Bus queries to it in a loop (like once every 2 seconds), like

      busctl call org.projectatomic.rpmostree1 /org/projectatomic/rpmostree1 org.freedesktop.DBus.Peer Ping
      

      or more specifically,

      busctl call org.projectatomic.rpmostree1 /org/projectatomic/rpmostree1 org.freedesktop.DBus.ObjectManager GetManagedObjects
      

      or even more expensively/specifically:

      busctl call org.projectatomic.rpmostree1 /org/projectatomic/rpmostree1/default org.projectatomic.rpmostree1.OS ListRepos
      

      Expected results

      As soon as there is a connected D-Bus client (with signal subscriptions), rpm-ostreed should never time out – only after the last client disconnected.

      I also expect each D-Bus request to a running daemon to reset the idle timeout.

      Actual results

      rpm-ostreed.service stops after ~ 10 seconds (it varies, there's some randomness added to it) always, regardless of what you do. I didn't find a way to keep it alive with D-Bus calls.

      It also does not even seem to unregister from D-Bus properly, the client doesn't even get a "NameLost" signal that the service went away. E.g. when you pkill -e udisksd, you get this in busctl monitor:

      ‣ Type=signal  Endian=l  Flags=1  Version=1 Cookie=-1  Timestamp="Thu 2024-07-18 12:28:07.139996 UTC"
        Sender=org.freedesktop.DBus  Destination=:1.158  Path=/org/freedesktop/DBus  Interface=org.freedesktop.DBus  Member=NameLost
        MESSAGE "s" {
                STRING "org.freedesktop.UDisks2";
        };
      

      but this doesn't happen for rpm-ostreed. So there's no way for a client to react to a timeout and re-establish the connection.

              Unassigned Unassigned
              rhn-engineering-mpitt Martin Pitt
              CoreOS Bot CoreOS Bot
              CoreOS QE Bot CoreOS QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: