dbus Digest, Vol 206, Issue 1
S M
mani99_ at hotmail.com
Fri Mar 3 13:05:58 UTC 2023
Help: unsubscribe
Sent from my iPhone
> On Mar 3, 2023, at 6:00 AM, dbus-request at lists.freedesktop.org wrote:
>
> Send dbus mailing list submissions to
> dbus at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.freedesktop.org/mailman/listinfo/dbus
> or, via email, send a message with subject or body 'help' to
> dbus-request at lists.freedesktop.org
>
> You can reach the person managing the list at
> dbus-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dbus digest..."
>
>
> Today's Topics:
>
> 1. method timeouts vs systemd activation and slow systems
> (Colin Walters)
> 2. Re: method timeouts vs systemd activation and slow systems
> (Lawrence D'Oliveiro)
> 3. Re: method timeouts vs systemd activation and slow systems
> (Thiago Macieira)
> 4. Re: method timeouts vs systemd activation and slow systems
> (Thiago Macieira)
> 5. Re: method timeouts vs systemd activation and slow systems
> (Lawrence D'Oliveiro)
> 6. Re: method timeouts vs systemd activation and slow systems
> (Lennart Poettering)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 02 Mar 2023 10:15:23 -0500
> From: "Colin Walters" <walters at verbum.org>
> To: dbus at lists.freedesktop.org
> Subject: method timeouts vs systemd activation and slow systems
> Message-ID: <39b1fdb1-248c-4477-af24-58b1f5ef5b55 at app.fastmail.com>
> Content-Type: text/plain
>
> A while ago now my role switched from working on the Linux desktop to working on Linux servers, and since then I've discovered that servers are a bit more of a wild world.
>
> Long ago I think Havoc chose to default to 25 second timeouts for DBus method calls. This is generally OK on mostly idle single-user desktop systems. (Particularly modern laptops/desktops with NVMe drives etc.)
>
> But servers...well, it turns out that some people want to e.g. use under-resourced (or rather over-provisioned) private OpenStack instances for example - and there, I/O can be *really* slow. And basically we start seeing the 25 second DBus method call show up here as system failures.
>
> Now later, systemd came along and started defaulting to 90 seconds for service activation. This is IMO a bit more reasonable of a timeout.
>
> But crucially - the systemd activation timeout can be conveniently configured *system wide*. And basically that's what I want here - the ability to change the OS to detect this situation and globally affect dbus method call timeouts.
>
> Now unfortunately today, these timeouts are hardcoded in client code. But...here's my strawman:
>
> - Change dbus-{daemon,broker} to have a config for this
> - Default that config to the systemd service start timeout
> - Fix client libraries to query the daemon for the timeout (or parse the configs on their own? not sure)
>
> Also xref the related https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer and my comment https://github.com/coreos/fedora-coreos-tracker/issues/1404#issuecomment-1412827914
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 Mar 2023 10:21:25 +1300
> From: Lawrence D'Oliveiro <ldo at geek-central.gen.nz>
> To: dbus at lists.freedesktop.org
> Subject: Re: method timeouts vs systemd activation and slow systems
> Message-ID: <20230303102125.371bf2f4 at theon.geek-central.gen.nz>
> Content-Type: text/plain; charset=US-ASCII
>
>> On Thu, 02 Mar 2023 10:15:23 -0500, Colin Walters wrote:
>>
>> - Fix client libraries to query the daemon for the timeout (or parse
>> the configs on their own? not sure)
>
> An environment variable would seem to be the natural way to specify
> this.
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 02 Mar 2023 19:01:54 -0800
> From: Thiago Macieira <thiago at kde.org>
> To: dbus at lists.freedesktop.org
> Subject: Re: method timeouts vs systemd activation and slow systems
> Message-ID: <21226828.hcdKbhU8Es at tjmaciei-mobl5>
> Content-Type: text/plain; charset="us-ascii"
>
>> On Thursday, 2 March 2023 13:21:25 PST Lawrence D'Oliveiro wrote:
>>> On Thu, 02 Mar 2023 10:15:23 -0500, Colin Walters wrote:
>>> - Fix client libraries to query the daemon for the timeout (or parse
>>> the configs on their own? not sure)
>>
>> An environment variable would seem to be the natural way to specify
>> this.
>
> Would be far easier to parse, indeed. Querying the daemon after start would be
> second best, because it would avoid having to parse a config file.
>
> However, environments do sometimes get cleared, so a child process somewhere
> down the tree could lose it. Obviously that can't happen for a session daemon,
> because they'd have lost the bus address too, but Colin is talking about
> servers, so sessions may not be anywhere in sight. A query to the daemon would
> apply to all processes that, well, talk to the daemon :)
>
> Is there a security concern here for environment variables?
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DCAI Cloud Engineering
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 02 Mar 2023 19:04:05 -0800
> From: Thiago Macieira <thiago at kde.org>
> To: dbus at lists.freedesktop.org
> Subject: Re: method timeouts vs systemd activation and slow systems
> Message-ID: <2458919.NeW584JBU5 at tjmaciei-mobl5>
> Content-Type: text/plain; charset="us-ascii"
>
>> On Thursday, 2 March 2023 07:15:23 PST Colin Walters wrote:
>> A while ago now my role switched from working on the Linux desktop to
>> working on Linux servers, and since then I've discovered that servers are a
>> bit more of a wild world.
>
> Welcome to the club.
>
> We spend a lot of time making the base runtime as fast as possible so the
> higher layers write everything in interpreted languages and have shell scripts
> doing "sleep 1s; poll something".
>
> Well, every cycle saved counts.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DCAI Cloud Engineering
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 3 Mar 2023 16:18:21 +1300
> From: Lawrence D'Oliveiro <ldo at geek-central.gen.nz>
> To: dbus at lists.freedesktop.org
> Subject: Re: method timeouts vs systemd activation and slow systems
> Message-ID: <20230303161821.75ea88fe at theon.geek-central.gen.nz>
> Content-Type: text/plain; charset=UTF-8
>
>> On Thu, 02 Mar 2023 19:04:05 -0800, Thiago Macieira wrote:
>>
>> ... and have shell scripts doing "sleep 1s; poll something".
>
> What?s the bet the next version of bash will have a builtin command for
> poll(2) ...
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 3 Mar 2023 09:45:52 +0100
> From: Lennart Poettering <mzqohf at 0pointer.de>
> To: Colin Walters <walters at verbum.org>
> Cc: dbus at lists.freedesktop.org
> Subject: Re: method timeouts vs systemd activation and slow systems
> Message-ID: <ZAGzwGcpIY01BSUt at gardel-login>
> Content-Type: text/plain; charset=utf-8
>
> eOn Do, 02.03.23 10:15, Colin Walters (walters at verbum.org) wrote:
>
>> - Fix client libraries to query the daemon for the timeout (or parse
>> the configs on their own? not sure)
>
> That kinda creates a conceptual cyclic dep, no? to query the default
> timeout you issue a method call, thus you need to query the default
> timeout, which you issue a method call for, thus you need to query the
> default timeout, which you isue a method call for, thus you ne?
>
> This isn't hard to break of course, but suggests to me that maybe this
> is a parameter that should be agreed on before the usual dbus message
> chatter begins, i.e. maybe as part of the auth protocol? similar to
> the agreement on the unix-fd support, maybe client and server could
> exchange other parameters, such as he default method call timeout.
>
> This also has the benefit thta it is easier to pipeline, as full
> roundtrips are nasty nasty business.
>
> That all said, I don't see anyone volunteering to do the work to
> extend the protocol for this. Or are you volunteering?
>
> I see your problem though, and it is kinda broken that the activation
> timeout is longer than the method call timeout. Hence I am kinda
> tempted to just bump the default method call timeout in
> sd-bus. That'll fix a lot of low-level software, but of course not
> stuff relying on libdbus or glib's logic.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dbus
>
>
> ------------------------------
>
> End of dbus Digest, Vol 206, Issue 1
> ************************************
More information about the dbus
mailing list