gdbus-peer test occasionally fails with “connection is closed”
For example in this test run:
237/367 glib:gio / gdbus-peer RUNNING
>>> G_TEST_SRCDIR=/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/gio/tests MALLOC_PERTURB_=192 G_ENABLE_DIAGNOSTIC=1 G_DEBUG=gc-friendly LD_LIBRARY_PATH=/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio:/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gobject:/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio/tests/gdbus-object-manager-example:/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gmodule:/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/glib GIO_LAUNCH_DESKTOP=/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio/gio-launch-desktop G_TEST_BUILDDIR=/var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio/tests MALLOC_CHECK_=2 GIO_MODULE_DIR='' /var/tmp/gitlab_runner/builds/Ff4WDDRj/0/GNOME/glib/_build/gio/tests/gdbus-peer
▶ 237/367 /gdbus/peer-to-peer OK
▶ 237/367 /gdbus/delayed-message-processing OK
▶ 237/367 /gdbus/nonce-tcp OK
▶ 237/367 /gdbus/tcp-anonymous OK
▶ 237/367 /gdbus/credentials OK
▶ 237/367 /gdbus/codegen-peer-to-peer - GLib-GIO:ERROR:../gio/tests/gdbus-peer.c:2155:codegen_test_peer: assertion failed (error == NULL): The connection is closed (g-io-error-quark, 18) FAIL
▶ 237/367 ERROR
237/367 glib:gio / gdbus-peer ERROR 0.96s killed by signal 6 SIGABRT
――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
stderr:
**
GLib-GIO:ERROR:../gio/tests/gdbus-peer.c:2155:codegen_test_peer: assertion failed (error == NULL): The connection is closed (g-io-error-quark, 18)
I can’t immediately see what would be wrong: the test uses isolated dirs, and the test D-Bus server is started specifically for the test, in a unique temp dir. I wonder if there’s some refcount mess going on which means the connection gets disposed and dropped unexpectedly early.