Open FractalFir opened 1 month ago
Never seen anything like this in a very long time. It could be a bug in the C library code.
What version of libdbus are you using? Does upgrading/downgrading it help?
I was using using dbus = { version = "0.9", features = ["vendored"] }
, I updated to dbus = { version = "0.9.7", features = ["vendored"] }
, but that did not help.
How do i check which version of libdbus is used with vendored
?
Bizarrely, switching to a system version of libdbus seems to work just fine. I am running
Linux fedora 6.10.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep 18 21:09:58 UTC 2024 x86_64 GNU/Linux
and the libdbus version is 1:1.14.10-3.fc40
(according to my package manager).
Normally, the crashes occur after a few seconds, but I have been taking a screenshot every second for 4 minutes straight, and it seems to run just fine, without any crashes or lost messages(which is something I sometimes encountered before).
Is there any other info you might need?
@FractalFir
Thanks for the investigation. So it only happens when vendored is enabled.
It's totally possible that it is a bug in 1.14.4 (what vendored currently uses) that is fixed in 1.14.10 (which your system uses). There is also a warning somewhere in the docs saying that the recommended way is to build a separate .so and building it into the executable (which we do) is unsupported. So it might be something related to that as well.
Just speculating, this is code we just pull in and build, and that somehow causes a segfault for you.
Hi! Recently, I have been trying to fix a crashing issue in a library(
xcap
) which usesdbus-rs
under the hood.After a lot of investigation, it looks like the crashes happen in
dbus::blocking::Connection::new_session
.I am using this function in a multi-threaded context, but I use locks to grantee only one thread uses
dbus-rs
at any given time.Since
Connection::new_session
is a safe function, I'd expect there to be no special requirements. The documentation ofdbus-rs
andConnection::new_session
also does not say anything about any safety additional requirements.Is this a known issue? If so, are there any workarounds?