[systemd-devel] sd_bus_get_unique_name returns -EBADMSG or -EBUSY
Carlo Wood
carlo at alinoe.com
Wed Apr 7 10:17:57 UTC 2021
On Tue, 6 Apr 2021 18:41:21 +0200
Lennart Poettering <lennart at poettering.net> wrote:
> EBADMSG usually means that somehow an invalid dbus packet we couldn't
> parse entered the stream. maybe some memory corruption thing? or maybe
> you are using this in a threaded env without locking?
>
> Lennart
Yes, that is the case. I was reading up on the demands,
which I found on
https://www.spinics.net/lists/systemd-devel/msg01779.html
making me wonder why I went through the trouble of supporting
dbus with my library :p (which aims at massive parallel
execution without EVER blocking or going to sleep).
Libraries that do not support threading are a pain :/.
It would really help if you could tell me a more fine-
grained multi-threading demands; like - per connection.
Surely I can execute sd_bus_* functions that deal with
a different dbus* in parallel?
As you stated in the linked email, there is no global state.
So, I suppose that if I call any sd_bus_* function that
all that I have to take into account is that the data
that is passed to those functions is protected. If they
use different connections, then no data should be shared,
no?
Carlo
More information about the systemd-devel
mailing list