dbus issueshttps://gitlab.freedesktop.org/dbus/dbus/-/issues2021-12-07T13:07:30Zhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/320test-dbus-damon sporadically fails on CI building x86_64 variant2021-12-07T13:07:30ZRalf Habackertest-dbus-damon sporadically fails on CI building x86_64 variantAt !192 the following issue has been detected
```
test 14
Start 14: test-dbus-daemon
14: Test command: /usr/bin/wine "z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/bin/test-dbus-daemon.exe" "--tap"
14: Environment vari...At !192 the following issue has been detected
```
test 14
Start 14: test-dbus-daemon
14: Test command: /usr/bin/wine "z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/bin/test-dbus-daemon.exe" "--tap"
14: Environment variables:
14: DBUS_SESSION_BUS_ADDRESS=
14: DBUS_FATAL_WARNINGS=1
14: DBUS_TEST_DAEMON=z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/bin/dbus-daemon.exe
14: DBUS_TEST_DATA=z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/test/data
14: DBUS_TEST_DBUS_LAUNCH=z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/bin/dbus-launch.exe
14: DBUS_TEST_EXEC=z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/bin
14: DBUS_TEST_HOMEDIR=z:/builds/rhabacker/dbus/ci-build-debug-x86_64-w64-mingw32/dbus
14: DBUS_TEST_UNINSTALLED=1
14: Test timeout computed to be: 180
14: it looks like wine32 is missing, you should install it.
14: multiarch needs to be enabled first. as root, please
14: execute "dpkg --add-architecture i386 && apt-get update &&
14: apt-get install wine32"
14: # random seed: R02Sbd711b07332d5c7b8dbd75571371dd26
14: 1..27
14: # Resetting test timeout (reference: 0000000000600f70; factor: 1)
14: # ProcessID of this process is 8
14: # WindowsSID of this process is S-1-5-21-0-0-0-1000
14: # Time since timeout reset 0000000000600f70: 0.256 seconds
14: ok 1 /creds
14: # Resetting test timeout (reference: 0000000000601da0; factor: 1)
14: # GetConnectionUnixProcessID returned 8
14: # Time since timeout reset 0000000000601da0: 0.267 seconds
14: ok 2 /processid
14: # Start of echo tests
14: # Resetting test timeout (reference: 0000000000604560; factor: 1)
14: # max perf: 2000 messages / 8.504816 seconds
14: # Time since timeout reset 0000000000604560: 8.765 seconds
14: ok 3 /echo/session
14: # Resetting test timeout (reference: 0000000000728680; factor: 1)
14: # Bug Reference: https://bugs.freedesktop.org/show_bug.cgi?id=34393
14: # max perf: 10000 messages / 61.915981 seconds
14: # Time since timeout reset 0000000000728680: 62.281 seconds
14: Bail out! Test timed out (GLib main loop timeout callback reached)
14/34 Test #14: test-dbus-daemon .................***Failed 71.88 sec
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/321Ubuntu 20.04 LTS : "Software Sources" Dialog Crashes2020-11-23T11:16:28ZJijo JosephUbuntu 20.04 LTS : "Software Sources" Dialog CrashesThis might or might not be due to a bug in D-Bus. But D-Bus is the one which comes last in the crash report.
OS: Ubuntu 20.04 LTS (Budgie Desktop)
Python: Python 3.8.5
Immediately after installing the driver below, Ubuntu's software s...This might or might not be due to a bug in D-Bus. But D-Bus is the one which comes last in the crash report.
OS: Ubuntu 20.04 LTS (Budgie Desktop)
Python: Python 3.8.5
Immediately after installing the driver below, Ubuntu's software sources dialog started crashing. I know the culprit is the installation. I've uninstalled the driver but still the problem persists. What I understood from the log is that it has something to do with python. I have no knowledge of python and getting no proper answer for this issue on the web. Complete crash report is attached. Apologies if this is not directly related to d-bus but any help would be appreciated.
[HP Printer Driver](https://developers.hp.com/hp-linux-imaging-and-printing/gethplip)
[_usr_bin_software-properties-gtk.1000.crash](/uploads/10109487779df8c828030e1368664f04/_usr_bin_software-properties-gtk.1000.crash)https://gitlab.freedesktop.org/dbus/dbus/-/issues/322Do not waste maintainer time and CI time on rebasing MRs that are otherwise OK.2022-03-24T22:20:18ZRalf HabackerDo not waste maintainer time and CI time on rebasing MRs that are otherwise OK.from https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/193#note_702966
> I think we should seriously consider going back to "Merge method: Merge commit" instead of "Merge method: Merge commit with semi-linear history", so that w...from https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/193#note_702966
> I think we should seriously consider going back to "Merge method: Merge commit" instead of "Merge method: Merge commit with semi-linear history", so that we don't have to waste maintainer time and CI time on rebasing MRs that are otherwise OK.https://gitlab.freedesktop.org/dbus/dbus/-/issues/323system bus prohibit eavesdrop2020-12-14T11:37:05Zletmestudysystem bus prohibit eavesdropHow to prohibit a certain service on the system bus from being monitored by similar monitoring tools such as dbus-monitor?
I have tried to edit the .conf file,added the following content:
`<deny recevice_interface="xx.xx.xx.xx" eavesdro...How to prohibit a certain service on the system bus from being monitored by similar monitoring tools such as dbus-monitor?
I have tried to edit the .conf file,added the following content:
`<deny recevice_interface="xx.xx.xx.xx" eavesdrop="true" />
<deny send_interface="org.freedesktop.DBus.Monitoring" send_member="BecomeMonitor"/>
`
As a result, this interface is forbidden to access.
So how can I implement this function?https://gitlab.freedesktop.org/dbus/dbus/-/issues/324FTBFS on FreeBSD because of socket credentials2021-01-06T13:53:49ZericLemanissierFTBFS on FreeBSD because of socket credentialsI cannot compile dbus 1.12.20 on FreeBSD, because of this error in dbus-sysdeps-unix.c
```
/root/.conan/data/dbus/1.12.20/_/_/build/531b5f859e5602ea7d544f5adc72ae1c68a7b11d/source_subfolder/dbus/dbus-sysdeps-unix.c:2219:2: warning: Socke...I cannot compile dbus 1.12.20 on FreeBSD, because of this error in dbus-sysdeps-unix.c
```
/root/.conan/data/dbus/1.12.20/_/_/build/531b5f859e5602ea7d544f5adc72ae1c68a7b11d/source_subfolder/dbus/dbus-sysdeps-unix.c:2219:2: warning: Socket credentials not supported on this Unix OS [-W#warnings]
#warning Socket credentials not supported on this Unix OS
^
/root/.conan/data/dbus/1.12.20/_/_/build/531b5f859e5602ea7d544f5adc72ae1c68a7b11d/source_subfolder/dbus/dbus-sysdeps-unix.c:2220:2: warning: Please tell https://bugs.freedesktop.org/enter_bug.cgi?product=DBus [-W#warnings]
#warning Please tell https://bugs.freedesktop.org/enter_bug.cgi?product=DBus
^
/root/.conan/data/dbus/1.12.20/_/_/build/531b5f859e5602ea7d544f5adc72ae1c68a7b11d/source_subfolder/dbus/dbus-sysdeps-unix.c:2230:3: error: Credentials passing not working on this OS is a regression!
# error Credentials passing not working on this OS is a regression!
^
```
more details on https://github.com/ericLemanissier/conan-center-index/runs/1655737093?check_suite_focus=true#step:3:5419https://gitlab.freedesktop.org/dbus/dbus/-/issues/325feature request : adding meson build system2022-07-14T10:58:23Zvtorrifeature request : adding meson build systemHello
i would like to know if you (the devs) are considering adding a meson build system.
thank youHello
i would like to know if you (the devs) are considering adding a meson build system.
thank youhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/331Why UnknownMethod "PrepareForShutdown"2021-03-04T10:12:30ZShiming ZhangWhy UnknownMethod "PrepareForShutdown"``` shell
$ dbus-send --print-reply --system /org/freedesktop/login1 org.freedesktop.login1.Manager.PrepareForShutdown boolean:true
Error org.freedesktop.DBus.Error.UnknownMethod: Method "PrepareForShutdown" with signature "b" on interfa...``` shell
$ dbus-send --print-reply --system /org/freedesktop/login1 org.freedesktop.login1.Manager.PrepareForShutdown boolean:true
Error org.freedesktop.DBus.Error.UnknownMethod: Method "PrepareForShutdown" with signature "b" on interface "org.freedesktop.login1.Manager" doesn't exist
```
``` shell
$ dbus-monitor --system
signal time=1614851344.213784 sender=org.freedesktop.DBus -> destination=:1.27062 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.27062"
signal time=1614851344.213880 sender=org.freedesktop.DBus -> destination=:1.27062 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.27062"
method call time=1614851347.546670 sender=:1.27063 -> destination=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method return time=1614851347.546689 sender=org.freedesktop.DBus -> destination=:1.27063 serial=1 reply_serial=1
string ":1.27063"
signal time=1614851347.546702 sender=org.freedesktop.DBus -> destination=(null destination) serial=57054 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.27063"
string ""
string ":1.27063"
signal time=1614851347.546719 sender=org.freedesktop.DBus -> destination=:1.27063 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.27063"
signal time=1614851347.547641 sender=org.freedesktop.DBus -> destination=:1.27063 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.27063"
signal time=1614851347.547665 sender=org.freedesktop.DBus -> destination=(null destination) serial=57055 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.27063"
string ":1.27063"
string ""
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/332Build fails with mingw32: error: 'NO_ERROR' undeclared2021-11-18T10:44:29ZSergey InozemcevBuild fails with mingw32: error: 'NO_ERROR' undeclaredGot error while build from source with mingw-32 : Makefile:164: recipe for target 'all' failed
[dbus-mingw32-build.log](/uploads/ecea412b2c252218ff39ef03755eb3dc/dbus-mingw32-build.log)Got error while build from source with mingw-32 : Makefile:164: recipe for target 'all' failed
[dbus-mingw32-build.log](/uploads/ecea412b2c252218ff39ef03755eb3dc/dbus-mingw32-build.log)https://gitlab.freedesktop.org/dbus/dbus/-/issues/336private connection seems always cause a memory leak2021-11-18T15:04:48ZPlan Cprivate connection seems always cause a memory leak
run this demo:
```c
#include <stdio.h>
#include <unistd.h>
#include <dbus/dbus.h>
void test()
{
DBusConnection *dbus_conn = dbus_bus_get_private(DBUS_BUS_SESSION, NULL);
dbus_connection_close(dbus_conn);
dbus_connection_unr...
run this demo:
```c
#include <stdio.h>
#include <unistd.h>
#include <dbus/dbus.h>
void test()
{
DBusConnection *dbus_conn = dbus_bus_get_private(DBUS_BUS_SESSION, NULL);
dbus_connection_close(dbus_conn);
dbus_connection_unref(dbus_conn);
}
int main()
{
int nIndex = 0;
while(TRUE)
{
printf("Test %d times\n", ++nIndex);
test();
usleep(100);
}
return 0;
}
```
see the top:
```
top - 16:27:40 up 2:04, 1 user, load average: 1.72, 3.41, 3.39
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 6.5 us, 0.0 sy, 0.0 ni, 93.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3856.0 total, 153.3 free, 2783.6 used, 919.0 buff/cache
MiB Swap: 8192.0 total, 5774.2 free, 2417.8 used. 449.3 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4421 planc 20 0 409464 257764 2008 S 0.0 6.5 9:50.96 dbus-daemon
```
`RES` of `dbus-daemon` will increase continuously, then exit the demo, the `RES` will not reduce.https://gitlab.freedesktop.org/dbus/dbus/-/issues/338dbus-send core dump on line-feed2021-07-19T12:27:17Zsimeonfelisdbus-send core dump on line-feedI'm on some embedded platform and encountered a core dump of dbus-send by accidently pasting a line feed in the INTERFACE.MEMBER argument:
```
dbus-send --system --type=method_call --print-reply --dest=com.example.service /com/example/s...I'm on some embedded platform and encountered a core dump of dbus-send by accidently pasting a line feed in the INTERFACE.MEMBER argument:
```
dbus-send --system --type=method_call --print-reply --dest=com.example.service /com/example/service/api com.example.service.api.call"
"
[ 1182.630740] core dump of dbus-send (PID=3101) (SIG=6) saved at
```
And this is all, no core dump on this system.
```
dbus-daemon --version
D-Bus Message Bus Daemon 1.8.20
```
Maybe related to #283 or #227https://gitlab.freedesktop.org/dbus/dbus/-/issues/340Help with dbus_connection_get_unix_process_id2021-08-20T10:54:08ZAdmiralNemoHelp with dbus_connection_get_unix_process_idI am having trouble getting the `dbus_connection_get_unix_process_id` function to return `TRUE` and populate the peer process ID. From the [documentation](https://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#gaeebeadcafa...I am having trouble getting the `dbus_connection_get_unix_process_id` function to return `TRUE` and populate the peer process ID. From the [documentation](https://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#gaeebeadcafa87e2d30eed4296f26fb73c):
> Returns TRUE if the pid is filled in. Always returns FALSE prior to authenticating the connection.
Although I believe `dbus-daemon` is configured to require authentication, and indeed I can view the authentication handshake when running `strace` on the `dbus-daemon` process and the client, this function always returns `FALSE`.
Here is a short Python program I put together to validate:
```python
import logging
import dbus.mainloop.glib
import dbus.service
from gi.repository import GLib
log = logging.getLogger('dbustest')
BUS_NAME = 'org.example.test'
BUS_PATH = '/'
IFACE_NAME = 'org.example.test.TestService'
class TestService(dbus.service.Object):
def __init__(self, bus):
bus_name = dbus.service.BusName(BUS_NAME, bus=bus)
super().__init__(bus_name, '/')
@dbus.service.method(IFACE_NAME, '', connection_keyword='conn')
def do_test(self, conn):
log.info('connection: %r', conn)
log.info('connection authenticated: %s', conn.get_is_authenticated())
log.info('peer process id: %s', conn.get_peer_unix_process_id())
logging.basicConfig(level=logging.DEBUG)
loop = GLib.MainLoop()
bus = dbus.SystemBus(mainloop=dbus.mainloop.glib.DBusGMainLoop())
service = TestService(bus)
loop.run()
```
I call this test method like so:
```sh
dbus-send --system --dest=org.example.test --print-reply / org.example.test.TestService.do_test
```
The server logs these messages:
```
INFO:dbustest:connection: <dbus._dbus.SystemBus (system) at 0x7f24380224f0>
INFO:dbustest:connection authenticated: True
INFO:dbustest:peer process id: None
```
If the connection is authenticated, why am I unable to get the peer's process ID?https://gitlab.freedesktop.org/dbus/dbus/-/issues/341VNC crashed2021-09-14T12:31:45ZHarveyGeGeVNC crashedvnc session run for a few minutes then crashed, found below logs in vnc log:
```
XIO: fatal IO error 11 (resource temporary unavaliable) on X server ":12"^M
after 78 requests (78 known processed) with 0 events remaining.^M
XIO: f...vnc session run for a few minutes then crashed, found below logs in vnc log:
```
XIO: fatal IO error 11 (resource temporary unavaliable) on X server ":12"^M
after 78 requests (78 known processed) with 0 events remaining.^M
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":12"^M
after 197 requests (197 known processed) with 0 events remaining.
```
And found below errors in /var/log/messages:
```
Sep 14 13:58:18 smp20 dbus[119482]: [system] Failed to activate service 'org.freedesktop.UPower': timed out
Sep 14 13:58:18 smp20 journal: Couldn't connect to proxy: 为 org.freedesktop.UPower 调用 StartServiceByName 出错:GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out
Sep 14 13:58:18 smp20 journal: failed to connect to upower: 为 org.freedesktop.UPower 调用 StartServiceByName 出错:GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out
Sep 14 13:58:18 smp20 journal: invalid (NULL) pointer instance
Sep 14 13:58:18 smp20 journal: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Sep 14 13:58:18 smp20 journal: Couldn't connect to proxy: 为 org.freedesktop.UPower 调用 StartServiceByName 出错:GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out
Sep 14 13:58:18 smp20 journal: Couldn't connect to proxy: 为 org.freedesktop.UPower 调用 StartServiceByName 出错:GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out
Sep 14 13:58:18 smp20 org.gnome.Shell.desktop: Window manager error: Unable to open X display :1
Sep 14 13:58:18 smp20 journal: up_client_get_lid_is_present: assertion 'UP_IS_CLIENT (client)' failed
Sep 14 13:58:18 smp20 dbus[119482]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service'
Sep 14 13:58:18 smp20 dbus[119482]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Sep 14 13:58:18 smp20 org.gnome.SettingsDaemon.Power.desktop: Failed to start: 为 org.freedesktop.login1 调用 StartServiceByName 出错:GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.login1': timed out
Sep 14 13:58:18 smp20 kernel: upowerd[299056]: segfault at 8 ip 0000565358f55328 sp 00007ffdada65fd0 error 4 in upowerd[565358f34000+39000]
Sep 14 13:58:18 smp20 journal: g_dbus_proxy_get_connection: assertion 'G_IS_DBUS_PROXY (proxy)' failed
Sep 14 13:58:18 smp20 journal: g_dbus_connection_signal_subscribe: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Sep 14 13:58:18 smp20 journal: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
Sep 14 13:58:18 smp20 systemd: upower.service: main process exited, code=killed, status=11/SEGV
Sep 14 13:58:18 smp20 systemd: Failed to start Daemon for power management.
Sep 14 13:58:18 smp20 systemd: Unit upower.service entered failed state.
Sep 14 13:58:18 smp20 systemd: upower.service failed.
Sep 14 13:58:18 smp20 systemd: upower.service holdoff time over, scheduling restart.
Sep 14 13:58:18 smp20 systemd: Stopped Daemon for power management.
Sep 14 13:58:18 smp20 systemd: Starting Daemon for power management...
Sep 14 13:58:18 smp20 dbus[119482]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
```
Could someone help to check what's wrong?
My system version:
```
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core
```
Thanks
Harveyhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/342dbus: wpa_dbus_property_changed: no property SessionLength in object2021-09-15T11:07:30ZPranav Bhattaraidbus: wpa_dbus_property_changed: no property SessionLength in objectEvery time I power on Fedora 34, I got outside and comes back in, log in and I see Gnome logs filled with dbus statement:
![image](/uploads/774fa453dc1848f544970d04a50ea814/image.png)
And if the more you suspend, the more this log is g...Every time I power on Fedora 34, I got outside and comes back in, log in and I see Gnome logs filled with dbus statement:
![image](/uploads/774fa453dc1848f544970d04a50ea814/image.png)
And if the more you suspend, the more this log is going to show up, reproduce itself again and again because distros turn off the wifi to save the power and turn it on when the user comes back it. Dbus will start to goes nuts again. This is what I think happens but I could be wrong. Let me know if you need more logs or information.
- Very reporducable.
- dbus-1.12.20-3.fc34.x86_64
```
pranav@fedora ~ [127]> journalctl -b --unit=wpa_supplicant
-- Journal begins at Mon 2021-08-02 14:44:55 +0545, ends at Wed 2021-09-15 16:00:35 +0545. --
Sep 15 09:37:39 fedora systemd[1]: Starting WPA supplicant...
Sep 15 09:37:39 fedora systemd[1]: Started WPA supplicant.
Sep 15 09:37:39 fedora wpa_supplicant[911]: Successfully initialized wpa_supplicant
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 09:37:43 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-45 noise=9999 txrate=1000
Sep 15 11:16:25 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:16:32 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:16:34 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:16:37 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:16:38 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=4 locally_generated=1
Sep 15 11:16:38 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:16:38 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:16:38 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=4 locally_generated=1
Sep 15 11:16:40 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:16:40 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=4 locally_generated=1
Sep 15 11:16:42 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:16:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=4 locally_generated=1
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="WiFi Name_wlink" auth_failures=1 duration=>
Sep 15 11:16:45 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:16:45 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:16:54 fedora wpa_supplicant[911]: wlp3s0: Reject scan trigger since one is already pending
Sep 15 11:16:54 fedora wpa_supplicant[911]: wlp3s0: Reject scan trigger since one is already pending
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 11:16:58 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-46 noise=9999 txrate=72200
Sep 15 11:17:03 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=4 locally_generated=1
Sep 15 11:17:03 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:17:03 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:17:03 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 11:17:05 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-55 noise=9999 txrate=72200
Sep 15 11:17:10 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:17:13 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-47 noise=9999 txrate=72200
Sep 15 11:17:21 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:17:36 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:17:37 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:17:41 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-BEACON-LOSS
Sep 15 11:34:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=3 locally_generated=1
Sep 15 11:34:42 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 11:34:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 11:34:42 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 11:34:42 fedora wpa_supplicant[911]: nl80211: deinit ifname=p2p-dev-wlp3s0 disabled_11b_rates=0
Sep 15 11:34:42 fedora wpa_supplicant[911]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 12:28:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-50 noise=9999 txrate=72200
Sep 15 12:28:56 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-44 noise=9999 txrate=72200
Sep 15 12:48:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=3 locally_generated=1
Sep 15 12:48:52 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 12:48:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 12:48:52 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 12:48:52 fedora wpa_supplicant[911]: nl80211: deinit ifname=p2p-dev-wlp3s0 disabled_11b_rates=0
Sep 15 12:48:52 fedora wpa_supplicant[911]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 12:50:53 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-43 noise=9999 txrate=72200
Sep 15 15:16:57 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=e8:d0:b9:ac:10:d9 reason=3 locally_generated=1
Sep 15 15:16:57 fedora wpa_supplicant[911]: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1>
Sep 15 15:16:57 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 15 15:16:57 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=NP
Sep 15 15:16:57 fedora wpa_supplicant[911]: nl80211: deinit ifname=p2p-dev-wlp3s0 disabled_11b_rates=0
Sep 15 15:16:57 fedora wpa_supplicant[911]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: SME: Trying to authenticate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=246>
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: Trying to associate with e8:d0:b9:ac:10:d9 (SSID='WiFi Name_wlink' freq=2462 MHz)
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: Associated with e8:d0:b9:ac:10:d9
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: WPA: Key negotiation completed with e8:d0:b9:ac:10:d9 [PTK=CCMP GTK=TKIP]
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-CONNECTED - Connection to e8:d0:b9:ac:10:d9 completed [id=0 id_str=]
Sep 15 15:22:06 fedora wpa_supplicant[911]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-46 noise=9999 txrate=72200
pranav@fedora ~>
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/343Crash on reload if a connection has unknown user/group2023-08-21T13:49:33ZFabian VogtCrash on reload if a connection has unknown user/groupThis affects the system bus (mostly).
To reproduce:
1. Have a policy with group rules (provided by e.g. avahi)
2. Create a user account
3. As that user, create a connection to the system bus
4. Delete the user account forcibly, without ...This affects the system bus (mostly).
To reproduce:
1. Have a policy with group rules (provided by e.g. avahi)
2. Create a user account
3. As that user, create a connection to the system bus
4. Delete the user account forcibly, without killing the process.
`ps` then shows the plain uid instead of `testuser`.
5. Trigger a reload (`dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig`)
6. Trigger another reload
As script:
```
useradd -m testuser
su testuser -c "dbus-monitor --system" &
userdel -f testuser
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
```
The result is a crash due to a nullptr deref:
```
bus_client_policy_unref
bus_connections_reload_policy
process_config_every_time
...
```
(With asserts enabled it would abort instead)
In many places, dbus assumes that every connection has a non-null policy,
but this can happen in `bus_connections_reload_policy`, which logs a message
in that case and returns an error. At that point the connection is in an invalid
state already though and the next `bus_connections_reload_policy` crashes due to
the null policy.
Found by openQA: https://openqa.opensuse.org/tests/1931448#step/wine/14
A previous step of that test creates various user accounts for testing
the display manager and deletes them again. The "dangling" process is caused
by geoclue2's agent in `/etc/xdg/autostart`.https://gitlab.freedesktop.org/dbus/dbus/-/issues/344Unauthorized access2021-09-29T10:11:33ZПавел РадуUnauthorized accessUndeclared function:
"The DBUS-Launch app is trying to access your Google Chrome browser credentials"
![Защита_паролей](/uploads/7b4806d1a4440ab1cc69dc92c1738242/Защита_паролей.PNG)
```
$ dbus-launch.exe --version
D-Bus Message Bus Lau...Undeclared function:
"The DBUS-Launch app is trying to access your Google Chrome browser credentials"
![Защита_паролей](/uploads/7b4806d1a4440ab1cc69dc92c1738242/Защита_паролей.PNG)
```
$ dbus-launch.exe --version
D-Bus Message Bus Launcher 1.10.22
Copyright (C) 2003 Red Hat, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/345Cross compiling Qt6.2 with dbus/autotools build fails with undefined IMPORTED...2021-11-18T15:52:49ZRalf HabackerCross compiling Qt6.2 with dbus/autotools build fails with undefined IMPORTED_IMPLIB target propertyQt6 has been switched to the cmake build system and compiling a mingw build with the dbus 1.12.20 development package generated by the autotools build system fails with the following error.
```
[ 31s] CMake Error in CMakeLists.txt:
[ ...Qt6 has been switched to the cmake build system and compiling a mingw build with the dbus 1.12.20 development package generated by the autotools build system fails with the following error.
```
[ 31s] CMake Error in CMakeLists.txt:
[ 31s] IMPORTED_IMPLIB not set for imported target "dbus-1" configuration
[ 31s] "RelWithDebInfo".
[ 31s]
```
[_log.txt](/uploads/4ad0651799753b053c93dd247560ccba/_log.txt)https://gitlab.freedesktop.org/dbus/dbus/-/issues/346Cross compiling Qt6.2 with dbus/cmake build fails with 'Imported target "dbus...2021-11-18T15:12:14ZRalf HabackerCross compiling Qt6.2 with dbus/cmake build fails with 'Imported target "dbus-1" includes non-existent path'Qt6 has been switched to the cmake build system and compiling a mingw build with the dbus 1.13.18 development package generated by the cmake build system fails with the following error:
```
[ 34s] CMake Error in src/dbus/CMakeLists.txt...Qt6 has been switched to the cmake build system and compiling a mingw build with the dbus 1.13.18 development package generated by the cmake build system fails with the following error:
```
[ 34s] CMake Error in src/dbus/CMakeLists.txt:
[ 34s] Imported target "dbus-1" includes non-existent path
[ 34s]
[ 34s] "/usr/i686-w64-mingw32/sys-root/mingw//usr/i686-w64-mingw32/sys-root/mingw/lib/dbus-1.0/include"
[ 34s]
[ 34s] in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
[ 34s]
[ 34s] * The path was deleted, renamed, or moved to another location.
[ 34s]
[ 34s] * An install or uninstall procedure did not complete successfully.
[ 34s]
[ 34s] * The installation package was faulty and references files it does not
[ 34s] provide.
[ 34s]
[ 34s]
[ 34s]
```
[_log.txt](/uploads/6fca9ce70df4710743e55fac9dfed63d/_log.txt)
The reason for this is that on https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/DBus1Config.cmake.in#L29 two possibly absolute paths are linked.
It is recommended to leave the creation of the resulting paths to cmake. This can be realized with the `target_include_directories` command and the use of the `INSTALL_INTERFACE` as shown below
```
target_include_directories(dbus-1
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/dbus-1.0>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/dbus-1.0/include>
)
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/347Wrong return type of GetConnectionCredentionals in DBus specification2021-11-09T12:46:04ZRalf HabackerWrong return type of GetConnectionCredentionals in DBus specificationAt https://dbus.freedesktop.org/doc/dbus-specification.html is documented
```
org.freedesktop.DBus.GetConnectionCredentials
as a method:
DICT<STRING,VARIANT> GetConnectionCredentials (in STRING bus_name).
```
The introspe...At https://dbus.freedesktop.org/doc/dbus-specification.html is documented
```
org.freedesktop.DBus.GetConnectionCredentials
as a method:
DICT<STRING,VARIANT> GetConnectionCredentials (in STRING bus_name).
```
The introspection data for this method contains
```
<method name="GetConnectionCredentials">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
```
which defines it as an array of dict, which should make the correct documentation read:
```
org.freedesktop.DBus.GetConnectionCredentials
As a method:
ARRAY of DICT<STRING,VARIANT> GetConnectionCredentials (in STRING bus_name).
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/3501.14 release2022-02-28T20:39:35ZMarkus Teich1.14 releaseAre there plans or an ETA for the 1.14 release yet?Are there plans or an ETA for the 1.14 release yet?https://gitlab.freedesktop.org/dbus/dbus/-/issues/352Clarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free()2021-11-24T07:08:31ZSimon McVittieClarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free()The following discussion from !195 should be addressed:
- [x] @smcv started a [discussion](https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/195#note_1167180):
> Perhaps
>
> ```suggestion:-0+0
> * @return TRU...The following discussion from !195 should be addressed:
- [x] @smcv started a [discussion](https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/195#note_1167180):
> Perhaps
>
> ```suggestion:-0+0
> * @return TRUE the event has been deleted successfully or the handle is one of the special sentinel values #NULL or #INVALID_HANDLE
> ```
>
> but I think that doesn't need to block this.https://gitlab.freedesktop.org/dbus/dbus/-/issues/353x86_64-w64-mingw32-cmake-debug CI sometimes fails with 'Library libexpat-1.dl...2021-12-01T12:17:24ZRalf Habackerx86_64-w64-mingw32-cmake-debug CI sometimes fails with 'Library libexpat-1.dll (..) not found'https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/16153796
> 29: 002b:err:module:import_dll Library libexpat-1.dll (which is needed by L"z:\\builds\\rhabacker\\dbus\\ci-build-debug-x86_64-w64-mingw32\\bin\\dbus-daemon.exe") not foundhttps://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/16153796
> 29: 002b:err:module:import_dll Library libexpat-1.dll (which is needed by L"z:\\builds\\rhabacker\\dbus\\ci-build-debug-x86_64-w64-mingw32\\bin\\dbus-daemon.exe") not foundhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/354If dbus-daemon fails to start up, Windows dbus-run-session does not detect it2021-11-25T15:55:43ZSimon McVittieIf dbus-daemon fails to start up, Windows dbus-run-session does not detect it## Steps to reproduce
Seen in for example https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/16153796 due to #353. Could be replicated by altering the dbus-daemon to `exit(1)` during startup (before the `--ready-event-handle` is signa...## Steps to reproduce
Seen in for example https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/16153796 due to #353. Could be replicated by altering the dbus-daemon to `exit(1)` during startup (before the `--ready-event-handle` is signalled), or by replacing it with an older dbus-daemon that does not implement the `--ready-event-handle` option.
## Expected result
If the dbus-daemon fails before the `--ready-event-handle` is signalled, then `dbus-run-session` should detect that, and exit unsuccessfully.
## Actual result
`dbus-run-session` does not exit until the 30 second timeout for `_dbus_win_event_wait()` has elapsed.https://gitlab.freedesktop.org/dbus/dbus/-/issues/355build error: cast between incompatible function types from 'FARPROC'2021-11-30T09:31:50ZRalf Habackerbuild error: cast between incompatible function types from 'FARPROC'While trying to reproduce the issue reported at #353 with a local docker build with autotools, it fails with
```
../../dbus/dbus-sysdeps-win.c: In function 'load_ex_ip_helper_procedures':
../../dbus/dbus-sysdeps-win.c:129:43: error: cast...While trying to reproduce the issue reported at #353 with a local docker build with autotools, it fails with
```
../../dbus/dbus-sysdeps-win.c: In function 'load_ex_ip_helper_procedures':
../../dbus/dbus-sysdeps-win.c:129:43: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'DWORD (*)(struct _MIB_TCPTABLE_OWNER_PID **, BOOL, void *, DWORD, DWORD)' {aka 'long unsigned int (*)(struct _MIB_TCPTABLE_OWNER_PID **, int, void *, long unsigned int, long unsigned int)'} [-Werror=cast-function-type]
lpfnAllocateAndGetTcpExTableFromStack = (ProcAllocateAndGetTcpExtTableFromStack)GetProcAddress (hModule, "AllocateAndGetTcpExTableFromStack");
^
```
I wonder why this does not occur on gitlab CI, since it uses the same docker image and packages.
The build steps performed, which are the same as those performed on Gitlab CI, are:
```
sudo docker pull debian:buster-slim
sudo docker run -v $PWD:/mnt -it debian:buster-slim /bin/bash
cd mnt
ci_buildsys=autotools ci_distro=debian ci_docker= ci_in_docker=yes ci_host=x86_64-w64-mingw32 ci_local_packages=yes ci_suite=buster ci_variant=debug ./tools/ci-install.sh
ci_buildsys=autotools ci_distro=debian ci_docker= ci_host=x86_64-w64-mingw32 ci_local_packages=yes ci_parallel=2 ci_suite=buster ci_test=yes ci_test_fatal=yes ci_variant=debug ci_runtime=static ./tools/ci-build.sh
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/356When building with the CMake build system, a compiler warning configuration d...2021-12-10T14:16:40ZRalf HabackerWhen building with the CMake build system, a compiler warning configuration different from autotools is usedThis leads to hidden problems, such as those reported at https://gitlab.freedesktop.org/dbus/dbus/-/issues/355, and should be corrected.This leads to hidden problems, such as those reported at https://gitlab.freedesktop.org/dbus/dbus/-/issues/355, and should be corrected.https://gitlab.freedesktop.org/dbus/dbus/-/issues/357test-spawn-oom fails on Windows with memory checking enabled2021-12-06T13:02:32ZRalf Habackertest-spawn-oom fails on Windows with memory checking enabledRunning test-spawn-oom with memory checking enabled on Windows fails with the following errors:
```
dbus[32]: error: Not expecting error when launching segfaulting executable: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to spawn ...Running test-spawn-oom with memory checking enabled on Windows fails with the following errors:
```
dbus[32]: error: Not expecting error when launching segfaulting executable: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to spawn child
```
How to reproduce
----------------
In dbus/dbus-memory.c change the mentioned location below, then compile and run test-spawn-oom
```
dbus_bool_t
_dbus_decrement_fail_alloc_counter (void)
{
_dbus_initialize_malloc_debug ();
-#ifdef DBUS_WIN
+#ifdef _DBUS_WIN
```
Additional information
----------------------
With !223 the new error name has been introduced and needs to be added to this test as expected error.https://gitlab.freedesktop.org/dbus/dbus/-/issues/359test-dbus-daemon fails on CI with x86_64-w64-mingw32 builds2021-12-07T13:07:31ZRalf Habackertest-dbus-daemon fails on CI with x86_64-w64-mingw32 buildshttps://gitlab.freedesktop.org/dbus/dbus/-/jobs/16445975 show the following error:
```
14: # max perf: 10000 messages / 67.441041 seconds
14: # Time since timeout reset 000000000072eec0: 67.705 seconds
14: Bail out! Test timed out (GLib ...https://gitlab.freedesktop.org/dbus/dbus/-/jobs/16445975 show the following error:
```
14: # max perf: 10000 messages / 67.441041 seconds
14: # Time since timeout reset 000000000072eec0: 67.705 seconds
14: Bail out! Test timed out (GLib main loop timeout callback reached)
14/34 Test #14: test-dbus-daemon .................***Failed 81.88 sec
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/360activation-service-reload in test-bus still fails with memory leaks on Windows2021-12-10T07:56:58ZRalf Habackeractivation-service-reload in test-bus still fails with memory leaks on WindowsRunning test-bus from a gcc cmake build for Windows from recent master with
```
set DBUS_TEST_TIMEOUT_MULTIPLIER=2
ctest -R test-bus$ --output-on-failure --timeout 180
```
fails on a local machine with the following error:
```
9: ok 8...Running test-bus from a gcc cmake build for Windows from recent master with
```
set DBUS_TEST_TIMEOUT_MULTIPLIER=2
ctest -R test-bus$ --output-on-failure --timeout 180
```
fails on a local machine with the following error:
```
9: ok 8 - activation-service-reload
9: # activation-service-reload test took 3 seconds
9: not ok 9 - activation-service-reload leaked 18 blocks
9: # Running test: unix-fds-passing
9: ok 10 # SKIP fd-passing not supported on this platform
9: ok 11 - unix-fds-passing
9: # unix-fds-passing test took 0 seconds
9: not ok 12 - unix-fds-passing leaked 18 blocks
9: # 2/12 tests failed
9: 1..12
1/1 Test #9: test-bus .........................***Failed 8.09 sec
```
The error happens regardless if running on a native host or with the help of wine.
The whole log file generated by this test has been appended [error.log](/uploads/0d25ec2ff46ee472664e93bad70ebd19/error.log)https://gitlab.freedesktop.org/dbus/dbus/-/issues/361Running test-bus on Linux fails with 'dbus-daemon - Cannot initialize inotify'2022-09-08T17:55:49ZRalf HabackerRunning test-bus on Linux fails with 'dbus-daemon - Cannot initialize inotify'To see if the problem reported at https://gitlab.freedesktop.org/dbus/dbus/-/issues/360 was related to the cmake build system, the same test was compiled and run on Linux (openSUSE 15.2, gcc 7.5)
```
mkdir ~/src
cd ~/src
git clone https:...To see if the problem reported at https://gitlab.freedesktop.org/dbus/dbus/-/issues/360 was related to the cmake build system, the same test was compiled and run on Linux (openSUSE 15.2, gcc 7.5)
```
mkdir ~/src
cd ~/src
git clone https://gitlab.freedesktop.org/dbus/dbus.git
mkdir build-cmake
cd build-cmake
cmake ../dbus
make
ctest -R test-bus$ -VV
```
The following error occurred:
```
9: ok 6 - signals
9: # signals test took 1 seconds
9: ok 7 - signals did not leak memory
9: # Running test: activation-service-reload
9: dbus-daemon[28279]: Cannot initialize inotify
9: /home/xxx/src/dbus-cmake-build/lib/libdbus-1.so.3(_dbus_print_backtrace+0x1f) [0x7f0da73252cf]
9: /home/xxx/src/dbus-cmake-build/lib/libdbus-1.so.3(_dbus_abort+0xd) [0x7f0da731e2c9]
9: /home/xxx/src/dbus-cmake-build/lib/libdbus-1.so.3(_dbus_warn+0xf2) [0x7f0da730c292]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus() [0x441fcf]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(bus_set_watched_dirs+0x1c) [0x442100]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus() [0x416976]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(bus_context_new+0x7b6) [0x41713f]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(bus_context_new_test+0x107) [0x441886]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus() [0x415235]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(bus_activation_service_reload_test+0xdd) [0x41551d]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(_dbus_test_main+0x252) [0x443155]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(main+0x3c) [0x41050a]
9: /lib64/libc.so.6(__libc_start_main+0xea) [0x7f0da685534a]
9: /home/xxx/src/dbus-cmake-build/bin/test-bus(_start+0x2a) [0x4103fa]
```
[error.log](/uploads/ecf91023840e2edd8a6205b989d6e512/error.log)
In the case of a temporary problem caused by too many open files, the message can be reproduced by a previous call to `sudo sh -c "echo 0 > /proc/sys/fs/inotify/max_user_instances"`, but this returns `-1` as the return value of `inotify_initx()` rather than the `0` value under discussion.
A different approach to reproduce is to run:
```
$ gdb --args bin/test-bus test/data
(gdb) b dir-watch-inotify.c:225
r
Breakpoint 1, _init_inotify (context=0x6824c0) at /home/ralf.habacker/src/dbus/bus/dir-watch-inotify.c:225
225 if (inotify_fd == -1)
(gdb) call (int)close(0)
$1 = 0
(gdb) c
dbus-daemon[9502]: Cannot initialize inotify
Breakpoint 1, _init_inotify (context=0x683880) at /home/ralf.habacker/src/dbus/bus/dir-watch-inotify.c:225
225 if (inotify_fd == -1)
(gdb) p inotify_fd
$3 = 0
```
The same behavior can be reproduced with `dbus-daemon`.
The problem with the message ` dbus-daemon[11508]: Cannot initialize inotify: Too many open files` also occurred after a package update of the Linux system (openSUSE Leap) that required a reboot, but the reboot had not yet been performed.https://gitlab.freedesktop.org/dbus/dbus/-/issues/362Test applications do not display invalid test selection2021-12-10T12:46:13ZRalf HabackerTest applications do not display invalid test selectionOn https://gitlab.freedesktop.org/dbus/dbus/-/issues/360#note_1183092 you can see that an invalid name was used for a specific test, but the test application did not complain about this, which can lead to unexpected test results and shou...On https://gitlab.freedesktop.org/dbus/dbus/-/issues/360#note_1183092 you can see that an invalid name was used for a specific test, but the test application did not complain about this, which can lead to unexpected test results and should be corrected.https://gitlab.freedesktop.org/dbus/dbus/-/issues/363Confusing output of the number of tests performed2021-12-16T08:01:54ZRalf HabackerConfusing output of the number of tests performedWhen selecting a single test in the dbus test programs, the complete number of tests is still output which is confusing.
How to reproduce
----------------
1. build dbus
2. enter build dir
3. run `test-bus test/data signals`
The output ...When selecting a single test in the dbus test programs, the complete number of tests is still output which is confusing.
How to reproduce
----------------
1. build dbus
2. enter build dir
3. run `test-bus test/data signals`
The output is
```
# Test data in test/data
ok 2 # SKIP expire-list - Only intending to run signals
ok 3 # SKIP config-parser - Only intending to run signals
# Running test: signals
ok 4 - signals
# signals test took 1 seconds
ok 5 - signals did not leak memory
ok 6 # SKIP activation-service-reload - Only intending to run signals
ok 7 # SKIP unix-fds-passing - Only intending to run signals
# 7 tests passed
1..7
```
In particular, the message `# 7 tests passed` is not really true. I think it should read
```
# Test data in test/data
ok 1 - initial nss query did not leak memory
# Running test: signals
ok 2 - signals
# signals test took 1 seconds
ok 3 - signals did not leak memory
# 3 tests passed
1..3
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/365memory leaks in _dbus_get_install_root_as_hash in case of OOM condition2021-12-17T08:03:48ZRalf Habackermemory leaks in _dbus_get_install_root_as_hash in case of OOM conditionThe mentioned [function](https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-sysdeps-win.c#L2938) contains memory leaks as shown below:
```c
static dbus_bool_t
_dbus_get_install_root_as_hash(DBusString *out)
{
DBusStrin...The mentioned [function](https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-sysdeps-win.c#L2938) contains memory leaks as shown below:
```c
static dbus_bool_t
_dbus_get_install_root_as_hash(DBusString *out)
{
DBusString install_path;
_dbus_string_init(&install_path);
```
-> no oom check here
```
if (!_dbus_get_install_root (&install_path) ||
_dbus_string_get_length (&install_path) == 0)
return FALSE;
```
-> `install_path` is not free'd in case of errors.
```
_dbus_string_init(out);
```
-> no oom check here
```
_dbus_string_tolower_ascii(&install_path,0,_dbus_string_get_length(&install_path));
if (!_dbus_sha_compute (&install_path, out))
return FALSE;
```
-> `install_path` and `out` are not free'd in case of errors.https://gitlab.freedesktop.org/dbus/dbus/-/issues/366Incorrect output from test-bus-dispatch --list-tests2021-12-15T18:24:11ZRalf HabackerIncorrect output from test-bus-dispatch --list-testsRunning the mentioned test case compiled from recent master gives the following partial incorrect output:
```
bin/test-bus-dispatch --list-tests
dispatch
org.freedesktop.DBus
<signal name="NameOwnerChanged">
<arg type="s"/>
...Running the mentioned test case compiled from recent master gives the following partial incorrect output:
```
bin/test-bus-dispatch --list-tests
dispatch
org.freedesktop.DBus
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
@
E
�
E
Speicherzugriffsfehler (Speicherabzug geschrieben)
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/368Invalid uses of _dbus_global_lock() in windows related code2022-05-17T23:24:29ZRalf HabackerInvalid uses of _dbus_global_lock() in windows related codeIn the Windows-related dbus source code, there are several calls to _dbus_global_lock() in the form
```
mutex = _dbus_global_lock (cDBusAutolaunchMutex);
...
_dbus_global_unlock (&mutex);
```
which will fail due to the implementat...In the Windows-related dbus source code, there are several calls to _dbus_global_lock() in the form
```
mutex = _dbus_global_lock (cDBusAutolaunchMutex);
...
_dbus_global_unlock (&mutex);
```
which will fail due to the implementation of the listed function if access to the returned mutex fails.https://gitlab.freedesktop.org/dbus/dbus/-/issues/369Windows implementation of _dbus_platform_rmutex_lock() does not match the exp...2022-05-05T14:20:41ZRalf HabackerWindows implementation of _dbus_platform_rmutex_lock() does not match the expectations of the client codeThe unix variant of _dbus_platform_rmutex_lock() is implemented as
```
void
_dbus_platform_rmutex_lock (DBusRMutex *mutex)
{
PTHREAD_CHECK ("pthread_mutex_lock", pthread_mutex_lock (&mutex->lock));
}
```
It asserts in any error case a...The unix variant of _dbus_platform_rmutex_lock() is implemented as
```
void
_dbus_platform_rmutex_lock (DBusRMutex *mutex)
{
PTHREAD_CHECK ("pthread_mutex_lock", pthread_mutex_lock (&mutex->lock));
}
```
It asserts in any error case and let client code simple use
```
_dbus_platform_rmutex_lock (mutex)
/* protected access */
_dbus_platform_rmutex_unlock (mutex)
```
This behavior is not not implemented in the Windows code:
```
void
_dbus_platform_rmutex_lock (DBusRMutex *mutex)
{
WaitForSingleObject ((HANDLE *) mutex, INFINITE);
}
```
which can lead to threading problems, such as those reported at https://gitlab.freedesktop.org/dbus/dbus/-/issues/368.https://gitlab.freedesktop.org/dbus/dbus/-/issues/370Multiple implementation of thread locks in Windows code2022-05-17T23:24:29ZRalf HabackerMultiple implementation of thread locks in Windows code
In the dbus Windows code there is
```
_dbus_win_startup_winsock (void)
{
...
if (!_DBUS_LOCK (sysdeps))
return FALSE;
...
```
and for example
```c
dbus_bool_t
_dbus_daemon_is_session_bus_address_published()
...
lock = _dbus_glob...
In the dbus Windows code there is
```
_dbus_win_startup_winsock (void)
{
...
if (!_DBUS_LOCK (sysdeps))
return FALSE;
...
```
and for example
```c
dbus_bool_t
_dbus_daemon_is_session_bus_address_published()
...
lock = _dbus_global_lock (...);
...
```
Looking at the two implementations, it turned out that DBUS_LOCK() uses _dbus_lock(), which is based on _dbus_platform_rmutex_lock(), which uses WaitForSingleObject(). _dbus_global_lock() also uses WaitForSingleObject().
The main differences are that _dbus_global_lock() creates a named mutex for sharing the mutex between processes, uses a different return type and evaluates the results of WaitForSingleObject somehow.
I propose to integrate _dbus_global_lock()/_dbus_global_unlock() into the current _dbus_platform_rmutex_xxx functions, adjust the implementation (including #369), create a new function for generating the named mutex e.g. `_dbus_platform_rmutex_named_new (const char* name)` as:
```
DBusRMutex *
_dbus_platform_rmutex_named_new (const char* name)
{
HANDLE handle;
handle = CreateMutex (NULL, FALSE, name);
return (DBusRMutex *) handle;
}
```
and use that (and related) functions in the autolaunch related Windows code, to reduce this code duplication and future maintenance overhead.https://gitlab.freedesktop.org/dbus/dbus/-/issues/372Segfault in `_dbus_marshal_write_basic`2022-03-10T11:53:29ZPaul MenzelSegfault in `_dbus_marshal_write_basic`Using Debian sid/unstable with Linux 5.16-rc8 from the suite *experimental*, *bluez* 5.62-2 and *libdbus-1-3* 1.12.20-3, connecting to a Google Nest over Bluetooth, bluetoothd crashed with a segmentation fault:
[ 7793.540822] blueto...Using Debian sid/unstable with Linux 5.16-rc8 from the suite *experimental*, *bluez* 5.62-2 and *libdbus-1-3* 1.12.20-3, connecting to a Google Nest over Bluetooth, bluetoothd crashed with a segmentation fault:
[ 7793.540822] bluetoothd[7937]: segfault at 3 ip 00007f73196e3d28 sp 00007fffbd269280 error 4 in libdbus-1.so.3.19.13[7f73196be000+2f000]
[ 7793.540835] Code: 08 4c 89 e9 44 89 e2 53 41 b9 6c 00 00 00 41 89 c0 48 89 ee bf 01 00 00 00 e8 e4 f9 ff ff 5a 59 e9 9f fe ff ff 0f 1f 44 00 00 <0f> b6 16 44 89 e6 e8 fd be fd ff 85 c0 0f 84 87 fe ff ff b8 01 00
```
(gdb) bt
#0 _dbus_marshal_write_basic (str=0x55992b2dc560, insert_at=213, type=type@entry=121, value=value@entry=0x3, byte_order=108, pos_after=pos_after@entry=0x7fffbd2693e0) at ../../../dbus/dbus-marshal-basic.c:814
#1 0x00007f73196cef9b in _dbus_type_writer_write_basic_no_typecode (value=0x3, type=121, writer=0x7fffbd2693c0) at ../../../dbus/dbus-marshal-recursive.c:1605
#2 _dbus_type_writer_write_basic_no_typecode (value=0x3, type=121, writer=0x7fffbd2693c0) at ../../../dbus/dbus-marshal-recursive.c:1600
#3 _dbus_type_writer_write_basic (writer=writer@entry=0x7fffbd2693c0, type=type@entry=121, value=value@entry=0x3) at ../../../dbus/dbus-marshal-recursive.c:2327
#4 0x00007f73196d36b8 in dbus_message_iter_append_basic (iter=iter@entry=0x7fffbd2693b0, type=type@entry=121, value=0x3) at ../../../dbus/dbus-message.c:2843
#5 0x0000559929aba78e in get_codec (property=<optimized out>, iter=0x7fffbd2693b0, data=<optimized out>) at profiles/audio/a2dp.c:1970
#6 0x0000559929b54f86 in append_property (iface=iface@entry=0x55992b2fbdd0, p=p@entry=0x559929bd6830 <sep_properties+48>, dict=dict@entry=0x7fffbd269430) at gdbus/object.c:498
#7 0x0000559929b55632 in append_properties (data=data@entry=0x55992b2fbdd0, iter=iter@entry=0x7fffbd2694b0) at gdbus/object.c:527
#8 0x0000559929b556bf in append_interface (data=0x55992b2fbdd0, user_data=0x7fffbd269590) at gdbus/object.c:542
#9 0x00007f7319778938 in g_slist_foreach (list=<optimized out>, func=func@entry=0x559929b55670 <append_interface>, user_data=user_data@entry=0x7fffbd269590) at ../../../glib/gslist.c:885
#10 0x0000559929b557c9 in emit_interfaces_added (data=0x55992b31f310) at gdbus/object.c:574
#11 process_changes (user_data=0x55992b31f310) at gdbus/object.c:996
#12 0x0000559929b56fb7 in g_dbus_flush (connection=0x55992b2d57d0) at gdbus/object.c:1494
#13 g_dbus_send_message (message=0x55992b2fbe10, connection=0x55992b2d57d0) at gdbus/object.c:1518
#14 g_dbus_send_message (connection=0x55992b2d57d0, message=0x55992b2fbe10) at gdbus/object.c:1498
#15 0x0000559929b39d87 in device_profile_connected (err=-5, profile=0x559929be0440 <a2dp_source_profile>, dev=0x55992b301360) at src/device.c:1802
#16 service_state_changed (service=<optimized out>, old_state=<optimized out>, new_state=<optimized out>, user_data=<optimized out>) at src/device.c:7002
#17 0x0000559929b2d072 in change_state (service=0x55992b306bd0, state=BTD_SERVICE_STATE_DISCONNECTED, err=<optimized out>) at src/service.c:98
#18 0x0000559929ab91ef in discovery_complete (session=<optimized out>, seps=<optimized out>, err=-5, user_data=0x55992b305b70) at profiles/audio/source.c:237
#19 0x0000559929abdd87 in finalize_discover (s=0x55992b301250) at profiles/audio/a2dp.c:403
#20 discover_cb (session=<optimized out>, seps=<optimized out>, err=<optimized out>, user_data=0x55992b301250) at profiles/audio/a2dp.c:2842
#21 0x0000559929ac0ba7 in finalize_discovery (session=0x55992b311700, err=0) at profiles/audio/avdtp.c:1087
#22 0x0000559929ac63e0 in avdtp_parse_resp (transaction=<optimized out>, size=16, buf=0x55992b311773, signal_id=<optimized out>, stream=0x0, session=0x55992b311700) at profiles/audio/avdtp.c:2957
#23 session_cb (data=0x55992b311700, cond=<optimized out>, chan=<optimized out>) at profiles/audio/avdtp.c:2284
#24 session_cb (chan=<optimized out>, cond=<optimized out>, data=0x55992b311700) at profiles/audio/avdtp.c:2208
#25 0x00007f7319758be4 in g_main_dispatch (context=0x55992b2d05b0) at ../../../glib/gmain.c:3381
#26 g_main_context_dispatch (context=0x55992b2d05b0) at ../../../glib/gmain.c:4099
#27 0x00007f7319758f88 in g_main_context_iterate (context=0x55992b2d05b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4175
#28 0x00007f7319759273 in g_main_loop_run (loop=0x55992b2d1790) at ../../../glib/gmain.c:4373
#29 0x0000559929b6ccd5 in mainloop_run () at src/shared/mainloop-glib.c:66
#30 0x0000559929b6d12c in mainloop_run_with_signal (func=func@entry=0x559929afe2c0 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-notify.c:188
#31 0x0000559929ab142d in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1210
```
* [Full backtrace of all threads `t a a bt f`](/uploads/d2aa0154bbfae475f1e7f2835c7845aa/bluetoothd-sigsegv-gdb-taabtf.txt)https://gitlab.freedesktop.org/dbus/dbus/-/issues/373dbus-daemon-launch-helper(?) seems to ignore XDG_DATA_DIRS2022-01-10T20:04:54ZFriedrich W. H. Kossebaudbus-daemon-launch-helper(?) seems to ignore XDG_DATA_DIRSI might have missed something, but here my lines of thoughts and actions:
The [D-Bus specs](https://dbus.freedesktop.org/doc/dbus-specification.html) say:
> On Unix systems, the session bus should search for .service files in $XDG_DATA_...I might have missed something, but here my lines of thoughts and actions:
The [D-Bus specs](https://dbus.freedesktop.org/doc/dbus-specification.html) say:
> On Unix systems, the session bus should search for .service files in $XDG_DATA_DIRS/dbus-1/services.
They also define for the `org.freedesktop.DBus` interface the method `org.freedesktop.DBus.UpdateActivationEnvironment`:
> Normally, session bus activated services inherit the environment of the bus daemon. This method adds to or modifies that environment when activating services.
The method `UpdateActivationEnvironment` is e.g. used by the tool dbus-update-activation-environment if I saw correctly. When using that tool, it confirms me that it has set for the D-Bus session instance the respective value of XDG_DATA_DIRS, which contains the respective `.../share` dir which otherwise also works,
Yet when trying to launch the service/application via the D-Bus service file, the error is "The name org.foo.bar was not provided by any .service files".
If instead the D-Bus service file is placed into the default user's `.local/share/` prefix, the service is launched as expected.
I am not exactly sure if dbus-daemon-launch-helper is involved here (openSUSE Tumbleweed), but it is installed, so possibly used (instead of any newer systemd-based launcher I saw mentioned?). I looked into the code of that tool, and by first glimpse it seems to reset any environment variables and only reads existing config files, and thus initializes the config parser also only with the default values for the 'XDG_*' variables and thus ends only checking & listing service files seen in the user's default `.local/share/` for me (not changed those config files from distro defaults). But I might have been biased by expectations while trying to grasp code behaviour in my head :)
So would there be a bug here (and then in that place) or is this expected hebaviour?
If my expectations from reading the docs are flawed and the method `UpdateActivationEnvironment` is not meant to support this purpose, what other kind of activation should it support?
My general goal is to make more applications DBusActivatable, by tagging that in the desktop files. Which also needs a separate D-Bus service file AFAIK. For the development setup I would like to install only to my user's local paths, to not break the system for other users, and ideally not have to maintain further config files. That works fine otherwise, including integration with the shell, thanks to `XDG_*` variables. But for starting via D-Bus service files, I currently hit a wall and need to find a proper widely acceptable door now :)https://gitlab.freedesktop.org/dbus/dbus/-/issues/374writing oom_score_adj error: Permission denied2022-04-01T17:26:23ZKevin Lockekevin@kevinlocke.namewriting oom_score_adj error: Permission deniedOn Debian testing with `dbus-daemon` 1.12.20 (from `dbus-daemon` package version `1.12.20-3`) the system log contains several:
dbus-daemon[1234]: writing oom_score_adj error: Permission denied
The logs indicate that this occurs dur...On Debian testing with `dbus-daemon` 1.12.20 (from `dbus-daemon` package version `1.12.20-3`) the system log contains several:
dbus-daemon[1234]: writing oom_score_adj error: Permission denied
The logs indicate that this occurs during service activation of services in the user session such as `at-spi2-registryd` for `org.a11y.atspi.Registry`, `mako` for `org.freedesktop.Notifications`, `xfconfd` for `org.xfce.Xfconf`, and `tumbler` for `org.freedesktop.thumbnails.Thumbnailer1` on my system.
It appears that `dbus-daemon` is run at `oom_score_adj` 200 for user sessions when started by systemd v250 and later due to https://github.com/systemd/systemd/pull/20893 . Presumably this prevents the activated service from decreasing `oom_score_adj` due to lacking `CAP_SYS_RESOURCE`.
Since [Bug 32851](https://bugs.freedesktop.org/show_bug.cgi?id=32851), which introduced the OOM score adjustment, appears to be aimed at increasing the score adjustment (from -900 to 0), perhaps it would make sense to skip it when `oom_score_adj` is already <= 0?
Thanks,
Kevin1.14.xhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/375cmake build effectively assumes all platforms are little-endian2022-03-03T11:45:09ZArkanoid87cmake build effectively assumes all platforms are little-endianWhile dealing with ModemManager not starting on OpenWrt device running on big-endian processor, I've confirmed that the Hello message ModemManager sends to dbus-deamon is dropped and connection closed.
Diving into the problem, it seems ...While dealing with ModemManager not starting on OpenWrt device running on big-endian processor, I've confirmed that the Hello message ModemManager sends to dbus-deamon is dropped and connection closed.
Diving into the problem, it seems that `dbus-send` generates malformed Hello messages that `dbus-daemon` accepts it anyway, on the other hand correctly generated Hello messages from ModemManager are dropped by same dbus-daemon.
AFAIK, ModemManager uses glib2 to generate dbus messages.
Please find here details and test buffers:
https://github.com/openwrt/packages/issues/17284#issuecomment-1028573047
Please let me know if you prefer to move attachments here.
Thankshttps://gitlab.freedesktop.org/dbus/dbus/-/issues/376There is no way of being notified when an activatable service is installed or...2022-02-16T14:08:48ZRastersoftThere is no way of being notified when an activatable service is installed or removedThere is no way for a program to know if a new activatable service has been added or removed to the system, other than periodic polling using `org.freedesktop.DBus.ListActivatableNames()`. A signal that notifies a change in the list of a...There is no way for a program to know if a new activatable service has been added or removed to the system, other than periodic polling using `org.freedesktop.DBus.ListActivatableNames()`. A signal that notifies a change in the list of available activatable services is needed. `org.freedesktop.DBus.NameOwnerChanged` doesn't fulfill this need because it only notifies when a service is activated (and thus its daemon is running) and starts listening, but not when it becomes installed or uninstalled in the system (for example, if the user installs a package in the system and it contains an activatable service).
My use case is for 'Desktop Icons NG' (https://gitlab.com/rastersoft/desktop-icons-ng) or DING. It relies in FileRoller for compressed files management, using its DBus interface to get the list of recognized compressed formats, to uncompress a compressed file, and to compress several files and folders into a single, compressed file. FileRoller registers itself as an activatable service (`org.gnome.ArchiveManager1`), so the binary itself isn't running until it is needed. As an activatable service, it is the DBus daemon the one who launches the file-roller binary if a call for any of its methods is issued by a client and it isn't running.
If FileRoller isn't installed, trying to access it to get the list of available compressed formats will fail because there is no `org.gnome.ArchiveManager1` service registered, so the options for compressing and decompressing files will be set as "disabled" and the user will know that is not possible to manage compressed files. Now, if after noticing this, the user installs the missing 'file-roller' package, the `org.gnome.ArchiveManager1.service` file will be installed in the system and, thus, file-roller will be registered in DBus as an activatable service. But there is no way for DING to be notified of this fact: since file-roller is not launched (because it is an activatable service), `org.freedesktop.DBus.NameOwnerChanged` won't be emitted. So currently, the only options for DING are:
- do nothing, and don't allow the user to compress/decompress until DING is killed and relaunched. This is not a good idea because it forces the user to exit and re-enter the session, thus having to save their current documents.
- use polling, periodically calling `org.freedesktop.DBus.ListActivatableNames()` to check if the activatable service is finally available. Polling is usually a bad idea due to being resource-consuming.
- ask to the DBus daemon the current list of activatable services every time the user does a right-click to show the context menu, parse it, and only then show the menu with the updated status. Since it requires doing an IPC to the daemon and back, it can be considered too slow for an interactive action, and resource-consuming.
- manually monitor (with inotify or kqueue kernel interfaces, or higher-level interfaces like GFileMonitor from GLib) all the folders from `${XDG_DATA}/dbus-1/services`, and if a change is detected, call to `org.freedesktop.DBus.ListActivatableNames()` to get the new list. This is dangerous, because there can be a race condition if DING asks for the list of activatable names before DBus daemon has detected and processed the changes.
For this reason, it would be a good idea to add a new signal to notify to the clients that the current configuration has changed. This change should be quite straightforward, because the DBus daemon is already monitoring the folders where the services are registered, so it would only require to just send a signal at the end of the code that re-reads the configuration after a change.1.14.xhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/377Building docs with CMake fails2022-02-18T07:36:11ZJan TojnarBuilding docs with CMake failsBuilding 758d37b1f8784a3849a764b8cfa7f1d824aa5da4 with CMake fails for me:
```
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI ...Building 758d37b1f8784a3849a764b8cfa7f1d824aa5da4 with CMake fails for me:
```
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generate config.h.in with autogen.sh to enable cmake header difference check.
Unusual CMAKE_INSTALL_LIBDIR: the generated package will not be relocatable.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /nix/store/r255i42fsinsmjpywxzj8rsav51vx4b5-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libsystemd>=209'
-- Found libsystemd, version 249
-- Checking for module 'systemd'
-- Found systemd, version 249
-- Found EXPAT: /nix/store/hwzah8ba3p9pwwv9zwdy5ysw8m7sljjw-expat-2.4.4/lib/libexpat.so (found version "2.4.4")
-- Found X11: /nix/store/y33ngsql2d5mg57j231gk8c90347xy3b-xorgproto-2021.5/include
-- Looking for XOpenDisplay in /nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libX11.so
-- Looking for XOpenDisplay in /nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Could NOT find GLIB2 (missing: GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
-- Looking for alloca.h
-- Looking for alloca.h - found
-- Looking for byteswap.h
-- Looking for byteswap.h - found
-- Looking for crt/externs.h
-- Looking for crt/externs.h - not found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for expat.h
-- Looking for expat.h - found
-- Looking for grp.h
-- Looking for grp.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for locale.h
-- Looking for locale.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Looking for 3 include files stdint.h, ..., sys/event.h
-- Looking for 3 include files stdint.h, ..., sys/event.h - not found
-- Looking for sys/inotify.h
-- Looking for sys/inotify.h - found
-- Looking for sys/random.h
-- Looking for sys/random.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for sys/prctl.h
-- Looking for sys/prctl.h - found
-- Looking for sys/syslimits.h
-- Looking for sys/syslimits.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for ws2tcpip.h
-- Looking for ws2tcpip.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/inotify.h
-- Looking for sys/inotify.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for getgrouplist
-- Looking for getgrouplist - found
-- Looking for getpeerucred
-- Looking for getpeerucred - not found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for getpwnam_r
-- Looking for getpwnam_r - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for unsetenv
-- Looking for unsetenv - found
-- Looking for clearenv
-- Looking for clearenv - found
-- Looking for writev
-- Looking for writev - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for socketpair
-- Looking for socketpair - found
-- Looking for setlocale
-- Looking for setlocale - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for poll
-- Looking for poll - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for pipe2
-- Looking for pipe2 - found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for inotify_init1
-- Looking for inotify_init1 - found
-- Looking for SCM_RIGHTS
-- Looking for SCM_RIGHTS - found
-- Looking for prctl
-- Looking for prctl - found
-- Looking for raise
-- Looking for raise - found
-- Looking for getrandom
-- Looking for getrandom - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for prlimit
-- Looking for prlimit - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Looking for MSG_NOSIGNAL
-- Looking for MSG_NOSIGNAL - found
-- Looking for environ
-- Looking for environ - found
-- Looking for LOG_PERROR
-- Looking for LOG_PERROR - found
-- Performing Test HAVE_CMSGCRED
-- Performing Test HAVE_CMSGCRED - Failed
-- Performing Test DBUS_HAVE_LINUX_EPOLL
-- Performing Test DBUS_HAVE_LINUX_EPOLL - Success
-- Performing Test HAVE_VA_COPY
-- Performing Test HAVE_VA_COPY - Success
-- Performing Test HAVE___VA_COPY
-- Performing Test HAVE___VA_COPY - Success
-- Performing Test DBUS_USE_SYNC
-- Performing Test DBUS_USE_SYNC - Success
-- Performing Test HAVE_DIRFD
-- Performing Test HAVE_DIRFD - Failed
-- Performing Test HAVE_DDFD
-- Performing Test HAVE_DDFD - Failed
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of __int64
-- Check size of __int64 - failed
-- Check size of socklen_t
-- Check size of socklen_t - done
-- effectively used warnings for 'WARNINGS_CFLAGS': all;array-bounds;cast-align;char-subscripts;declaration-after-statement;double-promotion;duplicated-branches;duplicated-cond;extra;float-equal;format-nonliteral;format-security;format=2;implicit-function-declaration;init-self;inline;jump-misses-init;logical-op;missing-declarations;missing-format-attribute;missing-include-dirs;missing-noreturn;missing-prototypes;nested-externs;no-error=missing-field-initializers;no-error=unused-label;no-error=unused-parameter;no-missing-field-initializers;no-unused-label;no-unused-parameter;null-dereference;old-style-definition;packed;pointer-arith;pointer-sign;redundant-decls;restrict;return-type;shadow;sign-compare;strict-aliasing;strict-prototypes;switch-default;switch-enum;undef;unused-but-set-variable;write-strings
-- effectively used disabled warnings for 'WARNINGS_CFLAGS': error=overloaded-virtual;error=missing-field-initializers;error=unused-parameter;unused-parameter
-- effectively used warnings for 'WARNINGS_CXXFLAGS': all;array-bounds;cast-align;char-subscripts;declaration-after-statement;double-promotion;duplicated-branches;duplicated-cond;extra;float-equal;format-nonliteral;format-security;format=2;implicit-function-declaration;init-self;inline;jump-misses-init;logical-op;missing-declarations;missing-format-attribute;missing-include-dirs;missing-noreturn;missing-prototypes;nested-externs;no-error=missing-field-initializers;no-error=unused-label;no-error=unused-parameter;no-missing-field-initializers;no-unused-label;no-unused-parameter;null-dereference;old-style-definition;packed;pointer-arith;pointer-sign;redundant-decls;restrict;return-type;shadow;sign-compare;strict-aliasing;strict-prototypes;switch-default;switch-enum;undef;unused-but-set-variable;write-strings
-- effectively used disabled warnings for 'WARNINGS_CXXFLAGS': error=overloaded-virtual;error=missing-field-initializers;error=unused-parameter;unused-parameter
-- Copying test files to test directory (use -DENABLE_VERBOSE_CONFIG=ON to see the list of files)
-- Generating test files from templates into test directory (use -DENABLE_VERBOSE_CONFIG=ON to see the list of files)
-- Copying generated bus config files to test directory (use -DENABLE_VERBOSE_CONFIG=ON to see the list of files)
-- /nix/store/djd35vxmzdjh2c8yps1dhxl4myqi4726-libxslt-1.1.34-bin/bin/xsltproc found
-- Found DocBookXSL: /nix/store/zl5n86bgfsj6l8p37y2wca4fnixar5v9-docbook-xsl-nons-1.79.2/share/xml/docbook-xsl-nons/
-- xsltproc docbook generator found
set -DDBUS_INSTALL_SYSTEM_LIBS=1 to install runtime libraries too
set DBUSDIR (environment or cmake option) to overwrite the default install directory
D-BUS 1.13.21
=============
install prefix: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20
install exec_prefix: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20
install libdir: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/lib
install libexecdir: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/libexec
install bindir: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/bin
install sysconfdir: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/etc
install datadir: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/share
source code location: /build/dbus/..
build dir: /build/dbus/build
c compiler: gcc
cflags: -fno-common -Wall -Warray-bounds -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimplicit-function-declaration -Winit-self -Winline -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-error=missing-field-initializers -Wno-error=unused-label -Wno-error=unused-parameter -Wno-missing-field-initializers -Wno-unused-label -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-error=overloaded-virtual -Wno-error=missing-field-initializers -Wno-error=unused-parameter -Wno-unused-parameter
cflags debug: -g -Wl,--export-dynamic -D_DEBUG
cflags release: -O3 -DNDEBUG
cxx compiler: g++
cxxflags: -fno-common -Wall -Warray-bounds -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimplicit-function-declaration -Winit-self -Winline -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-error=missing-field-initializers -Wno-error=unused-label -Wno-error=unused-parameter -Wno-missing-field-initializers -Wno-unused-label -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-error=overloaded-virtual -Wno-error=missing-field-initializers -Wno-error=unused-parameter -Wno-unused-parameter
cxxflags debug: -g -Wl,--export-dynamic
cxxflags release: -O3 -DNDEBUG
64-bit int: long
32-bit int: int
16-bit int: short
Doxygen: DOXYGEN-NOTFOUND
Docbook Generator:
gcc coverage profiling: OFF
Building unit tests: ON
Building with GLib:
Building verbose mode: ON
Building w/o assertions: OFF
Building w/o checks: OFF
Building bus stats API: OFF
installing system libs: OFF
Building inotify support: 1
Building kqueue support:
Building systemd support: ON
systemd system install dir:lib/systemd/system
systemd user install dir: lib/systemd/user
Traditional activation: ON
Building Doxygen docs:
Building Qt help docs:
Building XML docs: ON
Daemon executable name: dbus-daemon
System bus address: unix:path=/nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/var/run/dbus/system_bus_socket
System bus socket:
System bus PID file: /nix/store/00lggmffn31lq5zr1cg4nhmjxac873l4-dbus-1.12.20/var/run/dbus/pid
System bus user: messagebus
Session bus socket dir: /build
pam_console auth dir: (none)
'make check' socket dir: /build
Test listen address: unix:tmpdir=/build
NOTE: building with unit tests increases the size of the installed library and renders it insecure.
NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance.
NOTE: building with assertions increases library size and decreases performance.
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_TESTING
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
CMAKE_POLICY_DEFAULT_CMP0025
-- Build files have been written to: /build/dbus/build
building
build flags: -j8 -l8 SHELL=/nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12/bin/bash
doc/CMakeFiles/dbus-update-activation-environment.1.html.dir/build.make:75: *** missing separator. Stop.
doc/CMakeFiles/dbus-test-plan.html.dir/build.make:75: *** missing separator. Stop.
make[1]: *** [CMakeFiles/Makefile2:2532: doc/CMakeFiles/dbus-update-activation-environment.1.html.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1986: doc/CMakeFiles/dbus-test-plan.html.dir/all] Error 2
doc/CMakeFiles/dbus-tutorial.html.dir/build.make:75: *** missing separator. Stop.
make[1]: *** [CMakeFiles/Makefile2:2012: doc/CMakeFiles/dbus-tutorial.html.dir/all] Error 2
doc/CMakeFiles/dbus-specification.html.dir/build.make:75: *** missing separator. Stop.
make[1]: *** [CMakeFiles/Makefile2:2038: doc/CMakeFiles/dbus-specification.html.dir/all] Error 2
doc/CMakeFiles/dbus-faq.html.dir/build.make:75: *** missing separator. Stop.
make[1]: *** [CMakeFiles/Makefile2:2064: doc/CMakeFiles/dbus-faq.html.dir/all] Error 2
```
similarly with the ninja backend:
```
CMake Error:
Running
'/nix/store/84sc1p2fn4327x08k7qf1avghd55rbr4-ninja-1.10.2/bin/ninja' '-C' '/build/dbus/build' '-t' 'recompact'
failed with:
ninja: warning: phony target 'doc/dbus-cleanup-sockets.1.xml' names itself as an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-daemon.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-launch.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-monitor.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-run-session.1.xml' names itself as
an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-send.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-test-tool.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-update-activation-environment.1.xml'
names itself as an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-uuidgen.1.xml' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-test-plan.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-tutorial.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-specification.html' names itself as
an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-faq.html' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-daemon.1' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-monitor.1' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-run-session.1' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-send.1' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-test-tool.1' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-launch.1' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-uuidgen.1' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-cleanup-sockets.1' names itself as
an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-update-activation-environment.1'
names itself as an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-daemon.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-monitor.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-run-session.1.html' names itself as
an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-send.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-test-tool.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-launch.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-uuidgen.1.html' names itself as an
input; ignoring [-w phonycycle=warn]
ninja: warning: phony target 'doc/dbus-cleanup-sockets.1.html' names itself
as an input; ignoring [-w phonycycle=warn]
ninja: warning: phony target
'doc/dbus-update-activation-environment.1.html' names itself as an input;
ignoring [-w phonycycle=warn]
ninja: error: build.ninja:3943: multiple rules generate
doc/dbus-cleanup-sockets.1.xml [-w dupbuild=err]
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/378Negative OOM score adjustment not reset to zero for activated system services2022-04-01T17:26:23ZSimon McVittieNegative OOM score adjustment not reset to zero for activated system services## Steps to reproduce
* Install a test VM that boots using systemd. I used a Debian 10 VM generated by `autopkgtest-build-qemu`.
* Check that `/lib/systemd/system/dbus.service` has `OOMScoreAdjust=-900`.
* Install a D-Bus system service...## Steps to reproduce
* Install a test VM that boots using systemd. I used a Debian 10 VM generated by `autopkgtest-build-qemu`.
* Check that `/lib/systemd/system/dbus.service` has `OOMScoreAdjust=-900`.
* Install a D-Bus system service that **does not** have `SystemdService` in its D-Bus `.service` file, so that it will use traditional activation via dbus-daemon-launch-helper. I used `system-tools-backends`, which includes a service `org.freedesktop.SystemToolsBackends.Platform`.
* Start the service: `dbus-send --system --print-reply org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.StartServiceByName string:org.freedesktop.SystemToolsBackends.Platform uint32:0`
* Inspect `/proc/${pid}/oom_score_adj` for `dbus-daemon --system`
* Inspect `/proc/${pid}/oom_score_adj` for the activated service
## Expected result
* `dbus-daemon --system` is running with OOM score adjustment of -900, meaning it is protected from the OOM killer
* `SystemToolsBackends.pl` is running with OOM score adjustment of 0, meaning it is not protected from the OOM killer
## Actual result
Both are running with OOM score adjustment of -900. No warnings are logged.
## Additional information
If I use `strace -ff -p${pid}` as root to attach to the system dbus-daemon, I can see the reason this happens: after the dbus-daemon has forked, it tries to open `/proc/self/oom_score_adj` as write-only, but gets `EACCES` "Permission denied".
This appears to be because the dbus-daemon initially started as root, and then dropped privileges to `messagebus`. This leaves most of the process parameter pseudo-files in `/proc/self/oom_score_adj` owned by root and inaccessible by `messagebus`. The forked child inherits this status.
## Workaround
Configure system services with `SystemdService=...` so that they are started by systemd activation instead of traditional activation. This means they are run by a real service manager (systemd), instead of by the dbus-daemon, which does a minimal amount of vestigial service-management.https://gitlab.freedesktop.org/dbus/dbus/-/issues/379How to get rid of orphan dbus-daemon processes?2022-02-23T20:49:57ZfulalasHow to get rid of orphan dbus-daemon processes?This issue doesn't seem to be related to any specific distro or desktop environment.
When I try to open a file manager as root calling, for instance, `sudo thunar` the units at left of the file manager appear with no label (plus some un...This issue doesn't seem to be related to any specific distro or desktop environment.
When I try to open a file manager as root calling, for instance, `sudo thunar` the units at left of the file manager appear with no label (plus some undesirable units like pts, shm, proc, sys, etc). Compare the left window (normal user) vs the right window (sudo):
![normal-vs-sudo](/uploads/3f5e9e2de0237bf96c4be817e21a311b/normal-vs-sudo.png)
If I call `sudo dbus-launch --exit-with-session thunar` it loads just fine (just like as normal user), however after closing the application a `dbus-daemon` instance keeps running forever (as seen at the bottom in the screenshot above).
If I call `sudo dbus-run-session -- thunar` it loads just fine and no orphan process is left behind after the application is closed, so it looks the right way of doing it. However if I want to open a file instead of an application AFAIK I need to call `xdg-open`, but when combined with `dbus-run-session` it doesn't work at all -- the only way is calling `sudo dbus-launch --exit-with-session xdg-open /home/test.txt`, which brings me to the original issue (i.e. orphan dbus-daemon processes).
Is there a good solution for this?
I reproduced this issue on Slackware Live Xfce (December 2021), Ubuntu 20.04 and Porteus nightly.https://gitlab.freedesktop.org/dbus/dbus/-/issues/380Fails to build with mingw-w64 version 82022-09-19T20:31:23ZSimon McVittieFails to build with mingw-w64 version 8## To reproduce
* Cross-compile dbus for Windows on Debian 10 (mingw-w64 6.0.0)
* Cross-compile dbus for Windows on Debian 11 (mingw-w64 8.0.0) or Debian unstable (same mingw-w64)
This is probably also reproducible on other distros lik...## To reproduce
* Cross-compile dbus for Windows on Debian 10 (mingw-w64 6.0.0)
* Cross-compile dbus for Windows on Debian 11 (mingw-w64 8.0.0) or Debian unstable (same mingw-w64)
This is probably also reproducible on other distros like Fedora and openSUSE, but Debian is what I have.
## Expected result
Successful build in both cases.
## Actual result
On Debian 10 with mingw-w64 6.0.0, the build succeeds, as expected.
On Debian 11 with mingw-w64 8.0.0:
```
In file included from ../../dbus/dbus-marshal-basic.c:26:
../../dbus/dbus-marshal-basic.c: In function '_dbus_verbose_bytes':
../../dbus/dbus-marshal-basic.c:1400:30: error: unknown conversion type character 'l' in format [-Werror=format=]
1400 | _dbus_verbose (" u64: 0x%" PRIx64,
| ^~~~~~~~~~~
../../dbus/dbus-internals.h:107:85: note: in definition of macro '_dbus_verbose'
107 | # define _dbus_verbose(fmt,...) _dbus_verbose_real( __FILE__,__LINE__,__FUNCTION__,fmt, ## __VA_ARGS__)
| ^~~
../../dbus/dbus-marshal-basic.c:1400:30: error: too many arguments for format [-Werror=format-extra-args]
1400 | _dbus_verbose (" u64: 0x%" PRIx64,
| ^~~~~~~~~~~
../../dbus/dbus-internals.h:107:85: note: in definition of macro '_dbus_verbose'
107 | # define _dbus_verbose(fmt,...) _dbus_verbose_real( __FILE__,__LINE__,__FUNCTION__,fmt, ## __VA_ARGS__)
| ^~~
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/381CMake job on CI fails sporadically with `Problem configuring file`2022-03-08T15:07:14ZRalf HabackerCMake job on CI fails sporadically with `Problem configuring file`With the cmake system, it happens sporadically that the generation of a docbook-xml file from a template fails, as shown at https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/19352422. The corresponding error message is:
```
make -f d...With the cmake system, it happens sporadically that the generation of a docbook-xml file from a template fails, as shown at https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/19352422. The corresponding error message is:
```
make -f doc/CMakeFiles/xmldoc-dbus-daemon.1.html.dir/build.make doc/CMakeFiles/xmldoc-dbus-daemon.1.html.dir/build
make[2]: Entering directory '/builds/xxx/dbus/dbus-1.14.99/ci-build-production-native'
[ 24%] Generating dbus-daemon.1.xml
cd /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc && /usr/bin/cmake -E remove /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml
[ 24%] Generating dbus-daemon.1.xml
cd /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc && /usr/bin/cmake -E remove /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml
cd /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc && /usr/bin/cmake -P /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml.tmp.cmake
cd /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc && /usr/bin/cmake -P /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml.tmp.cmake
CMake Error at dbus-daemon.1.xml.tmp.cmake:5 (configure_file):
configure_file Problem configuring file
make[2]: *** [doc/CMakeFiles/xmldoc-dbus-daemon.1.html.dir/build.make:90: doc/dbus-daemon.1.xml] Error 1
make[2]: *** Deleting file 'doc/dbus-daemon.1.xml'
make[2]: Leaving directory '/builds/xxx/dbus/dbus-1.14.99/ci-build-production-native'
make[1]: *** [CMakeFiles/Makefile2:2945: doc/CMakeFiles/xmldoc-dbus-daemon.1.html.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 24%] Generating dbus-daemon.1
cd /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc && /usr/bin/xsltproc --output /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1 --nonet --xinclude --param passivetex.extensions '1' --param generate.consistent.ids '1' /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml
warning: failed to load external entity "/builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml"
unable to parse /builds/xxx/dbus/dbus-1.14.99/ci-build-production-native/doc/dbus-daemon.1.xml
make[2]: *** [doc/CMakeFiles/xmldoc-dbus-daemon.1.dir/build.make:84: doc/dbus-daemon.1] Error 6
make[2]: Leaving directory '/builds/xxx/dbus/dbus-1.14.99/ci-build-production-native'
make[1]: *** [CMakeFiles/Makefile2:2972: doc/CMakeFiles/xmldoc-dbus-daemon.1.dir/all] Error 2
make[1]: Leaving directory '/builds/xxx/dbus/dbus-1.14.99/ci-build-production-native'
make: *** [Makefile:185: all] Error 2
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/383dbus build error when using -DENABLE_WERROR=1 with cmake build system for Win...2022-05-01T16:41:07ZRalf Habackerdbus build error when using -DENABLE_WERROR=1 with cmake build system for WindowsWith dbus/dbus!261, all warnings are now treated as errors and result in the following build errors:
```
/home/xxx/src/dbus-4/test/test-segfault.c: In function 'main':
/home/xxx/src/dbus-4/test/test-segfault.c:21:6: error: null pointer ...With dbus/dbus!261, all warnings are now treated as errors and result in the following build errors:
```
/home/xxx/src/dbus-4/test/test-segfault.c: In function 'main':
/home/xxx/src/dbus-4/test/test-segfault.c:21:6: error: null pointer dereference [-Werror=null-dereference]
21 | *p = 'a';
| ~~~^~~~~
cc1: all warnings being treated as errors
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
```
In file included from /home/xxx/src/dbus-4/dbus/dbus-list.h:27,
from /home/xxx/src/dbus-4/dbus/dbus-auth.c:27:
/home/xxx/src/dbus-4/dbus/dbus-auth.c: In function 'handle_client_data_cookie_sha1_mech':
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:216:1: error: inlining failed in call to '_dbus_assert_error_is_set.constprop': call is unlikely and code size would grow [-Werror=inline]
216 | _dbus_assert_error_is_set (const DBusError *error,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: called from here
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: in definition of macro '_DBUS_ASSERT_ERROR_IS_SET'
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:216:1: error: inlining failed in call to '_dbus_assert_error_is_set.constprop': call is unlikely and code size would grow [-Werror=inline]
216 | _dbus_assert_error_is_set (const DBusError *error,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: called from here
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: in definition of macro '_DBUS_ASSERT_ERROR_IS_SET'
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
```
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:216:1: error: inlining failed in call to '_dbus_assert_error_is_set.constprop': call is unlikely and code size would grow [-Werror=inline]
216 | _dbus_assert_error_is_set (const DBusError *error,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: called from here
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/./dbus/dbus-internals.h:250:42: note: in definition of macro '_DBUS_ASSERT_ERROR_IS_SET'
250 | #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert_error_is_set (error, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
```
/home/xxx/src/dbus-4/dbus/dbus-message.c: In function 'dbus_message_new_empty_header':
/builds/rhabacker/dbus/dbus/dbus-message.c:1268:19: warning: potential null pointer dereference [-Wnull-dereference]
1268 | message->locked = FALSE;
/builds/rhabacker/dbus/dbus/dbus-message.c:1270:21: warning: potential null pointer dereference [-Wnull-dereference]
1270 | message->in_cache = FALSE;
/builds/rhabacker/dbus/dbus/dbus-message.c:1272:21: warning: potential null pointer dereference [-Wnull-dereference]
1272 | message->counters = NULL;
| ^
/builds/rhabacker/dbus/dbus/dbus-message.c:1273:31: warning: potential null pointer dereference [-Wnull-dereference]
1273 | message->size_counter_delta = 0;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/builds/rhabacker/dbus/dbus/dbus-message.c:1274:26: warning: potential null pointer dereference [-Wnull-dereference]
1274 | message->changed_stamp = 0;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /builds/rhabacker/dbus/dbus/dbus-message.c:26:
/builds/rhabacker/dbus/dbus/dbus-message.c:584:24: warning: potential null pointer dereference [-Wnull-dereference]
584 | _dbus_assert (message->counters == NULL);
| ~~~~~~~^~~~~~~~~~
584 | _dbus_assert (message->counters == NULL);
| ~~~~~~~^~~~~~~~~~
```
-> still open; reduced from [-Werror=null-dereference]
```
/home/xxx/src/dbus-4/test/internals/dbus-marshal-recursive-util.c:2634:24: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
2634 | *(dbus_uint64_t*)(char*)&expected,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/test/internals/dbus-marshal-recursive-util.c:2635:24: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
2635 | *(dbus_uint64_t*)(char*)&v);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Scanning dependencies of target test-atomic
make[2]: Verzeichnis „/home/xxx/src/dbus-4-cmake-mingw32-build“ wird verlassen
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
```
make -f test/CMakeFiles/test-atomic.dir/build.make test/CMakeFiles/test-atomic.dir/build
/home/xxx/src/dbus-4/bus/services.c: In function 'bus_service_swap_owner':
/home/xxx/src/dbus-4/bus/services.c:1086:17: error: potential null pointer dereference [-Werror=null-dereference]
1086 | new_owner = (BusOwner *)link->data;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: Verzeichnis „/home/xxx/src/dbus-4-cmake-mingw32-build“ wird betreten
/home/xxx/src/dbus-4/bus/services.c: In function 'bus_service_remove_owner':
/home/xxx/src/dbus-4/bus/services.c:1151:18: error: potential null pointer dereference [-Werror=null-dereference]
1151 | temp_owner = (BusOwner *)link->data;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/xxx/src/dbus-4/bus/services.c:1151:18: error: potential null pointer dereference [-Werror=null-dereference]
/home/xxx/src/dbus-4/bus/services.c:1180:17: error: potential null pointer dereference [-Werror=null-dereference]
1180 | new_owner = (BusOwner *)link->data;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
```
/home/xxx/src/dbus-4/test/internals/dbus-string-util.c: In function '_dbus_string_test':
/home/xxx/src/dbus-4/test/internals/dbus-string-util.c:749:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
749 | if (((DBusRealString *)&str)->allocated > 30)
| ~^~~~~~~~~~~~~~~~~~~~~~~
```
-> covered by https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
How to reproduce:
----------------
1. checkout the branch from merge request https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/192
2. reset the branch to commit https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/192/diffs?commit_id=996154cd875eedba7ba4bfeab675be14f5ddc108
3. Push to a branch on a local dbus fork on gitlab CI to start building
4. inspect build logshttps://gitlab.freedesktop.org/dbus/dbus/-/issues/384CI build error: "apparmor_parser": executable file not found in $PATH on imag...2022-03-14T09:47:16ZRalf HabackerCI build error: "apparmor_parser": executable file not found in $PATH on image debian:bullseye-slimFrom https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/270 the following job https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/19615898 fails
```
ERROR: Preparation failed: creating cache volume: set volume permissions: runni...From https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/270 the following job https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/19615898 fails
```
ERROR: Preparation failed: creating cache volume: set volume permissions: running permission container "72fca7ae97c39812a8169be8b38404b26a270820c09081a8d61d98fa2b37da45" for volume "runner-dq1nmwux-project-1237-concurrent-0-8528fed8a4015bbd-cache-c33bcaa1fd2c77edfc3893b41966cea8": starting permission container: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output:
error: exec: "apparmor_parser": executable file not found in $PATH (linux_set.go:105:0s)
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/385dbus-launch --autostart wants Xorg on MacOS2022-04-05T11:37:03ZGhost Userdbus-launch --autostart wants Xorg on MacOSWhen using `dbus-launch` with the `--autostart`, it wants to use xorg. Xorg support is not compiled in. There should be a way to get autostart working on macos, or it should not error. It outputs:
```
% dbus-launch --autolaunch=797489dde...When using `dbus-launch` with the `--autostart`, it wants to use xorg. Xorg support is not compiled in. There should be a way to get autostart working on macos, or it should not error. It outputs:
```
% dbus-launch --autolaunch=797489ddeb4f8d40c2b5715860fdb450 --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in.
Cannot continue.
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/386The org.freedesktop.FileManager1 cannot display the file manager window at th...2022-03-21T11:45:04ZSJ JiangThe org.freedesktop.FileManager1 cannot display the file manager window at the top level## To reproduce
Steps to reproduce the behavior:
1. When Nautilus is not started (e.g. closing Nautilus via kill Nautilus)
2. Run command: dbus-send --session --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManage...## To reproduce
Steps to reproduce the behavior:
1. When Nautilus is not started (e.g. closing Nautilus via kill Nautilus)
2. Run command: dbus-send --session --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///etc/hosts" string:"" behavior:The file manager window pops up, displaying the selected file, and the window is displayed at the top level
3. Run the above command again, and the file manager window cannot be displayed at the top level;
## Expected result
Run the above command multiple times,the file manager window pops up, displaying the selected file, and the window is displayed at the top level
## Actual result
the file manager window cannot be displayed at the top level;
## Additional context
Linux 5.13.0-30-generic #33\~20.04.1-Ubuntu; GNOME nautilus 3.36.3;https://gitlab.freedesktop.org/dbus/dbus/-/issues/387cc1plus: warning command-line option '...' is valid for C/ObjC but not for C+...2022-04-21T14:08:45ZRalf Habackercc1plus: warning command-line option '...' is valid for C/ObjC but not for C++ with cmake and mingw## To reproduce
Steps to reproduce the behavior:
1. merge a merge request or build dbus with gcc for Windows
## Expected result
The warning should not be present
## Actual result
As it could be seen at https://gitlab.freedesktop.org/d...## To reproduce
Steps to reproduce the behavior:
1. merge a merge request or build dbus with gcc for Windows
## Expected result
The warning should not be present
## Actual result
As it could be seen at https://gitlab.freedesktop.org/dbus/dbus/-/jobs/20197753 the compiler shows the following warnings:
```
cc1plus: warning: command-line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wjump-misses-init' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wnested-externs' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wold-style-definition' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wpointer-sign' is valid for C/ObjC but not for C++
cc1plus: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
```
## Additional information
see !276 for a related merge requesthttps://gitlab.freedesktop.org/dbus/dbus/-/issues/388debian/ubuntu related CI jobs fails to fetch mingw runtime2022-09-13T15:08:57ZRalf Habackerdebian/ubuntu related CI jobs fails to fetch mingw runtime## To reproduce
Steps to reproduce the behavior:
1. push a branch from the dbus repository to gitlab.freedesktop.org
2. inspect log files from mingw related build jobs, for example https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/20...## To reproduce
Steps to reproduce the behavior:
1. push a branch from the dbus repository to gitlab.freedesktop.org
2. inspect log files from mingw related build jobs, for example https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/20317102
## Expected result
The related files should be found
## Actual result
```
+ wget https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst
--2022-03-28 07:00:42-- https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst
Resolving repo.msys2.org (repo.msys2.org)... 178.63.98.68
Connecting to repo.msys2.org (repo.msys2.org)|178.63.98.68|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-03-28 07:00:42 ERROR 404: Not Found.
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/392can not compile dbus on macos m1max2022-09-13T11:27:55Zvinurscan not compile dbus on macos m1maxi use homebrew to install dbus on macos m1max
```
brew install dbus --HEAD
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/0a8a55872e/d-bu
Already downloaded: /Users/vinurs/Library/Caches/Homebrew/downloads/960...i use homebrew to install dbus on macos m1max
```
brew install dbus --HEAD
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/0a8a55872e/d-bu
Already downloaded: /Users/vinurs/Library/Caches/Homebrew/downloads/9600be4d5089b91e794e80a6e58567a9ccc5d806c95963256aefcf8f7e39b8eb--org.freedesktop.dbus-session.plist.osx.diff
==> Cloning https://gitlab.freedesktop.org/dbus/dbus.git
Updating /Users/vinurs/Library/Caches/Homebrew/dbus--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at e4789186 Merge branch 'ci-auto-detect-distro' into 'master'
==> Patching
==> Applying org.freedesktop.dbus-session.plist.osx.diff
patching file bus/org.freedesktop.dbus-session.plist.in
==> ./autogen.sh --no-configure
==> ./configure --prefix=/opt/homebrew/Cellar/dbus/HEAD-e478918 --localstatedir=/opt/homeb
==> make install
Last 15 lines from /Users/vinurs/Library/Logs/Homebrew/dbus/03.make:
CC dbus-run-session.o
CC dbus-spam.o
CC dbus-send.o
CC dbus-echo.o
dbus-launch.c:1037:58: error: use of undeclared identifier 'error'
&existing_bus, &error))
^
dbus-launch.c:1039:36: error: use of undeclared identifier 'error'
fprintf (stderr, "%s\n", error.message);
^
2 errors generated.
CC test-tool.o
make[1]: *** [dbus_launch-dbus-launch.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install-recursive] Error 1
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/393Please consider hardening dbus.service2022-04-26T15:05:36ZAndrea PappacodaPlease consider hardening dbus.serviceOn systems running systemd, dbus-daemon is usually started using [dbus.service](https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/dbus.service.in). Currently, the service runs as root and without any kind restrictions.
Does dbu...On systems running systemd, dbus-daemon is usually started using [dbus.service](https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/dbus.service.in). Currently, the service runs as root and without any kind restrictions.
Does dbus-daemon really need to run with such high privileges? If not, I would suggest adding some hardening options to dbus.service. `systemd-analyze security dbus.service` currently reports an exposure level of 9.6, and gives hints at what could be done to improve the situation.
Thanks!https://gitlab.freedesktop.org/dbus/dbus/-/issues/398In the environment of autoconf-archive 20150925-1, there is an error in auto-...2022-05-28T03:12:27ZgcoollinuxIn the environment of autoconf-archive 20150925-1, there is an error in auto-configuring dbus.hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ sudo apt-get update -y<br />
Hit:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease<br />
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease <br />
Hit:3 htt...hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ sudo apt-get update -y<br />
Hit:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease<br />
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease <br />
Hit:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease<br />
Hit:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease<br />
Reading package lists... Done<br />
hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ sudo apt-get install -y autoconf-archive<br />
Reading package lists... Done<br />
Building dependency tree <br />
Reading state information... Done<br />
autoconf-archive is already the newest version (20150925-1).<br />
0 upgraded, 0 newly installed, 0 to remove and 90 not upgraded.<br />
hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ ./autogen.sh --host=arm-dspg-linux<br />
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.<br />
libtoolize: copying file 'build-aux/ltmain.sh'<br />
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.<br />
libtoolize: copying file 'm4/libtool.m4'<br />
libtoolize: copying file 'm4/ltoptions.m4'<br />
libtoolize: copying file 'm4/ltsugar.m4'<br />
libtoolize: copying file 'm4/ltversion.m4'<br />
libtoolize: copying file 'm4/lt~obsolete.m4'<br />
configure.ac:97: installing 'build-aux/compile'<br />
configure.ac:21: installing 'build-aux/missing'<br />
bus/Makefile.am: installing 'build-aux/depcomp'<br />
configure.ac:95: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive<br />
If this token and others are legitimate, please use m4_pattern_allow.<br />
See the Autoconf documentation.<br />
configure.ac:162: error: possibly undefined macro: AC_MSG_ERROR<br />
configure.ac:1172: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive<br />
configure.ac:1177: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive<br />
configure.ac:1186: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive<br />
configure.ac:1192: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive<br />
autoconf failed - version 2.5x is probably required<br />
hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ sudo lsb_release -a<br />
No LSB modules are available.<br />
Distributor ID: Ubuntu<br />
Description: Ubuntu 16.04.6 LTS<br />
Release: 16.04<br />
Codename: xenial<br />
hello@hello-virtual-machine:\~/Work/D-BUS/dbus-1.14.0$ <br />
I'm having a problem similar to #249https://gitlab.freedesktop.org/dbus/dbus/-/issues/402DBus Spawn ChildExited Error2022-07-13T09:05:53ZMohit VermaDBus Spawn ChildExited ErrorHi, I am currently doing some work with the Gnome-Control-Center printing panel ans CupsPkHelper .The G-C-C does a gdbus_connection_call to cups-pk-helper for discovery of printer devices. This discovery method is currently being replace...Hi, I am currently doing some work with the Gnome-Control-Center printing panel ans CupsPkHelper .The G-C-C does a gdbus_connection_call to cups-pk-helper for discovery of printer devices. This discovery method is currently being replaced with PAPPL & some other API calls.
The problem is that as soon as I add PAPPL API calls for this, the G-C-C throws an error `(gnome-control-center:11427): printers-cc-panel-WARNING **: 13:39:39.747: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 127` .
I have tried looking up for a solution but couldn't find anything useful.https://gitlab.freedesktop.org/dbus/dbus/-/issues/404Increase minimum version of MSVC to one that we test in CI2022-07-20T13:27:46ZSimon McVittieIncrease minimum version of MSVC to one that we test in CIWe have a lot of things in our build that are being held back by "but what if MSVC doesn't support it?":
* making C99 `va_copy` a hard requirement (this would let us drop the probes for whether we need `__va_copy()` or an open-coded imp...We have a lot of things in our build that are being held back by "but what if MSVC doesn't support it?":
* making C99 `va_copy` a hard requirement (this would let us drop the probes for whether we need `__va_copy()` or an open-coded implementation for MSVC)
* making C99 `static inline` a hard requirement (this would let us drop the `__inline` fallback)
* making C99 `snprintf()` a hard requirement (this would let us drop the `_snprintf` fallback in CMake)
* making C99 `strtoll()` and `strtoull()` a hard requirement (this would let us drop `tools/strto*ll.c` and related fallbacks)
* making a C99-compatible `<stdint.h>` a hard requirement (we can't necessarily redefine `dbus_int32_t` etc. for API reasons as discussed on !283, but we could at least add static assertions that say they are interchangeable, and potentially start using them internally)
MSVC 2013+ support quite a large subset of C99, and MSVC 2015+ have a much larger subset.
Now that @elmarco has added a CI job that runs on MSVC 2015, I'd like to start documenting that we require a C99 compiler for Unix, or at least the subset of C99 supported by MSVC 2015 for Windows. This would let us drop a lot of these workarounds, many of which we have trouble actually testing in practice (which probably means a lot of them are already broken and we just don't know it).
Alternatively, if there are reasons why we need to continue to support an older version of MSVC (like 2013?), then we should have CI that routinely tests that version, to verify that we haven't regressed.
Prior art: GLib is in the same situation as dbus (it's written in C, and wants to be portable to most Unixes, plus Windows and macOS), and the GLib developers publish a set of [toolchain requirements](https://gitlab.gnome.org/GNOME/glib/-/blob/main/docs/toolchain-requirements.md).https://gitlab.freedesktop.org/dbus/dbus/-/issues/405_dbus_transport_new_for_domain_socket() should escape path2022-07-18T10:33:34ZSimon McVittie_dbus_transport_new_for_domain_socket() should escape pathFrom !249.
`_dbus_transport_new_for_domain_socket()` has a `@todo` comment saying it should escape `path` after appending it to the address string "once we add a way to escape paths".
The way to escape paths has existed since commit aa...From !249.
`_dbus_transport_new_for_domain_socket()` has a `@todo` comment saying it should escape `path` after appending it to the address string "once we add a way to escape paths".
The way to escape paths has existed since commit aa4f8237, committed in 2005. This function should use `_dbus_address_append_escaped` instead of plain `_dbus_string_append` (see the implementation of `dbus_address_escape_value()` for example code).
The practical result is that if you listen on a socket in a directory whose name contains bytes that are not valid in a D-Bus address (such as spaces), you get a syntactically invalid D-Bus address out.https://gitlab.freedesktop.org/dbus/dbus/-/issues/406Some tests fail when run under fakeroot2022-07-18T10:29:49ZPaul MenzelSome tests fail when run under fakeroot[Edited: The warning about setting the fd limit seems to be a red herring, and the real reason for test failure in this environment seems to be the use of fakeroot. —@smcv]
Original report:
Since commit https://gitlab.freedesktop.org/d...[Edited: The warning about setting the fd limit seems to be a red herring, and the real reason for test failure in this environment seems to be the use of fakeroot. —@smcv]
Original report:
Since commit https://gitlab.freedesktop.org/dbus/dbus/-/commit/7eacbfece70f16bb54d0f3ac51f87ae398759ef5 (bus: Try to raise soft fd limit to match hard limit) the fd limit is tried to be set to 65536.
In our environment, we still default to 1024/4096.
$ ulimit -n
1024
$ ulimit -Hn
4096
This causes some test failures (`make check`), and probably then also runtime problems.
```
ERROR: test-dbus-daemon-fork
============================
# dbus-daemon binary: /dev/shm/bee-pmenzel/dbus/dbus-1.14.0-0/build/bus/dbus-daemon
# dbus-send binary: /dev/shm/bee-pmenzel/dbus/dbus-1.14.0-0/build/tools/dbus-send
# test data: /dev/shm/bee-pmenzel/dbus/dbus-1.14.0-0/build/test/data
dbus-daemon[14157]: [session uid=0 pid=14133] org.freedesktop.DBus.Error.AccessDenied: Failed to set fd limit to 65536: Operation not permitted
Failed to open connection to "session" message bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
1..3
ERROR: test-dbus-daemon-fork.sh - too few tests run (expected 3, got 0)
ERROR: test-dbus-daemon-fork.sh - exited with status 1
```
The commit talks about security implications, but this is not part of the threat model in our environment.https://gitlab.freedesktop.org/dbus/dbus/-/issues/407two tests fail in a user namespace where DBUS_USER, DBUS_TEST_USER are not ma...2022-07-18T11:15:18ZSimon McVittietwo tests fail in a user namespace where DBUS_USER, DBUS_TEST_USER are not mapped## To reproduce
Run the test suite in an environment where dbus thinks it is uid 0, but no other uids are mapped. For example, a Linux user namespace created by [bubblewrap](https://github.com/containers/bubblewrap) has only two uids in...## To reproduce
Run the test suite in an environment where dbus thinks it is uid 0, but no other uids are mapped. For example, a Linux user namespace created by [bubblewrap](https://github.com/containers/bubblewrap) has only two uids inside the container: one uid of the user's choice (really the user's own uid), and the overflow uid `nobody`, therefore we cannot switch to uid `messagebus`.
```
bwrap \
--dev-bind / / \
--unshare-user \
--uid 0 \
--gid 0 \
meson test -C builddir
```
## Expected result
Tests pass. Some tests cannot be executed like this and are skipped.
## Actual result
Tests that involve dropping privileges from uid 0 to `messagebus` fail.
`test-dbus-daemon` fails in `/fd-limit/system` because a dbus-daemon resembling the system bus fails to start:
```
dbus-daemon[12345]: Failed to start message bus: Failed to drop capabilities: Operation not permitted
```
`test-uid-permissions` also fails:
```
Bail out! FATAL-ERROR: setresuid(65534, (same), 0): Invalid argument
** (...test-uid-permissions): ERROR **: (timestamp): could not setuid (104): Invalid argument
** (...test-uid-permissions): ERROR **: (timestamp): setresuid(65534, (same), 0): Invalid argument
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/409Should we configure Meson with c_std=gnu99 by default?2023-01-03T18:57:12ZSimon McVittieShould we configure Meson with c_std=gnu99 by default?On !331, @elmarco suggested:
> Shouldn't we set meson `default_options: ['c_std=c99']` ? (and similar for cmake/autotools)
I think there are two routes we can take here.
1. Rely on modern compilers defaulting to at least C99 (for exam...On !331, @elmarco suggested:
> Shouldn't we set meson `default_options: ['c_std=c99']` ? (and similar for cmake/autotools)
I think there are two routes we can take here.
1. Rely on modern compilers defaulting to at least C99 (for example gcc has defaulted to `gnu99` since 5.1.0), and not have a `c_std` in our `default_options` at all. That's effectively what we're doing for Meson and CMake so far.
This will break builds if you have a C compiler that *can* support C99, but doesn't by default.
Workaround: users of ancient compilers can explicitly configure dbus with `-Dc_std=c99` or `-Dc_std=gnu99`, or `-Dc_args=--modern-c`, or whatever is the right option to opt-in to modern C for their compiler.
2. Explicitly add `default_options: ['c_std=gnu99']`. This is what GLib did. This will ensure that ancient versions of gcc and clang (gcc 4?) get an opt-in to C99 features.
However, it will break builds if Meson doesn't know how to configure your (non-GNU, non-clang, non-MSVC) compiler for C99: the default for unrecognised compilers (lcc? Intel C? proprietary Unixes' compilers? etc.) seems to be that only `c_std=none` is accepted.
Workaround: users of obscure compilers can configure dbus with `-Dc_std=none`, and maybe `-Dc_args=--it-is-the-21st-century` or whatever is the right option to opt-in to modern C for their compiler.
It's not obvious to me which of those is better.
By default, Autoconf `AC_PROG_CC` tries various options to opt-in to the newest compliance level known to both Autoconf and the compiler (C11, C99 or C89), with GNU extensions if possible; but Meson doesn't seem to have a way to do this, so that's not an option for Meson.
A brief survey of compilers that people genuinely use:
* Any reasonable version of gcc (since 5.1.0 I think) defaults to the equivalent of `-std=gnu11` or later. All versions since 4.6 (maybe older) support `-std=gnu99` as an opt-in.
* Any reasonable version of clang (since 3.4, maybe older) is C99 or later by default (with GNU extensions also enabled by default, I think?) and accepts GNU-style `-std=gnu99` etc. as an opt-in.
* MSVC 2015 is approximately C99 by default, with C11 and C17 available as an opt-in in later versions. Meson since 0.57 special-cases it to treat `c_std=gnuXX` as the corresponding Standard C compliance level, without GNU extensions.https://gitlab.freedesktop.org/dbus/dbus/-/issues/411dbus: UID resolution2022-08-17T18:50:34Zalivenetsdbus: UID resolutionIt is not an issue but more a question.
AFAIK after connection, dbus-daemon resolves user taken from peer credentials via user database cache which makes requests via getpwuid/getpwnam to glibc NSS.
Question: why are process credential...It is not an issue but more a question.
AFAIK after connection, dbus-daemon resolves user taken from peer credentials via user database cache which makes requests via getpwuid/getpwnam to glibc NSS.
Question: why are process credentials not used directly? Is it a security-driven decision or something else?https://gitlab.freedesktop.org/dbus/dbus/-/issues/412Undefined reference to _dbus_message_iter_append_check when building with DBU...2022-08-18T13:25:17ZJohannes KauffmannUndefined reference to _dbus_message_iter_append_check when building with DBUS_DISABLE_CHECKS=ONFresh checkout of 7e0c51d8000a467a153700420a35a18d1b580c51.
Building on and for Ubuntu 20.04.
CMake configure/build command:
```bash
mkdir build && cd build
cmake .. -GNinja -DDBUS_DISABLE_CHECKS=ON
cmake --build .
```
gives this buil...Fresh checkout of 7e0c51d8000a467a153700420a35a18d1b580c51.
Building on and for Ubuntu 20.04.
CMake configure/build command:
```bash
mkdir build && cd build
cmake .. -GNinja -DDBUS_DISABLE_CHECKS=ON
cmake --build .
```
gives this build output:
<details><summary>Click to expand</summary>
```
[20/257] Building C object dbus/CMakeFiles/dbus-1.dir/dbus-message.c.o
In file included from /home/johannes/repos/dbus/dbus/dbus-message.c:26:
/home/johannes/repos/dbus/dbus/dbus-message.c: In function ‘_dbus_variant_write’:
/home/johannes/repos/dbus/dbus/dbus-message.c:5505:17: warning: implicit declaration of function ‘_dbus_message_iter_append_check’; did you mean ‘dbus_message_iter_append_basic’? [-Wimplicit-function-declaration]
5505 | _dbus_assert (_dbus_message_iter_append_check (real_writer));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/johannes/repos/dbus/dbus/dbus-internals.h:152:23: note: in definition of macro ‘_dbus_assert’
152 | _dbus_real_assert ((condition) != 0, #condition, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~
/home/johannes/repos/dbus/dbus/dbus-message.c:5505:17: warning: nested extern declaration of ‘_dbus_message_iter_append_check’ [-Wnested-externs]
5505 | _dbus_assert (_dbus_message_iter_append_check (real_writer));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/johannes/repos/dbus/dbus/dbus-internals.h:152:23: note: in definition of macro ‘_dbus_assert’
152 | _dbus_real_assert ((condition) != 0, #condition, __FILE__, __LINE__, _DBUS_FUNCTION_NAME)
| ^~~~~~~~~
[97/257] Linking C executable bin/dbus-daemon
FAILED: bin/dbus-daemon
: && /usr/bin/cc -fno-common -Wall -Warray-bounds -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimplicit-function-declaration -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-error=missing-field-initializers -Wno-error=unused-label -Wno-error=unused-parameter -Wno-missing-field-initializers -Wno-unused-label -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-error=inline -Wno-error=overloaded-virtual -Wno-error=missing-field-initializers -Wno-error=null-dereference -Wno-error=strict-aliasing -Wno-error=unused-parameter -Wno-unused-parameter -Wl,--export-dynamic bus/CMakeFiles/dbus-daemon.dir/main.c.o -o bin/dbus-daemon -L/home/johannes/repos/dbus/build/lib -Wl,-rpath,/home/johannes/repos/dbus/build/lib: lib/libdbus-daemon-internal.a lib/libdbus-internal.a lib/libdbus-1.so.3.33.0 -lsystemd /usr/lib/x86_64-linux-gnu/librt.a /usr/lib/x86_64-linux-gnu/libexpat.so && :
/usr/bin/ld: lib/libdbus-1.so.3.33.0: undefined reference to `_dbus_message_iter_append_check'
collect2: error: ld returned 1 exit status
[101/257] Linking C executable bin/manual-dir-iter
FAILED: bin/manual-dir-iter
: && /usr/bin/cc -fno-common -Wall -Warray-bounds -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimplicit-function-declaration -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-error=missing-field-initializers -Wno-error=unused-label -Wno-error=unused-parameter -Wno-missing-field-initializers -Wno-unused-label -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-error=inline -Wno-error=overloaded-virtual -Wno-error=missing-field-initializers -Wno-error=null-dereference -Wno-error=strict-aliasing -Wno-error=unused-parameter -Wno-unused-parameter -Wl,--export-dynamic test/CMakeFiles/manual-dir-iter.dir/manual-dir-iter.c.o -o bin/manual-dir-iter -L/home/johannes/repos/dbus/build/lib -Wl,-rpath,/home/johannes/repos/dbus/build/lib lib/libdbus-internal.a lib/libdbus-1.so.3.33.0 -lsystemd /usr/lib/x86_64-linux-gnu/librt.a && :
/usr/bin/ld: lib/libdbus-1.so.3.33.0: undefined reference to `_dbus_message_iter_append_check'
collect2: error: ld returned 1 exit status
[102/257] Linking C executable bin/dbus-daemon-launch-helper
FAILED: bin/dbus-daemon-launch-helper
: && /usr/bin/cc -fno-common -Wall -Warray-bounds -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimplicit-function-declaration -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-error=missing-field-initializers -Wno-error=unused-label -Wno-error=unused-parameter -Wno-missing-field-initializers -Wno-unused-label -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-error=inline -Wno-error=overloaded-virtual -Wno-error=missing-field-initializers -Wno-error=null-dereference -Wno-error=strict-aliasing -Wno-error=unused-parameter -Wno-unused-parameter -Wl,--export-dynamic bus/CMakeFiles/dbus-daemon-launch-helper.dir/activation-helper.c.o bus/CMakeFiles/dbus-daemon-launch-helper.dir/activation-helper-bin.c.o -o bin/dbus-daemon-launch-helper -L/home/johannes/repos/dbus/build/lib -Wl,-rpath,/home/johannes/repos/dbus/build/lib: lib/liblaunch-helper-internal.a lib/libdbus-internal.a lib/libdbus-1.so.3.33.0 -lsystemd /usr/lib/x86_64-linux-gnu/librt.a /usr/lib/x86_64-linux-gnu/libexpat.so && :
/usr/bin/ld: lib/libdbus-1.so.3.33.0: undefined reference to `_dbus_message_iter_append_check'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
```
</details>
So I tried mucking around with `dbus/dbus-message.c` to see if I could resolve the problem:
```diff
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 19a43750..0999d54b 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -2675,7 +2675,7 @@ _dbus_message_iter_abandon_signature (DBusMessageRealIter *real)
dbus_free (str);
}
-#ifndef DBUS_DISABLE_CHECKS
+#if defined(DBUS_DISABLE_CHECKS)
static dbus_bool_t
_dbus_message_iter_append_check (DBusMessageRealIter *iter)
{
```
This solves the build error in my particular case, but then it fails to compile with exact the same error when no special options are given to CMake at configure time (so `DBUS_DISABLE_CHECKS` is `OFF`).
So at this point I'm not sure how to solve this; I also tried using the `DBUS_ENABLE_CHECKS` variable, to no avail.
Happy to provide more details if required.https://gitlab.freedesktop.org/dbus/dbus/-/issues/413CVE-2022-42011: dbus-daemon can be crashed by messages with array length inco...2023-01-19T15:38:24ZEvgeny VereshchaginCVE-2022-42011: dbus-daemon can be crashed by messages with array length inconsistent with element type## To reproduce
It can be reproduced on Debian Bookworm with `dbus-daemon-1.14.0-2` by running the following command as a non-root user:
```sh
cat <<'EOL' | xxd -ps -r | ncat -U /run/dbus/system_bus_socket
00415554482045585445524e414c0...## To reproduce
It can be reproduced on Debian Bookworm with `dbus-daemon-1.14.0-2` by running the following command as a non-root user:
```sh
cat <<'EOL' | xxd -ps -r | ncat -U /run/dbus/system_bus_socket
00415554482045585445524e414c0d0a444154410d0a424547494e0d0a6c
40ff0100000000f60059df18010000521161286128797979797979797929
796174290000010000d800000000000000016f5d00000000000001560244
7265656465736b000017f60059df20dfff09a9116120612879717900d842
e92f6f726765656420202020202020200020202020202020202020202020
202020202020b00024000000000000e6dfdfdf2020202065000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000028757987ff27b5e9d90100005e304b7900016f
2d5d67446f724444726565640017656b7300f60059ffa911612061287971
fd7eeeff010000000000001067c8c8c8c8c8c8c801000000000000050000
000000faff0000000000000000000000001200000000000000
EOL
```
## Expected result
`dbus-daemon` shouldn't crash.
## Actual result
```sh
==29956== Invalid read of size 8
==29956== at 0x4888CF4: UnknownInlinedFun (byteswap.h:73)
==29956== by 0x4888CF4: _dbus_marshal_read_basic (dbus-marshal-basic.c:582)
==29956== by 0x48738DC: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2612)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x4873BD7: _dbus_type_writer_write_reader_partial.isra.0 (dbus-marshal-recursive.c:2698)
==29956== by 0x4873D17: replacement_block_replace (dbus-marshal-recursive.c:1197)
==29956== by 0x4873EDD: _dbus_type_reader_delete (dbus-marshal-recursive.c:1434)
==29956== by 0x4871F43: _dbus_header_remove_unknown_fields (dbus-marshal-header.c:1559)
==29956== Address 0x5005300 is 0 bytes after a block of size 608 alloc'd
==29956== at 0x484582F: realloc (vg_replace_malloc.c:1437)
==29956== by 0x4889454: reallocate_for_length (dbus-string.c:397)
==29956== by 0x4889454: set_length (dbus-string.c:438)
==29956== by 0x4871F30: reserve_header_padding (dbus-marshal-header.c:100)
==29956== by 0x4871F30: _dbus_header_remove_unknown_fields (dbus-marshal-header.c:1556)
==29956== by 0x11FA4F: bus_dispatch (dispatch.c:293)
==29956== by 0x11FA4F: bus_dispatch_message_filter (dispatch.c:559)
==29956== by 0x486C9C6: dbus_connection_dispatch (dbus-connection.c:4703)
==29956== by 0x486C9C6: dbus_connection_dispatch (dbus-connection.c:4574)
==29956== by 0x12BE98: _dbus_loop_dispatch (dbus-mainloop.c:532)
==29956== by 0x12BE98: _dbus_loop_dispatch (dbus-mainloop.c:513)
==29956== by 0x12BE98: _dbus_loop_iterate (dbus-mainloop.c:862)
==29956== by 0x12C274: _dbus_loop_run (dbus-mainloop.c:888)
==29956== by 0x112C99: main (main.c:750)
==29956==
==29956==
==29956== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==29956== Access not within mapped region at address 0x5356000
==29956== at 0x4888CF4: UnknownInlinedFun (byteswap.h:73)
==29956== by 0x4888CF4: _dbus_marshal_read_basic (dbus-marshal-basic.c:582)
==29956== by 0x48738DC: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2612)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x48737E6: writer_write_reader_helper.isra.0 (dbus-marshal-recursive.c:2526)
==29956== by 0x4873BD7: _dbus_type_writer_write_reader_partial.isra.0 (dbus-marshal-recursive.c:2698)
==29956== by 0x4873D17: replacement_block_replace (dbus-marshal-recursive.c:1197)
==29956== by 0x4873EDD: _dbus_type_reader_delete (dbus-marshal-recursive.c:1434)
==29956== by 0x4871F43: _dbus_header_remove_unknown_fields (dbus-marshal-header.c:1559)
```
[I've edited the title of this issue report to clarify the scope of the initial issue reported by @evverx and distinguish it from #418. -@smcv]https://gitlab.freedesktop.org/dbus/dbus/-/issues/414CI build failure on windows-meson-vs15-x86: TAP output corrupted by GLib deb...2022-09-12T19:13:55ZSimon McVittieCI build failure on windows-meson-vs15-x86: TAP output corrupted by GLib debug messagesJob [#26982525](https://gitlab.freedesktop.org/dbus/dbus/-/jobs/26982525) failed for 031c2b1332689847af24706fb63a1147d9e06cce:
```
13/19 dbus:dbus / fdpass ERROR 0.45s 3 subtests passed
```
caused by:
```
...
ok 7...Job [#26982525](https://gitlab.freedesktop.org/dbus/dbus/-/jobs/26982525) failed for 031c2b1332689847af24706fb63a1147d9e06cce:
```
13/19 dbus:dbus / fdpass ERROR 0.45s 3 subtests passed
```
caused by:
```
...
ok 7 /too-many/split # SKIP fd-passing not supported on this platform
# End of too-many tests
# GLib-GIO-DEBUG: Unable to get UWP apps: RoActivateInstance() failed with code 0x8007007e
# GLib-GIO-DEBUG: Collecting capable appnames: 0ms
# Allocating hashtables:...... 0ms
# Start of flood tests
# Reading capable apps: 0ms
ok 8 /flood/1# Reading URL associations:... 0ms
# Reading extension assocs: 0ms
# SKIP fd-passing not supported on this platform
# Reading exe-only apps:...... 15ms
# Reading classes: 266ms
ok 9 /flood/half-limit# Reading UWP apps: 31ms
# Postprocessing:..............0ms
# TOTAL: 312ms
# SKIP fd-passing not supported on this platform
...
stderr:
TAP parsing error: unexpected input at line 25
```
What seems to be happening here is that GLib debug messages for `GWin32AppInfo` are coming out from a background thread and interleaving with the machine-readable TAP output from the main thread, causing the machine-readable TAP stuff to be corrupted.
This wasn't a problem with Autotools, which has a more permissive TAP parser, but Meson parses TAP more strictly.
Because GLib reports test failure in two ways (TAP `not ok` or `Bail out!`, and also a nonzero exit status), we could probably work around this by using `protocol : exitcode` instead of `protocol : tap` in Windows builds. That means we'll get less good status and error reporting on Windows, but that's a lesser evil than CI failures.
/cc @elmarco @rhabackerSimon McVittieSimon McVittiehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/415Clarify combined license notices2023-01-10T08:37:29ZPhilippe OmbredanneClarify combined license noticesIn https://gitlab.freedesktop.org/dbus/dbus/-/blob/ffbf053e2a18163bc14c1ac42f2ae2f28d707fa8/bus/activation.c#L8 and a few other files under bus there is a possibly confusing license notice for both AFL and GPL with no clear expression of...In https://gitlab.freedesktop.org/dbus/dbus/-/blob/ffbf053e2a18163bc14c1ac42f2ae2f28d707fa8/bus/activation.c#L8 and a few other files under bus there is a possibly confusing license notice for both AFL and GPL with no clear expression of how they relate:
```
* Licensed under the Academic Free License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
[...]
```
My default approach is to report this as licensed under "AFL-2.1 AND GPL-2.0-or-later" ... which is the safe approach but this may not be correct.
Can you clarify which are the licenses that really apply? Both? or is this an OR? This would be great to clarify with an expression as plar of https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/304
I found this while running a routine license scan with scancode-toolkit
There are about ~200 other files in the same not-entirely-crystal-clear casehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/416Change default session bus listen address from tmpdir (abstract) to dir (path...2022-10-05T13:49:01ZSimon McVittieChange default session bus listen address from tmpdir (abstract) to dir (path-based) for better interop with sandboxesOn Linux, there are two categories of `AF_UNIX` socket: abstract and path-based.
Path-based sockets are the same as the `AF_UNIX` sockets on non-Linux platforms like *BSD. They behave a lot like files: sandboxing/container frameworks ca...On Linux, there are two categories of `AF_UNIX` socket: abstract and path-based.
Path-based sockets are the same as the `AF_UNIX` sockets on non-Linux platforms like *BSD. They behave a lot like files: sandboxing/container frameworks can choose to share them, or not, as they wish (just like any other file, including devices, fifos and other pseudo-files). The main down-side of a path-based socket is that it isn't automatically cleaned up when there is no longer a process listening on it, but we already have code to clean up path-based sockets when the dbus-daemon or another `DBusServer` terminates gracefully (and we already rely on that code for non-Linux platforms like *BSD, which don't have abstract sockets at all).
Abstract sockets behave like TCP, but with an arbitrary string instead of an IP address and port. Confusingly, the way they're used in dbus, the arbitrary string looks like a path (but it isn't). If a sandboxed/containerized application shares the network namespace with the host system, then it can access any abstract socket, which is often a potential sandbox escape. Conversely, because the abstract socket doesn't exist at the filesystem level, if a sandboxed/containerized application *doesn't* share the network namespace with the host system, the sandboxing/container framework can't bind-mount it into the container if sharing it is desirable.
This is particularly problematic for the well-known D-Bus session bus: if a sandboxed application can connect to the well-known D-Bus session bus, then that's a sandbox escape. Unfortunately, for historical reasons, our default listening address for a session bus started by `dbus-launch` or `dbus-user-session` is `unix:tmpdir=/tmp` which prefers to use an abstract socket.
On Linux systems with `systemd --user` that configure dbus with `--enable-user-session` (such as Arch, and Debian/Ubuntu with the default `dbus-user-session` package), the session bus listens on a path-based socket and there is usually no problem - unless you run `dbus-launch` or `dbus-run-session` manually.
Similarly, on non-Linux systems, there is no problem, because abstract sockets don't exist.
The systems where this *is* a problem are Linux systems where either a non-systemd init system is in use, or the distro or sysadmin has explicitly disabled the user bus and enabled the traditional per-X11-display session bus (for example removing `dbus-user-bus` and installing `dbus-x11` on Debian/Ubuntu), or the user has explicitly run `dbus-launch` or `dbus-run-session`.
I think we should seriously consider changing the default listening address for the session bus to `unix:dir=/tmp`, which was added in dbus 1.12.x (the oldest supported branch of dbus) and always uses path-based sockets.
If distributions want to do this "early" or in a branch where this change has not been made, they can configure with `--with-dbus-session-bus-listen-address=unix:dir=/tmp`.
/cc @thiago @mcatanzarohttps://gitlab.freedesktop.org/dbus/dbus/-/issues/417CVE-2022-42012: `_dbus_marshal_byteswap` doesn't process fds in messages with...2023-01-19T15:38:24ZEvgeny VereshchaginCVE-2022-42012: `_dbus_marshal_byteswap` doesn't process fds in messages with "foreign" endianness correctly## To reproduce
`dbus-daemon` can be crashed on a big-endian s390x VM by running the following command:
```sh
cat <<'EOL' | xxd -p -r | ncat -U /run/dbus/system_bus_socket
00415554482045585445524e414c0d0a444154410d0a4e45474f54494154
455...## To reproduce
`dbus-daemon` can be crashed on a big-endian s390x VM by running the following command:
```sh
cat <<'EOL' | xxd -p -r | ncat -U /run/dbus/system_bus_socket
00415554482045585445524e414c0d0a444154410d0a4e45474f54494154
455f554e49585f46440d0a424547494e0d0a6c0100010000000001000000
6e00000001016f00150000002f6f72672f667265656465736b746f702f44
42757300000002017300140000006f72672e667265656465736b746f702e
444275730000000006017300140000006f72672e667265656465736b746f
702e4442757300000000030173000500000048656c6c6f0000006c010001
40000000030000008400000001016f00150000002f6f72672f6672656564
65736b746f702f44427573000000020173001f0000006f72672e66726565
6465736b746f702e444275732e50726f7065727469657300060173001400
00006f72672e667265656465736b746f702e444275730000000008016700
037373760000000000000000030173000300000053657400000000001400
00006f72672e667265656465736b746f702e444275730000000008000000
46656174757265730005286861732900ffffff7f08000000030000006865
7900
EOL
```
```
00000000 00 41 55 54 48 20 45 58 54 45 52 4e 41 4c 0d 0a |.AUTH EXTERNAL..|
00000010 44 41 54 41 0d 0a 4e 45 47 4f 54 49 41 54 45 5f |DATA..NEGOTIATE_|
00000020 55 4e 49 58 5f 46 44 0d 0a 42 45 47 49 4e 0d 0a |UNIX_FD..BEGIN..|
00000030 6c 01 00 01 00 00 00 00 01 00 00 00 6e 00 00 00 |l...........n...|
00000040 01 01 6f 00 15 00 00 00 2f 6f 72 67 2f 66 72 65 |..o...../org/fre|
00000050 65 64 65 73 6b 74 6f 70 2f 44 42 75 73 00 00 00 |edesktop/DBus...|
00000060 02 01 73 00 14 00 00 00 6f 72 67 2e 66 72 65 65 |..s.....org.free|
00000070 64 65 73 6b 74 6f 70 2e 44 42 75 73 00 00 00 00 |desktop.DBus....|
00000080 06 01 73 00 14 00 00 00 6f 72 67 2e 66 72 65 65 |..s.....org.free|
00000090 64 65 73 6b 74 6f 70 2e 44 42 75 73 00 00 00 00 |desktop.DBus....|
000000a0 03 01 73 00 05 00 00 00 48 65 6c 6c 6f 00 00 00 |..s.....Hello...|
000000b0 6c 01 00 01 40 00 00 00 03 00 00 00 84 00 00 00 |l...@...........|
000000c0 01 01 6f 00 15 00 00 00 2f 6f 72 67 2f 66 72 65 |..o...../org/fre|
000000d0 65 64 65 73 6b 74 6f 70 2f 44 42 75 73 00 00 00 |edesktop/DBus...|
000000e0 02 01 73 00 1f 00 00 00 6f 72 67 2e 66 72 65 65 |..s.....org.free|
000000f0 64 65 73 6b 74 6f 70 2e 44 42 75 73 2e 50 72 6f |desktop.DBus.Pro|
00000100 70 65 72 74 69 65 73 00 06 01 73 00 14 00 00 00 |perties...s.....|
00000110 6f 72 67 2e 66 72 65 65 64 65 73 6b 74 6f 70 2e |org.freedesktop.|
00000120 44 42 75 73 00 00 00 00 08 01 67 00 03 73 73 76 |DBus......g..ssv|
00000130 00 00 00 00 00 00 00 00 03 01 73 00 03 00 00 00 |..........s.....|
00000140 53 65 74 00 00 00 00 00 14 00 00 00 6f 72 67 2e |Set.........org.|
00000150 66 72 65 65 64 65 73 6b 74 6f 70 2e 44 42 75 73 |freedesktop.DBus|
00000160 00 00 00 00 08 00 00 00 46 65 61 74 75 72 65 73 |........Features|
00000170 00 05 28 68 61 73 29 00 ff ff ff 7f 08 00 00 00 |..(has).........|
00000180 03 00 00 00 68 65 79 00 |....hey.|
00000188
```
## Actual result
```sh
==35712== Invalid read of size 4
==35712== at 0x4875D38: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:66)
==35712== by 0x4875F5F: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:123)
==35712== by 0x4875DD9: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:187)
==35712== by 0x4875E77: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:174)
==35712== by 0x4875FE9: _dbus_marshal_byteswap (dbus-marshal-byteswap.c:240)
==35712== by 0x487A287: _dbus_message_byteswap (dbus-message.c:202)
==35712== by 0x487ACAB: _dbus_message_iter_init_common (dbus-message.c:2087)
==35712== by 0x487ACAB: dbus_message_iter_init (dbus-message.c:2130)
==35712== by 0x1230CD: bus_driver_handle_set (driver.c:3431)
==35712== by 0x125611: bus_driver_handle_message (driver.c:3118)
==35712== by 0x121333: bus_dispatch (dispatch.c:403)
==35712== by 0x121333: bus_dispatch_message_filter (dispatch.c:559)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4703)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4574)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:532)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:513)
==35712== by 0x12E05F: _dbus_loop_iterate (dbus-mainloop.c:862)
==35712== Address 0x502b65c is 28 bytes after a block of size 480 in arena "client"
==35712==
==35712== Invalid write of size 4
==35712== at 0x4875D44: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:91)
==35712== by 0x4875F5F: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:123)
==35712== by 0x4875DD9: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:187)
==35712== by 0x4875E77: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:174)
==35712== by 0x4875FE9: _dbus_marshal_byteswap (dbus-marshal-byteswap.c:240)
==35712== by 0x487A287: _dbus_message_byteswap (dbus-message.c:202)
==35712== by 0x487ACAB: _dbus_message_iter_init_common (dbus-message.c:2087)
==35712== by 0x487ACAB: dbus_message_iter_init (dbus-message.c:2130)
==35712== by 0x1230CD: bus_driver_handle_set (driver.c:3431)
==35712== by 0x125611: bus_driver_handle_message (driver.c:3118)
==35712== by 0x121333: bus_dispatch (dispatch.c:403)
==35712== by 0x121333: bus_dispatch_message_filter (dispatch.c:559)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4703)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4574)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:532)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:513)
==35712== by 0x12E05F: _dbus_loop_iterate (dbus-mainloop.c:862)
==35712== Address 0x502b65c is 28 bytes after a block of size 480 in arena "client"
==35712==
==35712==
==35712== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==35712== Access not within mapped region at address 0x2504B000
==35712== at 0x4875D38: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:66)
==35712== by 0x4875F5F: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:123)
==35712== by 0x4875DD9: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:187)
==35712== by 0x4875E77: byteswap_body_helper.isra.0 (dbus-marshal-byteswap.c:174)
==35712== by 0x4875FE9: _dbus_marshal_byteswap (dbus-marshal-byteswap.c:240)
==35712== by 0x487A287: _dbus_message_byteswap (dbus-message.c:202)
==35712== by 0x487ACAB: _dbus_message_iter_init_common (dbus-message.c:2087)
==35712== by 0x487ACAB: dbus_message_iter_init (dbus-message.c:2130)
==35712== by 0x1230CD: bus_driver_handle_set (driver.c:3431)
==35712== by 0x125611: bus_driver_handle_message (driver.c:3118)
==35712== by 0x121333: bus_dispatch (dispatch.c:403)
==35712== by 0x121333: bus_dispatch_message_filter (dispatch.c:559)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4703)
==35712== by 0x487017F: dbus_connection_dispatch (dbus-connection.c:4574)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:532)
==35712== by 0x12E05F: _dbus_loop_dispatch (dbus-mainloop.c:513)
==35712== by 0x12E05F: _dbus_loop_iterate (dbus-mainloop.c:862)
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/418CVE-2022-42010: dbus-daemon crashes when receiving message with incorrectly n...2023-01-19T15:38:23ZSimon McVittieCVE-2022-42010: dbus-daemon crashes when receiving message with incorrectly nested parentheses and curly brackets@evverx discovered that dbus-daemon and other uses of DBusServer can be crashed by sending a message containing a type-signature in which parentheses (`()`, struct/tuple) and curly brackets (`{}`, dict-entry) are incorrectly nested.
Thi...@evverx discovered that dbus-daemon and other uses of DBusServer can be crashed by sending a message containing a type-signature in which parentheses (`()`, struct/tuple) and curly brackets (`{}`, dict-entry) are incorrectly nested.
This was originally reported in [a comment on #413](https://gitlab.freedesktop.org/dbus/dbus/-/issues/413#note_1547169), but it is not really related to #413, except that they are both denial-of-service vulnerabilities.
Here is a hex-dump of a reproducer that @evverx provided:
```
$ xxd -ps minimized-from-e1f55a417825f05084b88a0aae8525e0fbb07075
6c8f2801000000007b22000818000000fd152874617b79617b64617b7961
7b7961717d7d7d297d0000000000000000000c0000000000000000000000
00000000feff0000
```
which contains invalid signature `(ta{ya{da{ya{yaq}}})}`. A more minimal reproducer would be `(a{xy)}`.Simon McVittieSimon McVittiehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/419HAVE_MONOTONIC_CLOCK on macOS2022-10-06T18:54:15ZJordan WilliamsHAVE_MONOTONIC_CLOCK on macOSI believe I'm hitting a related issue on macOS. I notice that it is possible to build dbus 1.15.0 on macOS with CMake, but not with Meson. I believe this has to do with `HAVE_MONOTONIC_CLOCK` being defined in Meson on macOS. I didn't see...I believe I'm hitting a related issue on macOS. I notice that it is possible to build dbus 1.15.0 on macOS with CMake, but not with Meson. I believe this has to do with `HAVE_MONOTONIC_CLOCK` being defined in Meson on macOS. I didn't see the option in any CMake-related files, which is probably why compilation was previously successful on macOS.
Here's the snippet of the build failure. The full log is available [here](https://c3i.jfrog.io/c3i/misc/logs/pr/13315/1-configs/macos-clang/dbus/1.15.0//719ea63d15174a8b73eee0f8aa0e2d8d40dfdcb6-build.txt).
```FAILED: dbus/libdbus-1.3.dylib.p/dbus-sysdeps-pthread.c.o
clang -Idbus/libdbus-1.3.dylib.p -Idbus -I../src/dbus -I. -I../src -fcolor-diagnostics -Wall -Winvalid-pch -O0 -g -D_GNU_SOURCE -fno-strict-aliasing -D__USE_MINGW_ANSI_STDIO=0 -fno-common -Wno-missing-field-initializers -Wno-unused-parameter -Warray-bounds -Wcast-align -Wchar-subscripts -Wdouble-promotion -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wformat=2 -Winit-self -Winline -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnull-dereference -Wpacked -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-sign -Wstrict-prototypes -isysroot /Applications/conan/xcode/13/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -arch x86_64 -Ddbus_1_EXPORTS -MD -MQ dbus/libdbus-1.3.dylib.p/dbus-sysdeps-pthread.c.o -MF dbus/libdbus-1.3.dylib.p/dbus-sysdeps-pthread.c.o.d -o dbus/libdbus-1.3.dylib.p/dbus-sysdeps-pthread.c.o -c ../src/dbus/dbus-sysdeps-pthread.c
../src/dbus/dbus-sysdeps-pthread.c:188:5: error: implicit declaration of function 'pthread_condattr_setclock' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);
^
../src/dbus/dbus-sysdeps-pthread.c:188:5: note: did you mean 'pthread_condattr_destroy'?
/Applications/conan/xcode/13/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/pthread.h:315:5: note: 'pthread_condattr_destroy' declared here
int pthread_condattr_destroy(pthread_condattr_t *);
^
1 error generated.
```
It appears that macOS does not provide a `pthread_condattr_setclock` function at all. Perhaps macOS requires using an alternative function?
See follow up on separate issue [here](https://gitlab.freedesktop.org/dbus/dbus/-/issues/9#note_1581124).
A new issue has been opened here.https://gitlab.freedesktop.org/dbus/dbus/-/issues/420Out-of-memory in dbus_message_demarshal() can be reported as InvalidArgs2023-01-19T15:38:23ZSimon McVittieOut-of-memory in dbus_message_demarshal() can be reported as InvalidArgsWhile resolving CVE-2022-42012 under embargo, I wrote a test-case that parses valid messages, including the one that triggered CVE-2022-42012 (which is unusual but technically valid).
Because we try to have the policy that out-of-memory...While resolving CVE-2022-42012 under embargo, I wrote a test-case that parses valid messages, including the one that triggered CVE-2022-42012 (which is unusual but technically valid).
Because we try to have the policy that out-of-memory conditions must be handled, I included our machinery for unit-testing what happens on OOM, and found a non-security bug:
```
/* TODO: Validity checking sometimes returns InvalidArgs for OOM */
if (dbus_error_has_name (&e, DBUS_ERROR_INVALID_ARGS) &&
!have_memory &&
strstr (e.message, "Out of memory") != NULL)
{
g_test_message ("Out of memory (not a problem)");
goto out;
}
```
Out-of-memory should always fail with `DBUS_ERROR_NO_MEMORY`, and not `DBUS_ERROR_INVALID_ARGS`.Simon McVittieSimon McVittiehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/421assertion failed "i == real->len || !DBUS_IS_ASCII_WHITE (real->str[i])" file...2023-06-06T17:21:20ZEvgeny Vereshchaginassertion failed "i == real->len || !DBUS_IS_ASCII_WHITE (real->str[i])" file "../dbus/dbus-string.c" line 1881 function _dbus_string_skip_blankI'm not sure whether this issue should be "confidential" or not but just in case I flipped the flag. Personally I don't think it's a vulnerability because it can be triggered with assertions enabled only and the assertion itself doesn't ...I'm not sure whether this issue should be "confidential" or not but just in case I flipped the flag. Personally I don't think it's a vulnerability because it can be triggered with assertions enabled only and the assertion itself doesn't seem to be correct in the sense that it seems `DBUS_IS_ASCII_BLANK` should be used there instead of `DBUS_IS_ASCII_WHITE`.
```sh
printf '\0 \rT\r\n' | ncat -U /run/dbus/system_bus_socket
```
```
assertion failed "i == real->len || !DBUS_IS_ASCII_WHITE (real->str[i])" file "../dbus/dbus-string.c" line 1881 function _dbus_string_skip_blank
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_print_backtrace+0x1f) [0x48bcc41]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_abort+0xd) [0x48b60c9]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_real_assert+0x4e) [0x48a9ce3]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_string_skip_blank+0x285) [0x48b3611]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(+0x1c43c) [0x487043c]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_auth_do_work+0x83) [0x4870a02]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_transport_try_to_authenticate+0x9d) [0x48a42fd]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(+0x4d618) [0x48a1618]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(+0x4e1c7) [0x48a21c7]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_transport_handle_watch+0xdb) [0x48a46b2]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(_dbus_connection_handle_watch+0xf2) [0x4875457]
/root/dbus/build/bus/../dbus/libdbus-1.so.3(dbus_watch_handle+0x164) [0x48a5ff5]
/root/dbus/build/bus/dbus-daemon(_dbus_loop_iterate+0x629) [0x144c8e]
/root/dbus/build/bus/dbus-daemon(_dbus_loop_run+0x76) [0x144e1d]
/root/dbus/build/bus/dbus-daemon(main+0xb4b) [0x119d2e]
/lib/x86_64-linux-gnu/libc.so.6(+0x2920a) [0x4a8720a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7c) [0x4a872bc]
/root/dbus/build/bus/dbus-daemon(_start+0x21) [0x118991]
==93640==
==93640== Process terminating with default action of signal 6 (SIGABRT): dumping core
==93640== at 0x4AE757C: __pthread_kill_implementation (pthread_kill.c:44)
==93640== by 0x4A9BA01: raise (raise.c:26)
==93640== by 0x4A86468: abort (abort.c:79)
==93640== by 0x48B6125: _dbus_abort (dbus-sysdeps.c:101)
==93640== by 0x48A9CE2: _dbus_real_assert (dbus-internals.c:1020)
==93640== by 0x48B3610: _dbus_string_skip_blank (dbus-string.c:1881)
==93640== by 0x487043B: process_command (dbus-auth.c:2297)
==93640== by 0x4870A01: _dbus_auth_do_work (dbus-auth.c:2559)
==93640== by 0x48A42FC: _dbus_transport_try_to_authenticate (dbus-transport.c:751)
==93640== by 0x48A1617: do_authentication (dbus-transport-socket.c:429)
==93640== by 0x48A21C6: socket_handle_watch (dbus-transport-socket.c:980)
==93640== by 0x48A46B1: _dbus_transport_handle_watch (dbus-transport.c:926)
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/422Sporadically error: arguments to dbus_message_unref() were incorrect with job...2022-10-12T11:08:54ZRalf HabackerSporadically error: arguments to dbus_message_unref() were incorrect with job windows vs15-64 cmakeJob [#29644336](https://gitlab.freedesktop.org/dbus/dbus/-/jobs/29644336) failed for b081c0a5538f87acbc4406c736db7f7317941d4c:
```
26: # Autolaunch handle initially 0000000000000000
26: # After attempting to connect: autolaunch handle i...Job [#29644336](https://gitlab.freedesktop.org/dbus/dbus/-/jobs/29644336) failed for b081c0a5538f87acbc4406c736db7f7317941d4c:
```
26: # Autolaunch handle initially 0000000000000000
26: # After attempting to connect: autolaunch handle is 0000000000000000
26: # Client connection succeeded - uses 'autolaunch:scope=A'
26: # Server returned bus address 'autolaunch:scope=A'
26: dbus[8672]: error: arguments to dbus_message_unref() were incorrect, assertion "message != NULL" failed in file C:\builds\dbus\dbus\dbus\dbus-message.c line 1737.
26: This is normally a bug in some application using the D-Bus library.
26:
26/33 Test #26: test-autolaunch-win ..............***Failed 0.87 sec
test 27
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/423Possible libdbus bug with arrays and org.freedesktop.DBus.ObjectManager2022-10-13T14:14:43ZRobert MiddletonPossible libdbus bug with arrays and org.freedesktop.DBus.ObjectManager
I think there is a bug with libdbus, at least when using the org.freedesktop.DBus.ObjectManager.GetManagedObjects method. I noticed this because my implementation of DBus(dbus-cxx) got a bug report about this method on the bluez daemo...
I think there is a bug with libdbus, at least when using the org.freedesktop.DBus.ObjectManager.GetManagedObjects method. I noticed this because my implementation of DBus(dbus-cxx) got a bug report about this method on the bluez daemon, which as far as I am aware uses libdbus.
The problem(at least with the message that I was given in order to reproduce a bug) is that the number of bytes that the returned array contains is 4 bytes shorter than the size defined in the header of the message. This does not seem to cause any issues with libdbus(and was not the cause of any problems with my code), but it doesn't seem to be correct.
Here's a partial dump of the message:
```
uint8_t packet_bytes[] = {
0x6c, 0x02, 0x01, 0x01, 0x50, 0x05, 0x00, 0x00, <-- message length = 0x550
0x51, 0x09, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
0x06, 0x01, 0x73, 0x00, 0x06, 0x00, 0x00, 0x00,
0x3a, 0x31, 0x2e, 0x33, 0x34, 0x37, 0x00, 0x00,
0x05, 0x01, 0x75, 0x00, 0x06, 0x00, 0x00, 0x00,
0x08, 0x01, 0x67, 0x00, 0x0d, 0x61, 0x7b, 0x6f,
0x61, 0x7b, 0x73, 0x61, 0x7b, 0x73, 0x76, 0x7d,
0x7d, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x01, 0x73, 0x00, 0x04, 0x00, 0x00, 0x00,
0x3a, 0x31, 0x2e, 0x36, 0x00, 0x00, 0x00, 0x00,
0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, <--- start of message data, length of array = 0x548
```
I would expect that the length of the array would be 0x550-0x4 = 0x54C instead of 0x548.
(reporting privately as I am not sure if this could be exploited at all - I don't know enough about security to prove this one way or another)https://gitlab.freedesktop.org/dbus/dbus/-/issues/425Failure in test-apparmor-activation2023-01-03T19:02:56ZWalter LozanoFailure in test-apparmor-activationAfter the change https://gitlab.freedesktop.org/dbus/dbus/-/commit/6e48c3175c52ac213e57383b499c7078931975f9 the test-apparmor-activation fails with message:
```
# Attempting to load AppArmor profiles
# random seed: R02Sbcd18f624dc966d34...After the change https://gitlab.freedesktop.org/dbus/dbus/-/commit/6e48c3175c52ac213e57383b499c7078931975f9 the test-apparmor-activation fails with message:
```
# Attempting to load AppArmor profiles
# random seed: R02Sbcd18f624dc966d345725ca2b932474f
1..10
# Start of sd-activation tests
dbus-daemon[914]: Failed to start message bus: Failed to bind socket "/tmp/dbus-BwlN20QQe1": Permission denied
```
Most likely the rules `test/data/dbus-installed-tests.aaprofile.in` should be updated to use not abstract sockets.https://gitlab.freedesktop.org/dbus/dbus/-/issues/427The official document does not describe how to process abnormal function inpu...2022-12-02T12:49:45ZhongjinghaoThe official document does not describe how to process abnormal function input parameters.Something cause dbus_server_listen() to return server which is null. And then the coredump appearance after the program call dbus_server_get_address().
Is it too strictly? Because i want to process the error instead of coredump.
Also th...Something cause dbus_server_listen() to return server which is null. And then the coredump appearance after the program call dbus_server_get_address().
Is it too strictly? Because i want to process the error instead of coredump.
Also there is nothing to tell me that the function will occur coredump. I find the offical description is from https://dbus.freedesktop.org/doc/api/html/group__DBusServer.html#ga63a133dc2786afed48c87127baa96927 . I think we should call users that the function will occur coredump when using "null" serverhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/429A clean way to disable dbus in the context of a process2023-01-05T21:21:35ZvaloqA clean way to disable dbus in the context of a processIn some cases, an application may want to prevent a connection to dbus without being able to change the connection attempt itself.
This could be in case an admin wants to temporarily disable the use of dbus for a specific application as ...In some cases, an application may want to prevent a connection to dbus without being able to change the connection attempt itself.
This could be in case an admin wants to temporarily disable the use of dbus for a specific application as a workaround for an issue or because an application uses a feature that automatically uses dbus without having the option to disable it.
Currently I am looking at the second case in the context of building a native sandbox for zathura and this brings some unexpected challenges since gtk by default initiates a dbus connection that is available inside the sandbox. Details: https://git.pwmt.org/pwmt/zathura/-/merge_requests/65
GTK does not provide a way to disable their native dbus, but they also don't mind if the connection is blocked like flatpak does: https://gitlab.gnome.org/GNOME/gtk/-/issues/4842
The only way to block this without starting the whole process inside a container that isolates the socket path and network namespace seems to be to set the session bus address to an invalid path like this: https://git.pwmt.org/pwmt/zathura/-/merge_requests/65/diffs
In order to allow for a clean solution to this problem, it would be great to have a way to disable the dbus connection attempt through an intended mechanic that is also more reliable that using environment variables.
Thank you.https://gitlab.freedesktop.org/dbus/dbus/-/issues/430_dbus_loop_iterate: Why isn't `timeout` defined as an integer data?2023-03-08T19:44:40ZXin Shi_dbus_loop_iterate: Why isn't `timeout` defined as an integer data?All places where `timeout` is used can be represented as an integer data type, and some places even require it, such as the _dbus_pollable_set_poll function.
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-mainloop.c#L5...All places where `timeout` is used can be represented as an integer data type, and some places even require it, such as the _dbus_pollable_set_poll function.
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-mainloop.c#L578
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-mainloop.c#L663
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-pollable-set.h#L106https://gitlab.freedesktop.org/dbus/dbus/-/issues/431socket_handle_watch: break when `found` is TRUE in server2023-01-03T10:47:17ZXin Shisocket_handle_watch: break when `found` is TRUE in server`found` has no other use here. Do we just break when `found` is `TRUE`?
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-server-socket.c#L175
``` C
#ifndef DBUS_DISABLE_ASSERT
for (i = 0 ; i < socket_server->n_fds ; i...`found` has no other use here. Do we just break when `found` is `TRUE`?
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-server-socket.c#L175
``` C
#ifndef DBUS_DISABLE_ASSERT
for (i = 0 ; i < socket_server->n_fds ; i++)
{
if (socket_server->watch[i] == watch) {
found = TRUE;
break;
}
}
_dbus_assert (found);
#endif
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/433Can't get match rules for my user's session bus2022-12-14T20:16:43Zjamie campbellCan't get match rules for my user's session busTo reproduce:
call GetAllMatchRules.py as a regular user.
Expected result:
Match rule information
Actual result:
GetConnectionMatchRules failed: did you enable the Stats interface?
Additional context:
I modified GetAllMatchRules.p...To reproduce:
call GetAllMatchRules.py as a regular user.
Expected result:
Match rule information
Actual result:
GetConnectionMatchRules failed: did you enable the Stats interface?
Additional context:
I modified GetAllMatchRules.py to provide additional information at which point I get
GetConnectionMatchRules failed: did you enable the Stats interface?: org.freedesktop.DBus.Error.AccessDenied: The caller does not have the necessary privileged to call this method
I also tried calling it as root, and it does provide information, so it's not a problem of it not having been enabled at all.
bus/example-session-disable-stats.conf.in claims that " If the Stats interface was enabled at compile-time, users can use it on the session bus by default. Systems providing isolation of processes with LSMs might want to restrict this. This can be achieved by copying this file in @EXPANDED_SYSCONFDIR@/dbus-1/session.d/ ". However, no such explicit disabling has occurred.
I even tried getting silly and commenting out all denies, for everything, and doing a reload, but the same problem occurs.https://gitlab.freedesktop.org/dbus/dbus/-/issues/434meson setup error: ERROR: Value "thread,undefined" (of type "string") for com...2023-01-11T15:39:26ZRalf Habackermeson setup error: ERROR: Value "thread,undefined" (of type "string") for combo option "Code sanitizer to use" is not one of the choicesBuilding recent dbus source from master branch with meson on linux with thread sanitizer enabled as requested at https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/379#note_1706809 fails with
```
meson setup -Db_pie=true -Db_sani...Building recent dbus source from master branch with meson on linux with thread sanitizer enabled as requested at https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/379#note_1706809 fails with
```
meson setup -Db_pie=true -Db_sanitize=thread,undefined -Dverbose_mode=true -Dembedded_tests=true -Dasserts=true -Dmodular_tests=enabled -Dducktype_docs=disabled --wrap=default /home/user/src/dbus
The Meson build system
Version: 0.61.4
Source dir: /home/user/src/dbus
Build dir: /home/user/src/dbus-1/ci-meson-build-tsan
Build type: native build
Project name: dbus
Project version: 1.15.3
../meson.build:21:0: ERROR: Value "thread,undefined" (of type "string") for combo option "Code sanitizer to use" is not one of the choices. Possible choices are (as string): "none", "address", "thread", "undefined", "memory", "address,undefined".
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/436Lower test coverage with meson build system compared to autotools2023-08-15T12:27:53ZRalf HabackerLower test coverage with meson build system compared to autotoolsComparing the passed tests of the Meson build system with the Autotools build system, it can be seen that the Meson build system passed a significantly lower number of tests:
debian meson: https://gitlab.freedesktop.org/rhabacker/dbus/-...Comparing the passed tests of the Meson build system with the Autotools build system, it can be seen that the Meson build system passed a significantly lower number of tests:
debian meson: https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/34219656/raw
```sh
$ wget -O meson.log https://gitlab.freedesktop.org/dbus/dbus/-/jobs/34169738/raw
$ gawk 't = 1 && $1 == "Ok:" { print $2} $0 ~ /meson test/ { t = 1; }' meson.log
25
```
debian autotools production: https://gitlab.freedesktop.org/dbus/dbus/-/jobs/34169733/raw
```sh
$ wget -O autotools.log https://gitlab.freedesktop.org/dbus/dbus/-/jobs/34169733/raw
$ gawk '$0 ~ /PASS:/ && NF == 2 && $2 !~ /^dbus\// { print $0}' autotools.log | wc -l
37
```
For reference, I have added the corresponding number for the cmake build system:
debian cmake: https://gitlab.freedesktop.org/dbus/dbus/-/jobs/34169737/raw
```sh
$ wget -O cmake.log https://gitlab.freedesktop.org/dbus/dbus/-/jobs/34169737/raw
$ gawk '$0 ~ /tests passed,/ { print $0}' cmake.log
100% tests passed, 0 tests failed out of 39
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/439meson warning "add_languages is missing native: assuming languages are wanted...2023-08-15T14:27:35ZRalf Habackermeson warning "add_languages is missing native: assuming languages are wanted for both host and build" when cross compiling for WindowsWhen cross compiling dbus with meson for Windows on openSUSE/Leap meson prints the mentioned warning.
## To reproduce
Steps to reproduce the behavior:
1. install meson, expat and glib2 development for mingw
```sh
sudo zypper ar https:...When cross compiling dbus with meson for Windows on openSUSE/Leap meson prints the mentioned warning.
## To reproduce
Steps to reproduce the behavior:
1. install meson, expat and glib2 development for mingw
```sh
sudo zypper ar https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.4/windows%3Amingw%3Awin32.repo
sudo zypper install git mingw32-cross-gcc mingw32-libexpat-devel mingw32-glib2-devel mingw32-cross-meson ninja
```
2. checkout dbus source code
```sh
cd ~
git clone https://gitlab.freedesktop.org/dbus/dbus.git
```
3. build dbus
```sh
cd dbus
mingw32-meson build
```
## Actual result
meson print this warning
```sh
meson.build:93: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
```
## Expected result
The message should not appear
## Additional information
The same warning is printed when using the dbus provided build script in step 3:
cd dbus
builddir=dbus-meson-build ci_buildsys=meson ci_host=i686-w64-mingw32 tools/ci-build.shhttps://gitlab.freedesktop.org/dbus/dbus/-/issues/440CI-windows-meson-vs15-x86: meson does not support using C11 standard2023-01-11T14:29:35ZRalf HabackerCI-windows-meson-vs15-x86: meson does not support using C11 standard## To reproduce
When compiling dbus source with C11 standard for https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/377 on Windows meson reports the mentioned issue.
Steps to reproduce the behavior:
1. inspect gitlab CI build jo...## To reproduce
When compiling dbus source with C11 standard for https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/377 on Windows meson reports the mentioned issue.
Steps to reproduce the behavior:
1. inspect gitlab CI build job [windows-meson-vs15-x86](https://gitlab.freedesktop.org/rhabacker/dbus/-/jobs/34521696)
## Actual result
In the log there is printed:
```
meson.build:21:0: ERROR: Value "c11" (of type "string") for combo option "C language standard to use" is not one of the choices. Possible choices are (as string): "none", "c89", "c99", "gnu89", "gnu90", "gnu9x", "gnu99".
```
## Expected result
meson should be able to compile C sources with C11 standard.https://gitlab.freedesktop.org/dbus/dbus/-/issues/441dbus-daemon stuck in latest alpine image on AlmaLinux 9 Hosts2023-01-13T13:25:39ZDenis Schuldtdbus-daemon stuck in latest alpine image on AlmaLinux 9 HostsHi,
at the moment we have an issue with dbus running in lastest Alpine Docker image on Alma 9 Hosts. (I posted the issue in the Alpine Github repo at https://github.com/alpinelinux/docker-alpine/issues/295, too).
If we run the command ...Hi,
at the moment we have an issue with dbus running in lastest Alpine Docker image on Alma 9 Hosts. (I posted the issue in the Alpine Github repo at https://github.com/alpinelinux/docker-alpine/issues/295, too).
If we run the command dbus-daemon --session --fork the process utilizes 100% CPU on our host (please see attached image).
This is also reproducable with a simple dbus-daemon --version.
I tracked the behaviour down to dbus 1.14.x. It does not happen with dbus 1.12.x.
Do you have any idea how to debug this issue?
Thank you!
![210274348-a12adf82-a276-40d0-930c-9711b4566c2f](/uploads/5c6affd8982b15ea4c3a14e139c97d77/210274348-a12adf82-a276-40d0-930c-9711b4566c2f.png)https://gitlab.freedesktop.org/dbus/dbus/-/issues/442Differences in generated pkgconfig file between autotools and meson2023-08-07T12:44:37ZRalf HabackerDifferences in generated pkgconfig file between autotools and mesonAfter building dbus on openSUSE Leap/15.4 with autotools and meson, the generated pkgconfig file contains differences that are unclear whether they matter.
## How to reproduce
```sh
cd ~
sudo zypper install git
git clone https://gitlab....After building dbus on openSUSE Leap/15.4 with autotools and meson, the generated pkgconfig file contains differences that are unclear whether they matter.
## How to reproduce
```sh
cd ~
sudo zypper install git
git clone https://gitlab.freedesktop.org/dbus/dbus.git
cd dbus
ci_variant=debug ci_buildsys=meson tools/ci-install.sh
ci_variant=debug ci_buildsys=autotools tools/ci-install.sh
builddir=build-meson-debug ci_variant=debug ci_buildsys=meson tools/ci-build.sh
builddir=build-autotools-debug ci_variant=debug ci_buildsys=autotools tools/ci-build.sh
sort < build-meson-debug/meson-private/dbus-1.pc | uniq > meson.pc
sort < build-autotools-debug/dbus-1.pc | uniq > autotools.pc
diff -u autotools.pc meson.pc
--- autotools.pc 2023-01-12 09:09:50.196440493 +0100
+++ meson.pc 2023-01-12 09:09:50.196440493 +0100
@@ -1,21 +1,22 @@
-bindir=${exec_prefix}/bin
-Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include
+bindir=${prefix}/bin
+Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include
daemondir=${bindir}
-datadir=${datarootdir}
+datadir=${prefix}/share
datarootdir=${prefix}/share
Description: Free desktop message bus
exec_prefix=${prefix}
includedir=${prefix}/include
interfaces_dir=${datadir}/dbus-1/interfaces
-libdir=${exec_prefix}/lib64
+libdir=${prefix}/lib64
Libs: -L${libdir} -ldbus-1
-Libs.private: -lpthread -lsystemd
+Libs.private: -pthread
Name: dbus
original_prefix=/usr/local
-prefix=${original_prefix}
+prefix=/usr/local
+Requires.private: libsystemd >= 209
session_bus_services_dir=${datadir}/dbus-1/services
sysconfdir=${prefix}/etc
-system_bus_default_address=unix:path=/usr/local/var/run/dbus/system_bus_socket
+system_bus_default_address=unix:path=/var/local/run/dbus/system_bus_socket
system_bus_services_dir=${datadir}/dbus-1/system-services
Version: 1.15.3
```
## Additional information
[autotools:dbus-1.pc](/uploads/95c13417a9a9194ee64a0900a0d61de4/dbus-1.pc)
[meson:dbus-1.pc](/uploads/52589997d3368fe4ec3310460ca87c14/dbus-1.pc)https://gitlab.freedesktop.org/dbus/dbus/-/issues/443Remove autotools build support2023-09-01T16:06:11ZRalf HabackerRemove autotools build supportWith the introduction of the Meson build system, the Autotools build system should be removed to reduce the number of build system and CI jobs to be maintained.With the introduction of the Meson build system, the Autotools build system should be removed to reduce the number of build system and CI jobs to be maintained.https://gitlab.freedesktop.org/dbus/dbus/-/issues/444some .dtd urls of dbus have been expired2023-02-28T07:59:22ZXin Shisome .dtd urls of dbus have been expiredThere are some .dtd urls of dbus have been expired:
+ http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd ==> It is a little different from https://dbus.freedesktop.org/doc/introspect.dtd, and I'm changing it now.
+ http://www...There are some .dtd urls of dbus have been expired:
+ http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd ==> It is a little different from https://dbus.freedesktop.org/doc/introspect.dtd, and I'm changing it now.
+ http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd ==> 404 NOT FOUND, and I'm changing it to https://dbus.freedesktop.org/doc/busconfig.dtd now.
+ http://www.freedesktop.org/dbus/1.0/doc.dtd ==> 404 NOT FOUND, however, I can't find it in https://dbus.freedesktop.org/doc/. Please tell me which url to change it to.https://gitlab.freedesktop.org/dbus/dbus/-/issues/445CI build failure with meson build system on openSUSE - "getgrnam(): name not ...2023-03-08T19:44:40ZRalf HabackerCI build failure with meson build system on openSUSE - "getgrnam(): name not found: 'messagebus'"Building dbus with meson on openSUSE Leap 15.4 fails with the mentioned failure.
## To reproduce
To reproduce the issue run the following command on the mentioned linux distribution:
git clone https://gitlab.freedesktop.org/dbus/d...Building dbus with meson on openSUSE Leap 15.4 fails with the mentioned failure.
## To reproduce
To reproduce the issue run the following command on the mentioned linux distribution:
git clone https://gitlab.freedesktop.org/dbus/dbus.git
cd dbus
sudo docker run --network host -v $PWD:/mnt -it opensuse/leap:15.4 /bin/bash
builddir=../build-meson ci_buildsys=meson tools/ci-install.sh
builddir=../build-meson ci_buildsys=meson tools/ci-build.sh
## Actual result
```sh
Running custom install script '/usr/bin/python3 /mnt/doc/meson_post_install.py /build-meson/doc share/doc/dbus /build-meson/doc/api/qch/dbus-1.15.3.qch share/doc/dbus doc/api'
Running custom install script '/mnt/meson_post_install.py false'
--- stdout ---
--- stderr ---
Traceback (most recent call last):
File "/mnt/meson_post_install.py", line 105, in <module>
post_install_exe()
File "/mnt/meson_post_install.py", line 94, in post_install_exe
os.chown(exe_path, 0, grp.getgrnam(dbus_user).gr_gid)
KeyError: "getgrnam(): name not found: 'messagebus'"
FAILED: install script '/mnt/meson_post_install.py false' exit code 1, stopped
```
## Expected result
building should succeed without this error.https://gitlab.freedesktop.org/dbus/dbus/-/issues/446Data race in DBusCounter when accessing DBus api functions from different thr...2023-01-26T16:02:52ZRalf HabackerData race in DBusCounter when accessing DBus api functions from different threadsThe problems with the use of threads recorded with https://gitlab.freedesktop.org/dbus/dbus/-/issues/426 also include problems with data races, which are recorded or documented here.
Detailed call stacks are available at https://bugrep...The problems with the use of threads recorded with https://gitlab.freedesktop.org/dbus/dbus/-/issues/426 also include problems with data races, which are recorded or documented here.
Detailed call stacks are available at https://bugreports.qt.io/browse/QTBUG-108784, two of which are included here as examples.
<details>
<summary>Detailed call stack for data race related to _dbus_counter_adjust_size()</summary>
<pre>
WARNING: ThreadSanitizer: data race (pid=2392)
Write of size 8 at 0x7b18000039c8 by main thread (mutexes: write M180842226518074512):
#0 _dbus_counter_adjust_size ../dbus/dbus/dbus-resources.c:176 (libdbus-1.so.3+0x4d808)
#1 free_counter ../dbus/dbus/dbus-message.c:635 (libdbus-1.so.3+0x3eb32)
#2 _dbus_list_foreach ../dbus/dbus/dbus-list.c:798 (libdbus-1.so.3+0x64efb)
#3 dbus_message_cache_or_finalize ../dbus/dbus/dbus-message.c:662 (libdbus-1.so.3+0x3ebd4)
#4 dbus_message_unref ../dbus/dbus/dbus-message.c:1750 (libdbus-1.so.3+0x41c2e)
#5 q_dbus_message_unref /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:377 (libQt6DBus.so.6+0xc081d)
#6 QDBusMessagePrivate::~QDBusMessagePrivate() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusmessage.cpp:49 (libQt6DBus.so.6+0xc081d)
#7 QDBusMessage::~QDBusMessage() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusmessage.cpp:541 (libQt6DBus.so.6+0xc07dc)
#8 QDBusConnectionPrivate::getNameOwnerNoCache(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:2546 (libQt6DBus.so.6+0x883d0)
#9 QDBusConnectionPrivate::getNameOwner(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:2520 (libQt6DBus.so.6+0x8991e)
#10 QDBusAbstractInterfacePrivate::initOwnerTracking() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusabstractinterface.cpp:102 (libQt6DBus.so.6+0x3086c)
#11 QDBusAbstractInterface::QDBusAbstractInterface(QString const&, QString const&, char const*, QDBusConnection const&, QObject*) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusabstractinterface.cpp:308 (libQt6DBus.so.6+0x31943)
#12 QIBusProxy::QIBusProxy(QString const&, QString const&, QDBusConnection const&, QObject*) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp:23 (libibusplatforminputcontextplugin.so+0x29ade)
#13 QIBusPlatformInputContextPrivate::createBusProxy() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:637 (libibusplatforminputcontextplugin.so+0x1d2c4)
#14 QIBusPlatformInputContextPrivate::initBus() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:614 (libibusplatforminputcontextplugin.so+0x20b3b)
#15 QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:602 (libibusplatforminputcontextplugin.so+0x21b95)
#16 QIBusPlatformInputContext::QIBusPlatformInputContext() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:82 (libibusplatforminputcontextplugin.so+0x21d18)
#17 QIbusPlatformInputContextPlugin::create(QString const&, QList<QString> const&) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/main.cpp:31 (libibusplatforminputcontextplugin.so+0xc4ea)
#18 QPlatformInputContext* qLoadPlugin<QPlatformInputContext, QPlatformInputContextPlugin, QList<QString>&>(QFactoryLoader const*, QString const&, QList<QString>&) /home/linux/qt6_dev/qt6-build/include/QtCore/6.5.0/QtCore/private/../../../../../../qt6/qtbase/src/corelib/plugin/qfactoryloader_p.h:99 (libQt6Gui.so.6+0x295235)
#19 QPlatformInputContextFactory::create(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp:45 (libQt6Gui.so.6+0x294388)
#20 QXcbIntegration::initialize() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:343 (libQt6XcbQpa.so.6+0x9b16b)
#21 QGuiApplicationPrivate::eventDispatcherReady() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1503 (libQt6Gui.so.6+0x224c56)
#22 QCoreApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:824 (libQt6Core.so.6+0x1b07c5)
#23 QGuiApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1514 (libQt6Gui.so.6+0x22ad1f)
#24 QApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:466 (libQt6Widgets.so.6+0x194506)
#25 QApplication::QApplication(int&, char**, int) /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:454 (libQt6Widgets.so.6+0x194613)
#26 main /home/linux/qt6_dev/qt_tsan_tests_dev/qt_tsan_tests/main.cpp:8 (qt_tsan_tests+0x31c4)
Previous read of size 8 at 0x7b18000039c8 by thread T1 (mutexes: write M181123701494785360):
#0 _dbus_counter_get_size_value ../dbus/dbus/dbus-resources.c:276 (libdbus-1.so.3+0x4dcca)
#1 _dbus_transport_get_dispatch_status ../dbus/dbus/dbus-transport.c:1127 (libdbus-1.so.3+0x5cdf2)
#2 _dbus_transport_queue_messages ../dbus/dbus/dbus-transport.c:1173 (libdbus-1.so.3+0x5d0d3)
#3 _dbus_connection_get_dispatch_status_unlocked ../dbus/dbus/dbus-connection.c:4256 (libdbus-1.so.3+0x2ad9f)
#4 dbus_connection_dispatch ../dbus/dbus/dbus-connection.c:4589 (libdbus-1.so.3+0x2b5cd)
#5 q_dbus_connection_dispatch /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:176 (libQt6DBus.so.6+0x85c11)
#6 QDBusConnectionPrivate::doDispatch() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:1171 (libQt6DBus.so.6+0x85c11)
#7 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QDBusConnectionPrivate::*)()>::call(void (QDBusConnectionPrivate::*)(), QDBusConnectionPrivate*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:135 (libQt6DBus.so.6+0x8f187)
#8 void QtPrivate::FunctionPointer<void (QDBusConnectionPrivate::*)()>::call<QtPrivate::List<>, void>(void (QDBusConnectionPrivate::*)(), QDBusConnectionPrivate*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:172 (libQt6DBus.so.6+0x8f187)
#9 QtPrivate::QSlotObject<void (QDBusConnectionPrivate::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:383 (libQt6DBus.so.6+0x8f187)
#10 QtPrivate::QSlotObjectBase::call(QObject*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:363 (libQt6Core.so.6+0x23d247)
#11 QMetaCallEvent::placeMetaCall(QObject*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:608 (libQt6Core.so.6+0x23d247)
#12 QObject::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:1378 (libQt6Core.so.6+0x24562a)
#13 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1197 (libQt6Core.so.6+0x1a341e)
#14 doNotify /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1126 (libQt6Core.so.6+0x1a6843)
#15 QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1029 (libQt6Core.so.6+0x1a6a71)
#16 QCoreApplication::sendEvent(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1448 (libQt6Core.so.6+0x1a6b93)
#17 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1810 (libQt6Core.so.6+0x1abdc4)
#18 QCoreApplication::sendPostedEvents(QObject*, int) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1669 (libQt6Core.so.6+0x1abff7)
#19 postEventSourceDispatch /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:243 (libQt6Core.so.6+0x685bbe)
#20 g_main_dispatch ../glib/glib/gmain.c:3417 (libglib-2.0.so.0+0x8523f)
#21 g_main_context_dispatch ../glib/glib/gmain.c:4135 (libglib-2.0.so.0+0x8706a)
#22 g_main_context_iterate ../glib/glib/gmain.c:4211 (libglib-2.0.so.0+0x87354)
#23 g_main_context_iteration ../glib/glib/gmain.c:4276 (libglib-2.0.so.0+0x87464)
#24 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:393 (libQt6Core.so.6+0x684d34)
#25 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:100 (libQt6Core.so.6+0x1bd103)
#26 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:182 (libQt6Core.so.6+0x1bdff6)
#27 QThread::exec() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:578 (libQt6Core.so.6+0x3beebb)
#28 QDBusConnectionManager::run() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:123 (libQt6DBus.so.6+0x4bd52)
#29 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:321 (libQt6Core.so.6+0x4930fc)
#30 terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:257 (libQt6Core.so.6+0x493190)
#31 QThreadPrivate::start(void*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:280 (libQt6Core.so.6+0x4939f6)
Location is heap block of size 88 at 0x7b18000039c0 allocated by thread T1:
#0 calloc ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:672 (libtsan.so.0+0x31edc)
#1 dbus_malloc0 ../dbus/dbus/dbus-memory.c:563 (libdbus-1.so.3+0x67423)
#2 _dbus_counter_new ../dbus/dbus/dbus-resources.c:93 (libdbus-1.so.3+0x4d58c)
#3 _dbus_transport_init_base ../dbus/dbus/dbus-transport.c:127 (libdbus-1.so.3+0x5b11b)
#4 _dbus_transport_new_for_socket ../dbus/dbus/dbus-transport-socket.c:1328 (libdbus-1.so.3+0x5a58e)
#5 _dbus_transport_new_for_domain_socket ../dbus/dbus/dbus-transport-socket.c:1555 (libdbus-1.so.3+0x5ad2c)
#6 _dbus_transport_open_unix_socket ../dbus/dbus/dbus-transport-socket.c:1623 (libdbus-1.so.3+0x5af3b)
#7 _dbus_transport_open ../dbus/dbus/dbus-transport.c:397 (libdbus-1.so.3+0x5bb9a)
#8 connection_try_from_address_entry ../dbus/dbus/dbus-connection.c:1818 (libdbus-1.so.3+0x26a41)
#9 _dbus_connection_open_internal ../dbus/dbus/dbus-connection.c:1887 (libdbus-1.so.3+0x26ca2)
#10 dbus_connection_open_private ../dbus/dbus/dbus-connection.c:2670 (libdbus-1.so.3+0x280f9)
#11 q_dbus_connection_open_private /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:184 (libQt6DBus.so.6+0x52a70)
#12 QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:217 (libQt6DBus.so.6+0x52a70)
#13 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void, void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*)>::call(void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QDBusConnectionManager*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:135 (libQt6DBus.so.6+0x554fe)
#14 void QtPrivate::FunctionPointer<void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*)>::call<QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void>(void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QDBusConnectionManager*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:172 (libQt6DBus.so.6+0x554fe)
#15 QtPrivate::QSlotObject<void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:383 (libQt6DBus.so.6+0x554fe)
#16 QtPrivate::QSlotObjectBase::call(QObject*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:363 (libQt6Core.so.6+0x23d247)
#17 QMetaCallEvent::placeMetaCall(QObject*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:608 (libQt6Core.so.6+0x23d247)
#18 QObject::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:1378 (libQt6Core.so.6+0x24562a)
#19 QThread::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:1105 (libQt6Core.so.6+0x3bf12c)
#20 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1197 (libQt6Core.so.6+0x1a341e)
#21 doNotify /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1126 (libQt6Core.so.6+0x1a6843)
#22 QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1029 (libQt6Core.so.6+0x1a6a71)
#23 QCoreApplication::sendEvent(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1448 (libQt6Core.so.6+0x1a6b93)
#24 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1810 (libQt6Core.so.6+0x1abdc4)
#25 QCoreApplication::sendPostedEvents(QObject*, int) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1669 (libQt6Core.so.6+0x1abff7)
#26 postEventSourceDispatch /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:243 (libQt6Core.so.6+0x685bbe)
#27 g_main_dispatch ../glib/glib/gmain.c:3417 (libglib-2.0.so.0+0x8523f)
#28 g_main_context_dispatch ../glib/glib/gmain.c:4135 (libglib-2.0.so.0+0x8706a)
#29 g_main_context_iterate ../glib/glib/gmain.c:4211 (libglib-2.0.so.0+0x87354)
#30 g_main_context_iteration ../glib/glib/gmain.c:4276 (libglib-2.0.so.0+0x87464)
#31 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:393 (libQt6Core.so.6+0x684d34)
#32 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:100 (libQt6Core.so.6+0x1bd103)
#33 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:182 (libQt6Core.so.6+0x1bdff6)
#34 QThread::exec() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:578 (libQt6Core.so.6+0x3beebb)
#35 QDBusConnectionManager::run() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:123 (libQt6DBus.so.6+0x4bd52)
#36 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:321 (libQt6Core.so.6+0x4930fc)
#37 terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:257 (libQt6Core.so.6+0x493190)
#38 QThreadPrivate::start(void*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:280 (libQt6Core.so.6+0x4939f6)
Mutex M180842226518074512 is already destroyed.
Mutex M181123701494785360 is already destroyed.
Thread T1 'QDBusConnection' (tid=2394, running) created by main thread at:
#0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x605b8)
#1 QThread::start(QThread::Priority) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:707 (libQt6Core.so.6+0x491f6b)
#2 QDBusConnectionManager::QDBusConnectionManager() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:96 (libQt6DBus.so.6+0x4c931)
#3 innerFunction /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:40 (libQt6DBus.so.6+0x4f632)
#4 Holder /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:37 (libQt6DBus.so.6+0x4f632)
#5 instance /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:91 (libQt6DBus.so.6+0x4f632)
#6 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:73 (libQt6DBus.so.6+0x4f632)
#7 QDBusConnection::sessionBus() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:1133 (libQt6DBus.so.6+0x4f632)
#8 QGenericUnixServices::QGenericUnixServices() /home/linux/qt6_dev/qt6/qtbase/src/gui/platform/unix/qgenericunixservices.cpp:359 (libQt6Gui.so.6+0xb0a4cd)
#9 QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:99 (libQt6XcbQpa.so.6+0x9d6e9)
#10 QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbmain.cpp:22 (libqxcb.so+0x2490)
#11 QPlatformIntegration* qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin, QList<QString> const&, int&, char**&>(QFactoryLoader const*, QString const&, QList<QString> const&, int&, char**&) /home/linux/qt6_dev/qt6-build/include/QtCore/6.5.0/QtCore/private/../../../../../../qt6/qtbase/src/corelib/plugin/qfactoryloader_p.h:99 (libQt6Gui.so.6+0x2967d5)
#12 QPlatformIntegrationFactory::create(QString const&, QList<QString> const&, int&, char**, QString const&) /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qplatformintegrationfactory.cpp:23 (libQt6Gui.so.6+0x296513)
#13 init_platform /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1191 (libQt6Gui.so.6+0x220b92)
#14 QGuiApplicationPrivate::createPlatformIntegration() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1471 (libQt6Gui.so.6+0x224585)
#15 QGuiApplicationPrivate::createEventDispatcher() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1490 (libQt6Gui.so.6+0x224bdf)
#16 QApplicationPrivate::createEventDispatcher() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:140 (libQt6Widgets.so.6+0x1926ef)
#17 QCoreApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:815 (libQt6Core.so.6+0x1b07fc)
#18 QGuiApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1514 (libQt6Gui.so.6+0x22ad1f)
#19 QApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:466 (libQt6Widgets.so.6+0x194506)
#20 QApplication::QApplication(int&, char**, int) /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:454 (libQt6Widgets.so.6+0x194613)
#21 main /home/linux/qt6_dev/qt_tsan_tests_dev/qt_tsan_tests/main.cpp:8 (qt_tsan_tests+0x31c4)
SUMMARY: ThreadSanitizer: data race ../dbus/dbus/dbus-resources.c:176 in _dbus_counter_adjust_size
</pre>
</details>
<details>
<summary>Detailed call stack for data race related to _dbus_counter_adjust_unix_fd()</summary>
WARNING: ThreadSanitizer: data race (pid=2392)
Write of size 8 at 0x7b18000039d0 by main thread (mutexes: write M180842226518074512):
#0 _dbus_counter_adjust_unix_fd ../dbus/dbus/dbus-resources.c:245 (libdbus-1.so.3+0x4db1f)
#1 free_counter ../dbus/dbus/dbus-message.c:637 (libdbus-1.so.3+0x3eb64)
#2 _dbus_list_foreach ../dbus/dbus/dbus-list.c:798 (libdbus-1.so.3+0x64efb)
#3 dbus_message_cache_or_finalize ../dbus/dbus/dbus-message.c:662 (libdbus-1.so.3+0x3ebd4)
#4 dbus_message_unref ../dbus/dbus/dbus-message.c:1750 (libdbus-1.so.3+0x41c2e)
#5 q_dbus_message_unref /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:377 (libQt6DBus.so.6+0xc081d)
#6 QDBusMessagePrivate::~QDBusMessagePrivate() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusmessage.cpp:49 (libQt6DBus.so.6+0xc081d)
#7 QDBusMessage::~QDBusMessage() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusmessage.cpp:541 (libQt6DBus.so.6+0xc07dc)
#8 QDBusConnectionPrivate::getNameOwnerNoCache(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:2546 (libQt6DBus.so.6+0x883d0)
#9 QDBusConnectionPrivate::getNameOwner(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:2520 (libQt6DBus.so.6+0x8991e)
#10 QDBusAbstractInterfacePrivate::initOwnerTracking() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusabstractinterface.cpp:102 (libQt6DBus.so.6+0x3086c)
#11 QDBusAbstractInterface::QDBusAbstractInterface(QString const&, QString const&, char const*, QDBusConnection const&, QObject*) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusabstractinterface.cpp:308 (libQt6DBus.so.6+0x31943)
#12 QIBusProxy::QIBusProxy(QString const&, QString const&, QDBusConnection const&, QObject*) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp:23 (libibusplatforminputcontextplugin.so+0x29ade)
#13 QIBusPlatformInputContextPrivate::createBusProxy() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:637 (libibusplatforminputcontextplugin.so+0x1d2c4)
#14 QIBusPlatformInputContextPrivate::initBus() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:614 (libibusplatforminputcontextplugin.so+0x20b3b)
#15 QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:602 (libibusplatforminputcontextplugin.so+0x21b95)
#16 QIBusPlatformInputContext::QIBusPlatformInputContext() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:82 (libibusplatforminputcontextplugin.so+0x21d18)
#17 QIbusPlatformInputContextPlugin::create(QString const&, QList<QString> const&) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforminputcontexts/ibus/main.cpp:31 (libibusplatforminputcontextplugin.so+0xc4ea)
#18 QPlatformInputContext* qLoadPlugin<QPlatformInputContext, QPlatformInputContextPlugin, QList<QString>&>(QFactoryLoader const*, QString const&, QList<QString>&) /home/linux/qt6_dev/qt6-build/include/QtCore/6.5.0/QtCore/private/../../../../../../qt6/qtbase/src/corelib/plugin/qfactoryloader_p.h:99 (libQt6Gui.so.6+0x295235)
#19 QPlatformInputContextFactory::create(QString const&) /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp:45 (libQt6Gui.so.6+0x294388)
#20 QXcbIntegration::initialize() /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:343 (libQt6XcbQpa.so.6+0x9b16b)
#21 QGuiApplicationPrivate::eventDispatcherReady() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1503 (libQt6Gui.so.6+0x224c56)
#22 QCoreApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:824 (libQt6Core.so.6+0x1b07c5)
#23 QGuiApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1514 (libQt6Gui.so.6+0x22ad1f)
#24 QApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:466 (libQt6Widgets.so.6+0x194506)
#25 QApplication::QApplication(int&, char**, int) /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:454 (libQt6Widgets.so.6+0x194613)
#26 main /home/linux/qt6_dev/qt_tsan_tests_dev/qt_tsan_tests/main.cpp:8 (qt_tsan_tests+0x31c4)
Previous read of size 8 at 0x7b18000039d0 by thread T1 (mutexes: write M181123701494785360):
#0 _dbus_counter_get_unix_fd_value ../dbus/dbus/dbus-resources.c:288 (libdbus-1.so.3+0x4dd0d)
#1 _dbus_transport_get_dispatch_status ../dbus/dbus/dbus-transport.c:1128 (libdbus-1.so.3+0x5ce32)
#2 _dbus_transport_queue_messages ../dbus/dbus/dbus-transport.c:1173 (libdbus-1.so.3+0x5d0d3)
#3 _dbus_connection_get_dispatch_status_unlocked ../dbus/dbus/dbus-connection.c:4256 (libdbus-1.so.3+0x2ad9f)
#4 dbus_connection_dispatch ../dbus/dbus/dbus-connection.c:4589 (libdbus-1.so.3+0x2b5cd)
#5 q_dbus_connection_dispatch /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:176 (libQt6DBus.so.6+0x85c11)
#6 QDBusConnectionPrivate::doDispatch() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusintegrator.cpp:1171 (libQt6DBus.so.6+0x85c11)
#7 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QDBusConnectionPrivate::*)()>::call(void (QDBusConnectionPrivate::*)(), QDBusConnectionPrivate*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:135 (libQt6DBus.so.6+0x8f187)
#8 void QtPrivate::FunctionPointer<void (QDBusConnectionPrivate::*)()>::call<QtPrivate::List<>, void>(void (QDBusConnectionPrivate::*)(), QDBusConnectionPrivate*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:172 (libQt6DBus.so.6+0x8f187)
#9 QtPrivate::QSlotObject<void (QDBusConnectionPrivate::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:383 (libQt6DBus.so.6+0x8f187)
#10 QtPrivate::QSlotObjectBase::call(QObject*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:363 (libQt6Core.so.6+0x23d247)
#11 QMetaCallEvent::placeMetaCall(QObject*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:608 (libQt6Core.so.6+0x23d247)
#12 QObject::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:1378 (libQt6Core.so.6+0x24562a)
#13 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1197 (libQt6Core.so.6+0x1a341e)
#14 doNotify /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1126 (libQt6Core.so.6+0x1a6843)
#15 QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1029 (libQt6Core.so.6+0x1a6a71)
#16 QCoreApplication::sendEvent(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1448 (libQt6Core.so.6+0x1a6b93)
#17 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1810 (libQt6Core.so.6+0x1abdc4)
#18 QCoreApplication::sendPostedEvents(QObject*, int) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1669 (libQt6Core.so.6+0x1abff7)
#19 postEventSourceDispatch /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:243 (libQt6Core.so.6+0x685bbe)
#20 g_main_dispatch ../glib/glib/gmain.c:3417 (libglib-2.0.so.0+0x8523f)
#21 g_main_context_dispatch ../glib/glib/gmain.c:4135 (libglib-2.0.so.0+0x8706a)
#22 g_main_context_iterate ../glib/glib/gmain.c:4211 (libglib-2.0.so.0+0x87354)
#23 g_main_context_iteration ../glib/glib/gmain.c:4276 (libglib-2.0.so.0+0x87464)
#24 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:393 (libQt6Core.so.6+0x684d34)
#25 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:100 (libQt6Core.so.6+0x1bd103)
#26 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:182 (libQt6Core.so.6+0x1bdff6)
#27 QThread::exec() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:578 (libQt6Core.so.6+0x3beebb)
#28 QDBusConnectionManager::run() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:123 (libQt6DBus.so.6+0x4bd52)
#29 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:321 (libQt6Core.so.6+0x4930fc)
#30 terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:257 (libQt6Core.so.6+0x493190)
#31 QThreadPrivate::start(void*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:280 (libQt6Core.so.6+0x4939f6)
Location is heap block of size 88 at 0x7b18000039c0 allocated by thread T1:
#0 calloc ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:672 (libtsan.so.0+0x31edc)
#1 dbus_malloc0 ../dbus/dbus/dbus-memory.c:563 (libdbus-1.so.3+0x67423)
#2 _dbus_counter_new ../dbus/dbus/dbus-resources.c:93 (libdbus-1.so.3+0x4d58c)
#3 _dbus_transport_init_base ../dbus/dbus/dbus-transport.c:127 (libdbus-1.so.3+0x5b11b)
#4 _dbus_transport_new_for_socket ../dbus/dbus/dbus-transport-socket.c:1328 (libdbus-1.so.3+0x5a58e)
#5 _dbus_transport_new_for_domain_socket ../dbus/dbus/dbus-transport-socket.c:1555 (libdbus-1.so.3+0x5ad2c)
#6 _dbus_transport_open_unix_socket ../dbus/dbus/dbus-transport-socket.c:1623 (libdbus-1.so.3+0x5af3b)
#7 _dbus_transport_open ../dbus/dbus/dbus-transport.c:397 (libdbus-1.so.3+0x5bb9a)
#8 connection_try_from_address_entry ../dbus/dbus/dbus-connection.c:1818 (libdbus-1.so.3+0x26a41)
#9 _dbus_connection_open_internal ../dbus/dbus/dbus-connection.c:1887 (libdbus-1.so.3+0x26ca2)
#10 dbus_connection_open_private ../dbus/dbus/dbus-connection.c:2670 (libdbus-1.so.3+0x280f9)
#11 q_dbus_connection_open_private /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbus_symbols_p.h:184 (libQt6DBus.so.6+0x52a70)
#12 QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:217 (libQt6DBus.so.6+0x52a70)
#13 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void, void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*)>::call(void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QDBusConnectionManager*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:135 (libQt6DBus.so.6+0x554fe)
#14 void QtPrivate::FunctionPointer<void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*)>::call<QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void>(void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QDBusConnectionManager*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:172 (libQt6DBus.so.6+0x554fe)
#15 QtPrivate::QSlotObject<void (QDBusConnectionManager::*)(QDBusConnectionManager::ConnectionRequestData*), QtPrivate::List<QDBusConnectionManager::ConnectionRequestData*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:383 (libQt6DBus.so.6+0x554fe)
#16 QtPrivate::QSlotObjectBase::call(QObject*, void**) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobjectdefs_impl.h:363 (libQt6Core.so.6+0x23d247)
#17 QMetaCallEvent::placeMetaCall(QObject*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:608 (libQt6Core.so.6+0x23d247)
#18 QObject::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qobject.cpp:1378 (libQt6Core.so.6+0x24562a)
#19 QThread::event(QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:1105 (libQt6Core.so.6+0x3bf12c)
#20 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1197 (libQt6Core.so.6+0x1a341e)
#21 doNotify /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1126 (libQt6Core.so.6+0x1a6843)
#22 QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1029 (libQt6Core.so.6+0x1a6a71)
#23 QCoreApplication::sendEvent(QObject*, QEvent*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1448 (libQt6Core.so.6+0x1a6b93)
#24 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1810 (libQt6Core.so.6+0x1abdc4)
#25 QCoreApplication::sendPostedEvents(QObject*, int) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:1669 (libQt6Core.so.6+0x1abff7)
#26 postEventSourceDispatch /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:243 (libQt6Core.so.6+0x685bbe)
#27 g_main_dispatch ../glib/glib/gmain.c:3417 (libglib-2.0.so.0+0x8523f)
#28 g_main_context_dispatch ../glib/glib/gmain.c:4135 (libglib-2.0.so.0+0x8706a)
#29 g_main_context_iterate ../glib/glib/gmain.c:4211 (libglib-2.0.so.0+0x87354)
#30 g_main_context_iteration ../glib/glib/gmain.c:4276 (libglib-2.0.so.0+0x87464)
#31 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:393 (libQt6Core.so.6+0x684d34)
#32 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:100 (libQt6Core.so.6+0x1bd103)
#33 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qeventloop.cpp:182 (libQt6Core.so.6+0x1bdff6)
#34 QThread::exec() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread.cpp:578 (libQt6Core.so.6+0x3beebb)
#35 QDBusConnectionManager::run() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:123 (libQt6DBus.so.6+0x4bd52)
#36 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:321 (libQt6Core.so.6+0x4930fc)
#37 terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:257 (libQt6Core.so.6+0x493190)
#38 QThreadPrivate::start(void*) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:280 (libQt6Core.so.6+0x4939f6)
Mutex M180842226518074512 is already destroyed.
Mutex M181123701494785360 is already destroyed.
Thread T1 'QDBusConnection' (tid=2394, running) created by main thread at:
#0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x605b8)
#1 QThread::start(QThread::Priority) /home/linux/qt6_dev/qt6/qtbase/src/corelib/thread/qthread_unix.cpp:707 (libQt6Core.so.6+0x491f6b)
#2 QDBusConnectionManager::QDBusConnectionManager() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:96 (libQt6DBus.so.6+0x4c931)
#3 innerFunction /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:40 (libQt6DBus.so.6+0x4f632)
#4 Holder /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:37 (libQt6DBus.so.6+0x4f632)
#5 instance /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:91 (libQt6DBus.so.6+0x4f632)
#6 operator() /home/linux/qt6_dev/qt6/qtbase/src/corelib/global/qglobalstatic.h:73 (libQt6DBus.so.6+0x4f632)
#7 QDBusConnection::sessionBus() /home/linux/qt6_dev/qt6/qtbase/src/dbus/qdbusconnection.cpp:1133 (libQt6DBus.so.6+0x4f632)
#8 QGenericUnixServices::QGenericUnixServices() /home/linux/qt6_dev/qt6/qtbase/src/gui/platform/unix/qgenericunixservices.cpp:359 (libQt6Gui.so.6+0xb0a4cd)
#9 QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:99 (libQt6XcbQpa.so.6+0x9d6e9)
#10 QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) /home/linux/qt6_dev/qt6/qtbase/src/plugins/platforms/xcb/qxcbmain.cpp:22 (libqxcb.so+0x2490)
#11 QPlatformIntegration* qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin, QList<QString> const&, int&, char**&>(QFactoryLoader const*, QString const&, QList<QString> const&, int&, char**&) /home/linux/qt6_dev/qt6-build/include/QtCore/6.5.0/QtCore/private/../../../../../../qt6/qtbase/src/corelib/plugin/qfactoryloader_p.h:99 (libQt6Gui.so.6+0x2967d5)
#12 QPlatformIntegrationFactory::create(QString const&, QList<QString> const&, int&, char**, QString const&) /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qplatformintegrationfactory.cpp:23 (libQt6Gui.so.6+0x296513)
#13 init_platform /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1191 (libQt6Gui.so.6+0x220b92)
#14 QGuiApplicationPrivate::createPlatformIntegration() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1471 (libQt6Gui.so.6+0x224585)
#15 QGuiApplicationPrivate::createEventDispatcher() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1490 (libQt6Gui.so.6+0x224bdf)
#16 QApplicationPrivate::createEventDispatcher() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:140 (libQt6Widgets.so.6+0x1926ef)
#17 QCoreApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/corelib/kernel/qcoreapplication.cpp:815 (libQt6Core.so.6+0x1b07fc)
#18 QGuiApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/gui/kernel/qguiapplication.cpp:1514 (libQt6Gui.so.6+0x22ad1f)
#19 QApplicationPrivate::init() /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:466 (libQt6Widgets.so.6+0x194506)
#20 QApplication::QApplication(int&, char**, int) /home/linux/qt6_dev/qt6/qtbase/src/widgets/kernel/qapplication.cpp:454 (libQt6Widgets.so.6+0x194613)
#21 main /home/linux/qt6_dev/qt_tsan_tests_dev/qt_tsan_tests/main.cpp:8 (qt_tsan_tests+0x31c4)
SUMMARY: ThreadSanitizer: data race ../dbus/dbus/dbus-resources.c:245 in _dbus_counter_adjust_unix_fd
</pre>
</details>
In summary, the problems occur when one thread runs a loop to process dbus messages, while another thread destroys instances of the DBusMessage structure, removing them from the internal message cache. Both threads access the same variables of an instance of the DBusCounter structure contained in DBus, whereby the write access is protected by a mutex, but the read access is not.https://gitlab.freedesktop.org/dbus/dbus/-/issues/447fatal: detected dubious ownership in repository at '/builds/*/dbus'2023-03-08T19:44:39ZSimon McVittiefatal: detected dubious ownership in repository at '/builds/*/dbus'As @rhabacker points out, many of our CI jobs are failing as described in https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/485.
I think the solution to this is to stop swapping between uid 0 and `user`. We originally did ...As @rhabacker points out, many of our CI jobs are failing as described in https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/485.
I think the solution to this is to stop swapping between uid 0 and `user`. We originally did this as part of our Travis-CI integration, which runs the build as an ordinary user with the ability to `sudo` to root; but Gitlab-CI starts our container as uid 0, so we might as well use uid 0 for the whole build, similar to dbus/dbus-python@27e1cbc158bdd29ad0ca81a9377caeafed9d6dad.
To stop the CI runners from reusing cached `dbus/` directories with the wrong ownership, we will also need the equivalent of dbus/dbus-python@5c2282807922181461c90b30a04b376de73fb31b.
While we're there, we might as well also do the equivalent of dbus/dbus-python@4dcd5d38c4d9dc169234e308049a3bebcf01c0de.Simon McVittieSimon McVittiehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/450Line references path below legacy directory /var/run/, updating /var/run/dbus...2023-02-28T20:41:48ZhongjinghaoLine references path below legacy directory /var/run/, updating /var/run/dbus/containers → /run/dbus/containersWhen I installed dbus1.14, systemd provided the following print:
``` shell
/usr/lib/tmpfiles.d/dbus.conf:13: Line references path below legacy directory /var/run/, updating /var/run/dbus/containers → /run/dbus/containers; please update t...When I installed dbus1.14, systemd provided the following print:
``` shell
/usr/lib/tmpfiles.d/dbus.conf:13: Line references path below legacy directory /var/run/, updating /var/run/dbus/containers → /run/dbus/containers; please update the tmpfiles.d/ drop-in file accordingly.
```
Is it necessary to change "@EXPANDED_RUNSTATEDIR@" to "@EXPANDED_LOCALSTATEDIR@" in bus/tmpfiles.d/dbus.conf.in?https://gitlab.freedesktop.org/dbus/dbus/-/issues/453Build fails on master on ubuntu 22.04 error: conflicting types for ‘close_ran...2023-06-07T12:08:05ZAhmed AbdelfattahBuild fails on master on ubuntu 22.04 error: conflicting types for ‘close_range’; have ‘int(unsigned int, unsigned int, unsigned int)## To reproduce
Steps to reproduce the behavior:
1. Clone the repo to the latest master : hash at time of the bug is 35ade3c8f7aca16d1c6289828a2597859d1c503b
2. Build on Ubuntu using the provided [cmake readme file](https://gitlab.freed...## To reproduce
Steps to reproduce the behavior:
1. Clone the repo to the latest master : hash at time of the bug is 35ade3c8f7aca16d1c6289828a2597859d1c503b
2. Build on Ubuntu using the provided [cmake readme file](https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/README.cmake)
## Expected result
Build passes
## Actual result
Build fails with error
```
/home/abdelah/workspace/dbus/dbus/dbus-sysdeps-unix.c:154:1: error: conflicting types for ‘close_range’; have ‘int(unsigned int, unsigned int, unsigned int)’
154 | close_range (unsigned int first,
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /home/abdelah/workspace/dbus/dbus/dbus-sysdeps-unix.c:46:
/usr/include/unistd.h:1208:12: note: previous declaration of ‘close_range’ with type ‘int(unsigned int, unsigned int, int)’
1208 | extern int close_range (unsigned int __fd, unsigned int __max_fd,
| ^~~~~~~~~~~
make[2]: *** [dbus/CMakeFiles/dbus-1.dir/build.make:706: dbus/CMakeFiles/dbus-1.dir/dbus-sysdeps-unix.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:377: dbus/CMakeFiles/dbus-1.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
```Simon McVittieSimon McVittiehttps://gitlab.freedesktop.org/dbus/dbus/-/issues/454DBUS installed in ubantu (x86_64 architectures), an error is as follows: the ...2023-04-28T09:43:10ZemodiliuganDBUS installed in ubantu (x86_64 architectures), an error is as follows: the arguments to dbus_set_error_from_message () were incorrect```
22346: 0x7f05fcbdc740: 1682664406.199526 [dbus-bus.c(219):init_connections_unlocked] Filling in system bus address...
22346: 0x7f05fcbdc740: 1682664406.199564 [dbus-bus.c(237):init_connections_unlocked] used default system bus "uni...```
22346: 0x7f05fcbdc740: 1682664406.199526 [dbus-bus.c(219):init_connections_unlocked] Filling in system bus address...
22346: 0x7f05fcbdc740: 1682664406.199564 [dbus-bus.c(237):init_connections_unlocked] used default system bus "unix:path=/var/run/dbus/system_bus_socket"
22346: 0x7f05fcbdc740: 1682664406.199582 [dbus-bus.c(245):init_connections_unlocked] Filling in session bus address...
22346: 0x7f05fcbdc740: 1682664406.199601 [dbus-bus.c(251):init_connections_unlocked] "unix:path=/run/user/16777218/bus,guid=812f0b8730831c0ca129cef5643f84bf"
22346: 0x7f05fcbdc740: 1682664406.199615 [dbus-bus.c(256):init_connections_unlocked] Filling in activation bus address...
22346: 0x7f05fcbdc740: 1682664406.199635 [dbus-bus.c(263):init_connections_unlocked] "unix:path=/run/user/16777218/bus,guid=812f0b8730831c0ca129cef5643f84bf"
22346: 0x7f05fcbdc740: 1682664406.199642 [dbus-bus.c(273):init_connections_unlocked] Bus activation type was set to "session"
22346: 0x7f05fcbdc740: 1682664406.199660 [dbus-connection.c(1867):_dbus_connection_open_internal] opening private connection to: unix:path=/run/user/16777218/bus,guid=812f0b8730831c0ca129cef5643f84bf
22346: 0x7f05fcbdc740: 1682664406.199715 [dbus-sysdeps-unix.c(929):_dbus_connect_unix_socket] connecting to unix socket /run/user/16777218/bus abstract=0
22346: 0x7f05fcbdc740: 1682664406.199740 [dbus-sysdeps-unix.c(247):_dbus_open_socket] socket fd 3 opened
22346: 0x7f05fcbdc740: 1682664406.199782 [dbus-transport-unix.c(92):_dbus_transport_new_for_domain_socket] Successfully connected to unix socket /run/user/16777218/bus
22346: 0x7f05fcbdc740: 1682664406.199818 [dbus-auth.c(2203):goto_state] client: going from state NeedSendAuth to state WaitingForData
22346: 0x7f05fcbdc740: 1682664406.199833 [dbus-transport.c(204):_dbus_transport_init_base] Initialized transport on address unix:path=/run/user/16777218/bus
22346: 0x7f05fcbdc740: 1682664406.199882 [dbus-connection.c(1359):_dbus_connection_new_for_transport] LOCK
22346: 0x7f05fcbdc740: 1682664406.199901 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.199925 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 0
22346: 0x7f05fcbdc740: 1682664406.199944 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 0
22346: 0x7f05fcbdc740: 1682664406.199970 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.199993 [dbus-dataslot.c(135):_dbus_data_slot_allocator_alloc] Allocated slot 0 on allocator 0x7f05fb6c8ec0 total 1 slots allocated 1 used
22346: 0x7f05fcbdc740: 1682664406.200014 [dbus-connection.c(3705):dbus_connection_send_with_reply_and_block] LOCK
22346: 0x7f05fcbdc740: 1682664406.200025 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.200052 [dbus-connection.c(3415):dbus_connection_send_with_reply] LOCK
22346: 0x7f05fcbdc740: 1682664406.200073 [dbus-dataslot.c(135):_dbus_data_slot_allocator_alloc] Allocated slot 0 on allocator 0x7f05fb6c8f10 total 1 slots allocated 1 used
22346: 0x7f05fcbdc740: 1682664406.200152 [dbus-connection.c(2033):_dbus_connection_send_preallocated_unlocked_no_update] Message 0x55952fc74440 (method_call /org/freedesktop/DBus org.freedesktop.DBus Hello '') for org.freedesktop.DBus added to outgoing queue 0x55952fc73f80, 1 pending to send
22346: 0x7f05fcbdc740: 1682664406.200182 [dbus-connection.c(2049):_dbus_connection_send_preallocated_unlocked_no_update] Message 0x55952fc74440 serial is 1
22346: 0x7f05fcbdc740: 1682664406.200199 [dbus-connection.c(1203):_dbus_connection_do_iteration_unlocked] start
22346: 0x7f05fcbdc740: 1682664406.200208 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.200234 [dbus-connection.c(1074):_dbus_connection_acquire_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200259 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.200282 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.200300 [dbus-connection.c(1123):_dbus_connection_acquire_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200322 [dbus-connection.c(1126):_dbus_connection_acquire_io_path] LOCK
22346: 0x7f05fcbdc740: 1682664406.200331 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x1 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.200362 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = write timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.200386 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=0 need_write=1
22346: 0x7f05fcbdc740: 1682664406.200413 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 0, do_writing = 1
22346: 0x7f05fcbdc740: 1682664406.200436 [dbus-sysdeps-unix.c(1811):write_credentials_byte] wrote credentials byte
22346: 0x7f05fcbdc740: 1682664406.200457 [dbus-transport-socket.c(464):do_authentication] client auth state: bytes to send
22346: 0x7f05fcbdc740: 1682664406.200481 [dbus-auth.c(2575):_dbus_auth_bytes_sent] client: Sent 18 bytes of: AUTH EXTERNAL 30
22346: 0x7f05fcbdc740: 1682664406.200496 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 0, do_writing = 1
22346: 0x7f05fcbdc740: 1682664406.200517 [dbus-transport-socket.c(450):do_authentication] client auth state: waiting for input
22346: 0x7f05fcbdc740: 1682664406.200532 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.200548 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 1
22346: 0x7f05fcbdc740: 1682664406.200561 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 0 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.200576 [dbus-transport-socket.c(512):do_writing] **Not authenticated, not writing anything**
22346: 0x7f05fcbdc740: 1682664406.200592 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 0 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.200610 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.200633 [dbus-transport.c(1020):_dbus_transport_do_iteration] end
22346: 0x7f05fcbdc740: 1682664406.200651 [dbus-connection.c(1147):_dbus_connection_release_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200669 [dbus-connection.c(1153):_dbus_connection_release_io_path] start connection->io_path_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.200689 [dbus-connection.c(1158):_dbus_connection_release_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200708 [dbus-connection.c(1235):_dbus_connection_do_iteration_unlocked] end
22346: 0x7f05fcbdc740: 1682664406.200733 [dbus-connection.c(4419):_dbus_connection_get_dispatch_status_unlocked] dispatch status = complete is_connected = 1
22346: 0x7f05fcbdc740: 1682664406.200754 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.200781 [dbus-connection.c(390):_dbus_connection_lock] LOCK
22346: 0x7f05fcbdc740: 1682664406.200803 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.200824 [dbus-connection.c(390):_dbus_connection_lock] LOCK
22346: 0x7f05fcbdc740: 1682664406.200852 [dbus-connection.c(3768):_dbus_connection_flush_unlocked] doing iteration in
22346: 0x7f05fcbdc740: 1682664406.200873 [dbus-connection.c(1203):_dbus_connection_do_iteration_unlocked] start
22346: 0x7f05fcbdc740: 1682664406.200890 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.200908 [dbus-connection.c(1074):_dbus_connection_acquire_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200918 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.200935 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.200953 [dbus-connection.c(1123):_dbus_connection_acquire_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.200980 [dbus-connection.c(1126):_dbus_connection_acquire_io_path] LOCK
22346: 0x7f05fcbdc740: 1682664406.201001 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x7 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.201016 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = readwrite timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.201038 [dbus-transport-socket.c(1178):socket_do_iteration] unlock pre poll
22346: 0x7f05fcbdc740: 1682664406.201047 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.201066 [dbus-transport-socket.c(1191):socket_do_iteration] lock post poll
22346: 0x7f05fcbdc740: 1682664406.201084 [dbus-connection.c(390):_dbus_connection_lock] LOCK
22346: 0x7f05fcbdc740: 1682664406.201113 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=1 need_write=0
22346: 0x7f05fcbdc740: 1682664406.201141 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 1, do_writing = 0
22346: 0x7f05fcbdc740: 1682664406.201163 [dbus-transport-socket.c(450):do_authentication] client auth state: waiting for input
22346: 0x7f05fcbdc740: 1682664406.201202 [dbus-transport-socket.c(265):read_data_into_auth] read 37 bytes in auth phase
22346: 0x7f05fcbdc740: 1682664406.201213 [dbus-auth.c(2256):process_command] client: got command "OK 812f0b8730831c0ca129cef5643f84bf"
22346: 0x7f05fcbdc740: 1682664406.201244 [dbus-auth.c(1641):process_ok] Got GUID '812f0b8730831c0ca129cef5643f84bf' from the server
22346: 0x7f05fcbdc740: 1682664406.201254 [dbus-auth.c(2203):goto_state] client: going from state WaitingForData to state WaitingForAgreeUnixFD
22346: 0x7f05fcbdc740: 1682664406.201273 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 1, do_writing = 0
22346: 0x7f05fcbdc740: 1682664406.201294 [dbus-transport-socket.c(464):do_authentication] client auth state: bytes to send
22346: 0x7f05fcbdc740: 1682664406.201316 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.201331 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 0
22346: 0x7f05fcbdc740: 1682664406.201353 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.201364 [dbus-transport-socket.c(751):do_reading] fd = 3
22346: 0x7f05fcbdc740: 1682664406.201380 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.201394 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.201420 [dbus-transport.c(1020):_dbus_transport_do_iteration] end
22346: 0x7f05fcbdc740: 1682664406.201439 [dbus-connection.c(1147):_dbus_connection_release_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.201460 [dbus-connection.c(1153):_dbus_connection_release_io_path] start connection->io_path_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.201479 [dbus-connection.c(1158):_dbus_connection_release_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.201492 [dbus-connection.c(1235):_dbus_connection_do_iteration_unlocked] end
22346: 0x7f05fcbdc740: 1682664406.201514 [dbus-connection.c(3768):_dbus_connection_flush_unlocked] doing iteration in
22346: 0x7f05fcbdc740: 1682664406.201529 [dbus-connection.c(1203):_dbus_connection_do_iteration_unlocked] start
22346: 0x7f05fcbdc740: 1682664406.201542 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.201560 [dbus-connection.c(1074):_dbus_connection_acquire_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.201576 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.201603 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.201622 [dbus-connection.c(1123):_dbus_connection_acquire_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.201638 [dbus-connection.c(1126):_dbus_connection_acquire_io_path] LOCK
22346: 0x7f05fcbdc740: 1682664406.201657 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x7 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.201680 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = readwrite timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.201702 [dbus-transport-socket.c(1178):socket_do_iteration] unlock pre poll
22346: 0x7f05fcbdc740: 1682664406.201714 [dbus-connection.c(406):_dbus_connection_unlock] UNLOCK
22346: 0x7f05fcbdc740: 1682664406.201737 [dbus-transport-socket.c(1191):socket_do_iteration] lock post poll
22346: 0x7f05fcbdc740: 1682664406.201758 [dbus-connection.c(390):_dbus_connection_lock] LOCK
22346: 0x7f05fcbdc740: 1682664406.201780 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=0 need_write=1
22346: 0x7f05fcbdc740: 1682664406.201805 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 0, do_writing = 1
22346: 0x7f05fcbdc740: 1682664406.201826 [dbus-transport-socket.c(464):do_authentication] client auth state: bytes to send
22346: 0x7f05fcbdc740: 1682664406.201857 [dbus-auth.c(2575):_dbus_auth_bytes_sent] client: Sent 19 bytes of: NEGOTIATE_UNIX_FD
22346: 0x7f05fcbdc740: 1682664406.201866 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 0, do_writing = 1
22346: 0x7f05fcbdc740: 1682664406.201893 [dbus-transport-socket.c(450):do_authentication] client auth state: waiting for input
22346: 0x7f05fcbdc740: 1682664406.201915 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.201936 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 1
22346: 0x7f05fcbdc740: 1682664406.201958 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 0 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.201981 [dbus-transport-socket.c(512):do_writing] Not authenticated, not writing anything
22346: 0x7f05fcbdc740: 1682664406.202005 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 0 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.202032 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.202120 [dbus-connection.c(3768):_dbus_connection_flush_unlocked] doing iteration in
22346: 0x7f05fcbdc740: 1682664406.202178 [dbus-connection.c(1074):_dbus_connection_acquire_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.202199 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.202227 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.202273 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x7 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.202291 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = readwrite timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.202380 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=1 need_write=0
22346: 0x7f05fcbdc740: 1682664406.202400 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 1, do_writing = 0
22346: 0x7f05fcbdc740: 1682664406.202422 [dbus-transport-socket.c(450):do_authentication] client auth state: waiting for input
22346: 0x7f05fcbdc740: 1682664406.202446 [dbus-transport-socket.c(265):read_data_into_auth] read 15 bytes in auth phase
22346: 0x7f05fcbdc740: 1682664406.202467 [dbus-auth.c(2256):process_command] client: got command "AGREE_UNIX_FD"
22346: 0x7f05fcbdc740: 1682664406.202490 [dbus-auth.c(2139):handle_client_state_waiting_for_agree_unix_fd] Successfully negotiated UNIX FD passing
22346: 0x7f05fcbdc740: 1682664406.202508 [dbus-auth.c(2203):goto_state] client: going from state WaitingForAgreeUnixFD to state Authenticated
22346: 0x7f05fcbdc740: 1682664406.202520 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 1, do_writing = 0
22346: 0x7f05fcbdc740: 1682664406.202563 [dbus-transport-socket.c(464):do_authentication] client auth state: bytes to send
22346: 0x7f05fcbdc740: 1682664406.202587 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.202601 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 0
22346: 0x7f05fcbdc740: 1682664406.202611 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.202627 [dbus-transport-socket.c(751):do_reading] fd = 3
22346: 0x7f05fcbdc740: 1682664406.202640 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.202651 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.202664 [dbus-transport.c(1020):_dbus_transport_do_iteration] end
22346: 0x7f05fcbdc740: 1682664406.202678 [dbus-connection.c(1147):_dbus_connection_release_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.202688 [dbus-connection.c(1153):_dbus_connection_release_io_path] start connection->io_path_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.202695 [dbus-connection.c(1158):_dbus_connection_release_io_path] unlocking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.202707 [dbus-connection.c(1235):_dbus_connection_do_iteration_unlocked] end
22346: 0x7f05fcbdc740: 1682664406.202725 [dbus-connection.c(3768):_dbus_connection_flush_unlocked] doing iteration in
22346: 0x7f05fcbdc740: 1682664406.202739 [dbus-connection.c(1203):_dbus_connection_do_iteration_unlocked] start
22346: 0x7f05fcbdc740: 1682664406.202783 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.202799 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.202837 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x7 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.202853 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = readwrite timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.202874 [dbus-transport-socket.c(1178):socket_do_iteration] unlock pre poll
22346: 0x7f05fcbdc740: 1682664406.202912 [dbus-transport-socket.c(1191):socket_do_iteration] lock post poll
22346: 0x7f05fcbdc740: 1682664406.202940 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=0 need_write=1
22346: 0x7f05fcbdc740: 1682664406.202959 [dbus-transport-socket.c(349):exchange_credentials] exchange_credentials: do_reading = 0, do_writing = 1
22346: 0x7f05fcbdc740: 1682664406.202977 [dbus-transport-socket.c(464):do_authentication] client auth state: bytes to send
22346: 0x7f05fcbdc740: 1682664406.203000 [dbus-auth.c(2575):_dbus_auth_bytes_sent] client: Sent 7 bytes of: BEGIN
22346: 0x7f05fcbdc740: 1682664406.203011 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.203026 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 1
22346: 0x7f05fcbdc740: 1682664406.203038 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.203055 [dbus-transport-socket.c(165):check_write_watch] check_write_watch(): needed = 1 on connection 0x55952fc73f80 watch 0x55952fc73930 fd = 3 outgoing messages exist 1
22346: 0x7f05fcbdc740: 1682664406.203069 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.203076 [dbus-transport.c(1020):_dbus_transport_do_iteration] end
22346: 0x7f05fcbdc740: 1682664406.203094 [dbus-connection.c(1147):_dbus_connection_release_io_path] locking io_path_mutex
22346: 0x7f05fcbdc740: 1682664406.203110 [dbus-connection.c(1153):_dbus_connection_release_io_path] start connection->io_path_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.203150 [dbus-connection.c(3768):_dbus_connection_flush_unlocked] doing iteration in
22346: 0x7f05fcbdc740: 1682664406.203206 [dbus-connection.c(1078):_dbus_connection_acquire_io_path] start connection->io_path_acquired = 0 timeout = -1
22346: 0x7f05fcbdc740: 1682664406.203215 [dbus-connection.c(1121):_dbus_connection_acquire_io_path] end connection->io_path_acquired = 1 we_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.203256 [dbus-transport.c(1006):_dbus_transport_do_iteration] Transport iteration flags 0x7 timeout -1 connected = 1
22346: 0x7f05fcbdc740: 1682664406.203272 [dbus-transport-socket.c(1103):socket_do_iteration] iteration flags = readwrite timeout = -1 read_watch = 0x55952fc73980 write_watch = 0x55952fc73930 fd = 3
22346: 0x7f05fcbdc740: 1682664406.203291 [dbus-transport-socket.c(1178):socket_do_iteration] unlock pre poll
22346: 0x7f05fcbdc740: 1682664406.203320 [dbus-transport-socket.c(1191):socket_do_iteration] lock post poll
22346: 0x7f05fcbdc740: 1682664406.203338 [dbus-transport-socket.c(1212):socket_do_iteration] in iteration, need_read=1 need_write=1
22346: 0x7f05fcbdc740: 1682664406.203352 [dbus-transport-socket.c(751):do_reading] fd = 3
22346: 0x7f05fcbdc740: 1682664406.203369 [dbus-transport-socket.c(181):check_read_watch] fd = 3
22346: 0x7f05fcbdc740: 1682664406.203378 [dbus-transport-socket.c(227):check_read_watch] setting read watch enabled = 1
22346: 0x7f05fcbdc740: 1682664406.203403 [dbus-transport-socket.c(897):do_reading] Disconnected from remote app
22346: 0x7f05fcbdc740: 1682664406.203463 [dbus-watch.c(686):dbus_watch_set_data] Setting watch fd -1 data to data = (nil) function = (nil) from data = (nil) function = (nil)
22346: 0x7f05fcbdc740: 1682664406.203479 [dbus-watch.c(686):dbus_watch_set_data] Setting watch fd -1 data to data = (nil) function = (nil) from data = (nil) function = (nil)
22346: 0x7f05fcbdc740: 1682664406.203521 [dbus-transport-socket.c(518):do_writing] Not connected, not writing anything
22346: 0x7f05fcbdc740: 1682664406.203534 [dbus-transport-socket.c(1247):socket_do_iteration] ... leaving do_iteration()
22346: 0x7f05fcbdc740: 1682664406.203575 [dbus-connection.c(1153):_dbus_connection_release_io_path] start connection->io_path_acquired = 1
22346: 0x7f05fcbdc740: 1682664406.203619 [dbus-connection.c(3779):_dbus_connection_flush_unlocked] middle
22346: 0x7f05fcbdc740: 1682664406.203637 [dbus-transport.c(1098):recover_unused_bytes] 0 unused bytes sent to message loader
22346: 0x7f05fcbdc740: 1682664406.203654 [dbus-connection.c(4419):_dbus_connection_get_dispatch_status_unlocked] dispatch status = complete is_connected = 0
22346: 0x7f05fcbdc740: 1682664406.203671 [dbus-connection.c(4364):notify_disconnected_unlocked] Dropping 1 outgoing messages since we're disconnected
22346: 0x7f05fcbdc740: 1682664406.203709 [dbus-connection.c(660):_dbus_connection_message_sent_unlocked] Message 0x55952fc74440 (method_call /org/freedesktop/DBus org.freedesktop.DBus Hello '') removed from outgoing queue 0x55952fc73f80, 0 left to send
22346: 0x7f05fcbdc740: 1682664406.203751 [dbus-connection.c(4381):notify_disconnected_and_dispatch_complete_unlocked] Sending disconnect message
22346: 0x7f05fcbdc740: 1682664406.203778 [dbus-connection.c(560):_dbus_connection_queue_synthesized_message_link] Synthesized message 0x55952fc74640 added to incoming queue 0x55952fc73f80, 1 incoming
22346: 0x7f05fcbdc740: 1682664406.203904 [dbus-connection.c(560):_dbus_connection_queue_synthesized_message_link] Synthesized message 0x55952fc741a0 added to incoming queue 0x55952fc73f80, 2 incoming
22346: 0x7f05fcbdc740: 1682664406.203927 [dbus-connection.c(2416):_dbus_connection_block_pending_call] dbus_connection_send_with_reply_and_block(): will block 25000 milliseconds for reply serial 1 from 780639 sec 483758 usec
22346: 0x7f05fcbdc740: 1682664406.203955 [dbus-connection.c(2346):check_for_reply_and_update_dispatch_unlocked] checked for reply
22346: 0x7f05fcbdc740: 1682664406.203972 [dbus-connection.c(2348):check_for_reply_and_update_dispatch_unlocked] dbus_connection_send_with_reply_and_block(): got reply
22346: 0x7f05fcbdc740: 1682664406.203989 [dbus-pending-call.c(197):_dbus_pending_call_set_reply_unlocked] handing message 0x55952fc74640 (error) to pending call serial 1
22346: 0x7f05fcbdc740: 1682664406.204148 [dbus-dataslot.c(175):_dbus_data_slot_allocator_free] Freeing slot 0 on allocator 0x7f05fb6c8f10 total 1 allocated 1 used
dbus[22346]: arguments to dbus_set_error_from_message() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-message.c line 4078.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
```
recently I want to learn commonAPI, so I installed libdbus (version 1.12.18) to commonapi_dbus_runtime, but running the server starts to get an error, the error print about DBUS is as follows:https://gitlab.freedesktop.org/dbus/dbus/-/issues/455openSUSE mingw32-cmake, mingw64-cmake failing during CI2023-06-13T11:58:08ZSimon McVittieopenSUSE mingw32-cmake, mingw64-cmake failing during CIWhen running CI against git master, the `opensuse mingw64 cmake debug` build couldn't find the `mingw64-cmake` script:
```
+ mingw64-cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -D CMAKE_TOOLCHAIN_FILE=/builds/dbus/dbus/cmake/x8...When running CI against git master, the `opensuse mingw64 cmake debug` build couldn't find the `mingw64-cmake` script:
```
+ mingw64-cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -D CMAKE_TOOLCHAIN_FILE=/builds/dbus/dbus/cmake/x86_64-w64-mingw32.cmake -D CMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32 -D DBUS_USE_WINE=1 ..
./tools/ci-build.sh: line 440: mingw64-cmake: command not found
```
The corresponding 32-bit build isn't run by default, but would presumably fail in the same way.
I was able to resolve that as part of !405 by installing `mingw${bits}-cross-cmake`, but that leaves me with another error:
```
+ mingw64-cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -D CMAKE_TOOLCHAIN_FILE=/builds/dbus/dbus/cmake/x86_64-w64-mingw32.cmake -D CMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32 -D DBUS_USE_WINE=1 ..
RPM version 4.14.3
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-afgpcdLAlsiv?] [-a|--all] [-f|--file] [-g|--group]
...
[--filerequire] [--filecaps]
CMake Warning:
Ignoring extra path from command line:
".."
CMake Error: The source directory "/builds/dbus/dbus/build" does not appear to contain CMakeLists.txt.
```
I think this means something is wrong with either the `mingw64-cmake` script, or the way we're invoking it. @rhabacker, since this seems to be your script, please could you have a look?
For now I'm going to disable the openSUSE mingw/cmake builds, because some CI is better than no CI. We still have at least some coverage of mingw/cmake on Debian, which succeeds.https://gitlab.freedesktop.org/dbus/dbus/-/issues/456Native Windows CI not being run2023-05-16T11:01:28ZSimon McVittieNative Windows CI not being runhttps://gitlab.freedesktop.org/dbus/dbus/-/jobs/41624837 took at least 70 minutes, and I wanted to get *some* amount of CI to work today, so I disabled the native Windows CI jobs for now.
We should re-enable the Windows CI if/when it wo...https://gitlab.freedesktop.org/dbus/dbus/-/jobs/41624837 took at least 70 minutes, and I wanted to get *some* amount of CI to work today, so I disabled the native Windows CI jobs for now.
We should re-enable the Windows CI if/when it works reliably, but I've run out of time to get that working.https://gitlab.freedesktop.org/dbus/dbus/-/issues/457CVE-2023-34969: dbus-daemon crashes when a monitor is active and a message fr...2023-06-08T09:13:28ZhongjinghaoCVE-2023-34969: dbus-daemon crashes when a monitor is active and a message from the driver cannot be delivered[Vulnerability description added by @smcv]
If a privileged user with control over the dbus-daemon is using the `org.freedesktop.DBus.Monitoring` interface to monitor message bus traffic, then an unprivileged user with the ability to con...[Vulnerability description added by @smcv]
If a privileged user with control over the dbus-daemon is using the `org.freedesktop.DBus.Monitoring` interface to monitor message bus traffic, then an unprivileged user with the ability to connect to the same dbus-daemon can cause a dbus-daemon crash under some circumstances.
When done on the well-known system bus, this is a denial-of-service vulnerability.
Mitigation: This can only be done if a monitoring process such as `dbus-monitor` or `busctl monitor` is active on the same dbus-daemon instance, which is a privileged operation that can only be done by root or the Unix uid of the message bus. If no monitoring process is active, then the vulnerable code is not reached.
The situation in which the message bus can be crashed is that an unprivileged user sends a message that will result in a reply from the "bus driver" (most commonly a method call on the `org.freedesktop.DBus` interface or a `NameOwnerChanged`, `NameAcquired` or `NameLost` signal), but the reply cannot be delivered, for example because it is forbidden by a `<deny>` rule or because the recipient has exceeded the configured limit on its number of queued messages.
Vulnerable versions:
* 1.15.x before 1.15.6
* 1.14.x before 1.14.8
* 1.12.x before 1.12.28
* most end-of-life versions since 1.9.x
Fixed versions:
* all since 1.15.6
* 1.14.x since 1.14.8
* 1.12.x since 1.12.28
Not vulnerable: end-of-life versions 1.8.x or older do not contain the affected code path.
## Original report
![111111](/uploads/3d50924ba02cc8e0c421e15824b92837/111111.png)
```
#0 0x00007f113fa7d3ef in ?? () from /usr/lib64/libc.so.6
#1 0x00007f113fa31006 in raise () from /usr/lib64/libc.so.6
#2 0x00007f113fa1c4f7 in abort () from /usr/lib64/libc.so.6
#3 0x00007f113fd61d62 in _dbus_abort () at dbus-sysdeps.c:93
#4 0x00007f113fd84b50 in _dbus_warn_check_failed (
format=format@entry=0x7f113fd95d28 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:281
#5 0x00007f113fd8528a in _dbus_warn_return_if_fail (function=function@entry=0x7f113fd94a80 <__func__.65> "dbus_message_set_reply_serial",
assertion=assertion@entry=0x7f113fd9332a "reply_serial != 0", file=file@entry=0x7f113fd932ea "dbus-message.c", line=line@entry=1168) at dbus-internals.c:936
#6 0x00007f113fd74027 in dbus_message_set_reply_serial (message=message@entry=0x5611d306c690, reply_serial=<optimized out>) at dbus-message.c:1168
#7 0x00007f113fd77c83 in dbus_message_new_error (reply_to=reply_to@entry=0x5611d306b630, error_name=0x5611d00208e0 "org.freedesktop.DBus.Error.LimitsExceeded",
error_message=<optimized out>) at dbus-message.c:1525
#8 0x00005611ccb898ec in bus_transaction_capture_error_reply (error=<optimized out>, error=<optimized out>, in_reply_to=0x5611d306b630,
addressed_recipient=0x5611cdb65960, transaction=0x5611d67f4030) at connection.c:2314
#9 bus_transaction_capture_error_reply (transaction=0x5611d67f4030, addressed_recipient=0x5611cdb65960, error=0x7ffd16177520, in_reply_to=0x5611d306b630)
at connection.c:2296
#10 0x00005611ccb89a49 in bus_transaction_send_from_driver (transaction=0x5611d67f4030, connection=0x5611cdb65960, message=0x5611d306b630) at connection.c:2379
#11 0x00005611ccb8ef0e in bus_driver_handle_get_connection_unix_user (connection=0x5611cdb65960, transaction=0x5611d67f4030, message=<optimized out>, error=0x7ffd161776a0)
at driver.c:1667
#12 0x00005611ccb9061f in bus_driver_handle_message (connection=connection@entry=0x5611cdb65960, transaction=transaction@entry=0x5611d67f4030,
message=message@entry=0x5611d633ee10, error=error@entry=0x7ffd161776a0) at driver.c:2949
#13 0x00005611ccb8c582 in bus_dispatch (message=0x5611d633ee10, connection=0x5611cdb65960) at dispatch.c:392
#14 bus_dispatch_message_filter (connection=0x5611cdb65960, message=0x5611d633ee10, user_data=<optimized out>) at dispatch.c:548
#15 0x00007f113fd6ac1d in dbus_connection_dispatch (connection=0x5611cdb65960) at dbus-connection.c:4704
#16 dbus_connection_dispatch (connection=connection@entry=0x5611cdb65960) at dbus-connection.c:4576
#17 0x00005611ccb98821 in _dbus_loop_dispatch (loop=<optimized out>) at dbus-mainloop.c:532
#18 _dbus_loop_dispatch (loop=0x5611cdb37d30) at dbus-mainloop.c:513
#19 _dbus_loop_iterate (loop=loop@entry=0x5611cdb37d30, block=block@entry=1) at dbus-mainloop.c:862
#20 0x00005611ccb98c05 in _dbus_loop_run (loop=0x5611cdb37d30) at dbus-mainloop.c:888
#21 0x00005611ccb7dbc3 in main (argc=<optimized out>, argv=<optimized out>) at main.c:722
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/459An issue when restart dbus.service.2023-06-01T19:27:50ZleimaohuiAn issue when restart dbus.service.## To reproduce
Steps to reproduce the behavior:
1. restart dbus.service
2. login by ssh.
## Additional context
After the following commit has been submitted into systemd. when restart dbus.service, it is hard to login by ssh.
And thi...## To reproduce
Steps to reproduce the behavior:
1. restart dbus.service
2. login by ssh.
## Additional context
After the following commit has been submitted into systemd. when restart dbus.service, it is hard to login by ssh.
And this issue can be solved by restart systemd-logind.service.
I'm not sure whether it is an issue.
```
commit 5d71e463f49518c7702467f6145484afa31bf8ba
Author: Lennart Poettering <lennart@poettering.net>
Date: Mon Jan 2 17:35:23 2023 +0100
logind: implement Type=notify-reload protocol properly
So close already. Let's add the two missing notifications too.
Fixes: #18484
diff --git a/src/login/logind.c b/src/login/logind.c
index def2f5a442..1feacd3601 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -1020,6 +1020,11 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
Manager *m = userdata;
int r;
+ (void) sd_notifyf(/* unset= */ false,
+ "RELOADING=1\n"
+ "STATUS=Reloading configuration...\n"
+ "MONOTONIC_USEC=" USEC_FMT, now(CLOCK_MONOTONIC));
+
manager_reset_config(m);
r = manager_parse_config_file(m);
if (r < 0)
@@ -1027,6 +1032,7 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
else
log_info("Config file reloaded.");
+ (void) sd_notify(/* unset= */ false, NOTIFY_READY);
return 0;
}
diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index 042ea75d7a..24f5ddaa17 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -58,6 +58,7 @@ StateDirectory=systemd/linger
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
+Type=notify-reload
```
After restart dbus.service:
```
root # systemctl status dbus
● dbus.service - D-Bus System Message Bus
Loaded: loaded (/lib/systemd/system/dbus.service; static)
Active: active (running) since Tue 2023-05-23 15:51:50 UTC; 1 day 18h ago
TriggeredBy: ● dbus.socket
Docs: man:dbus-daemon(1)
Main PID: 39754 (dbus-daemon)
CGroup: /system.slice/dbus.service
└─39754 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
May 24 11:24:21 ubinux-x86-64 dbus-daemon[39754]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requeste>
May 24 11:24:46 ubinux-x86-64 dbus-daemon[39754]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
May 24 11:45:05 ubinux-x86-64 dbus-daemon[39754]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requeste>
May 24 11:45:30 ubinux-x86-64 dbus-daemon[39754]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
May 25 09:17:23 ubinux-x86-64 dbus-daemon[39754]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requeste>
May 25 09:17:48 ubinux-x86-64 dbus-daemon[39754]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
May 25 09:18:13 ubinux-x86-64 dbus-daemon[39754]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requeste>
May 25 09:18:38 ubinux-x86-64 dbus-daemon[39754]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
May 25 09:50:12 ubinux-x86-64 dbus-daemon[39754]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' re>
May 25 09:50:12 ubinux-x86-64 dbus-daemon[39754]: [system] Successfully activated service 'org.freedesktop.hostname1'
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/460Make Gnome (wayland) display settings persistent without asking.2023-06-01T09:55:30ZVeldoraMake Gnome (wayland) display settings persistent without asking.Hi
I know, I can change the display settings of gnome w. wayland using d-bus.
When changing the settings, they're not persistent and only valid for the current session.
When setting the setting persistent, Gnome/Wayland asks me, if I w...Hi
I know, I can change the display settings of gnome w. wayland using d-bus.
When changing the settings, they're not persistent and only valid for the current session.
When setting the setting persistent, Gnome/Wayland asks me, if I want to keep the changes or undo them.
Is there a way, to make the settings via d-bus persistent, without having Gnome asking me, if I want to keep the changes?
Reference-Issue to gnome-randr-rust: https://github.com/maxwellainatchi/gnome-randr-rust/issues/22
Above program is a rust-software, that aims to imitate xrandr behaviour, but for gnome on wayland.
Cheers
~ Veldorahttps://gitlab.freedesktop.org/dbus/dbus/-/issues/461DBus method param issue2023-06-05T15:36:09Z杨奎DBus method param issueI want call a dbus method of signature was a(ss).I used the following code to construct the "a (ss)" parameter, but it did not pass. The console output is as follows:
> Array or variant type requires that type begin_struct be written, b...I want call a dbus method of signature was a(ss).I used the following code to construct the "a (ss)" parameter, but it did not pass. The console output is as follows:
> Array or variant type requires that type begin_struct be written, but string was written. The overall signature expected here was 'a(ss)' and we are on byte 1 of that signature.
This is my implementation code:
```c
DBusMessageIter iter;
DBusMessageIter subIter;
dbus_message_iter_init_append(msg, &iter);
if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
"(ss)",
&subIter)) {
fprintf(stderr, "%s", "iter init fail\n");
exit(1);
}
String a = "aaaaaa";
String b = "bbbbbb";
dbus_message_iter_append_basic(&subIter, DBUS_TYPE_STRING, &a);
dbus_message_iter_append_basic(&subIter, DBUS_TYPE_STRING, &b);
// dbus_message_iter_append_basic(&subIter, DBUS_TYPE_STRING, &c);
// dbus_message_iter_append_basic(&subIter, DBUS_TYPE_STRING, &d);
dbus_message_iter_close_container(&iter, &subIter);
```https://gitlab.freedesktop.org/dbus/dbus/-/issues/463[Ask] Dbus async api issue2023-06-13T10:05:08Z杨奎[Ask] Dbus async api issueI pass the key sequence to fcitx through DBus and asynchronously accept the dbus response message. The following is my specific implementation code:
```c
static Object FXNative_eventLoop() {
DBusError error;
dbus_error_init(&err...I pass the key sequence to fcitx through DBus and asynchronously accept the dbus response message. The following is my specific implementation code:
```c
static Object FXNative_eventLoop() {
DBusError error;
dbus_error_init(&error);
DBusConnection *connection = context->connection;
dbus_connection_add_filter(connection, FXNative_message, NULL, NULL);
dbus_bus_add_match(connection, "type='signal',interface='org.fcitx.Fcitx.InputContext1'", &error);
if (dbus_error_is_set(&error)) {
g_warning("Add dbus fcitx signal fail:%s", error.message);
dbus_error_free(&error);
return NULL;
}
while (dbus_connection_read_write_dispatch(connection, 20));
return NULL;
}
int main(int argc,String *argv){
// Use a thread loop event
g_thread_new("FXNative_eventLoop", FXNative_eventLoop, NULL);
}
```
The following code is for me to transfer the keyboard sequence to fcitx through the dbus interface through gtk:
```c
bool FXNative_processKeyEvent(InputContext *context, KeywordEvent event) {
DBusMessage *message = dbus_message_new_method_call(
"org.freedesktop.portal.Fcitx",
context->objectPath, "org.fcitx.Fcitx.InputContext1",
"ProcessKeyEvent"
);
bool type = event.type;
uint32 time = event.time;
uint32 state = event.state;
uint32 keyVal = event.keyVal;
uint32 keyCode = event.keyCode;
//Append method args
dbus_message_append_args(
message,
DBUS_TYPE_UINT32, &keyVal,
DBUS_TYPE_UINT32, &keyCode,
DBUS_TYPE_UINT32, &state,
DBUS_TYPE_BOOLEAN, &type,
DBUS_TYPE_UINT32, &time,
DBUS_TYPE_INVALID
);
dbus_connection_send_with_reply_and_block(context->connection, message, 20, NULL);
// bool success = dbus_connection_send(context->connection, message, &serial);
// if (!success) {
// fprintf(stderr, "Send keyword event fail:OutOfMemory.\n");
// }
// serial++;
// return success;
}
```
> dbus_connection_send_with_reply_and_block method will always block the gtk main loop,if I change the method to dbus_connection_send, it will not block,But there's a problem with this. I can't immediately know the results returned by fcitx.