GTestDBus issues
@walters
Submitted by Colin Walters Assigned to David Zeuthen
Link to original bug (#678808)
Description
I'm trying to debug why gio/tests/actions is failing with this symptom:
(/src/glib/gio/tests/.libs/lt-actions:18165): GLib-GIO-WARNING **: Weak notify timeout, object ref_count=1
This seems to be a refcounting issue on the bus. While debugging this, I've had to try to understand what is going on in GTestDBus. This bug report will list the issues as I find them.
-
Calling g_setenv/g_unsetenv() in a multi-threaded process is broken. See https://bugzilla.gnome.org/show_bug.cgi?id=659326
-
#ifdef G_OS_WIN32 /* We Need this to get the pid returned on win32 */ G_SPAWN_DO_NOT_REAP_CHILD | #endif
Is broken. We don't know the lifetime of the pid unless we have a watch. Really gspawn.c should have a g_return_if_fail on this.
-
There's Windows-specific code to attempt to kill the bus if the test crashes, but this code is missing the Linux equivalent - prctl(PR_SET_PDEATHSIG).
-
Code assumes bus addresses don't have spaces/shell metacharacters: "dbus-monitor --address %s"