GNOME Bugzilla – Bug 687074
don't mutilate the shared session bus
Last modified: 2012-11-08 09:05:18 UTC
This code in gproxyvolumemonitor.c is evil: the_session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); if (error != NULL) { g_printerr ("cannot connect to the session bus: %s (%s, %d)\n", error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); goto out; } g_dbus_connection_set_exit_on_close (the_session_bus, FALSE); It changes the exit-on-close behaviour of the shared session bus connection. I just spent a few hours tracking down why tracker-miner-fs is not dying when its session bus connection goes away - this is why. g_proxy_volume_monitor_teardown_session_bus_connection looks evil too - it closes the shared session bus connection, which is equally bad. Finally, Colin points out that we should probably remove the g_getenv ("DBUS_SESSION_BUS_ADDRESS") and patch callers to setenv (GIO_USE_VFS=local)
Created attachment 227729 [details] [review] proxy volume monitor: Don't disable exit_on_close on session bus (In reply to comment #0) > This code in gproxyvolumemonitor.c is evil: > > the_session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); > if (error != NULL) > { > g_printerr ("cannot connect to the session bus: %s (%s, %d)\n", > error->message, g_quark_to_string (error->domain), > error->code); > g_error_free (error); > goto out; > } > g_dbus_connection_set_exit_on_close (the_session_bus, FALSE); > > > It changes the exit-on-close behaviour of the shared session bus connection. > I just spent a few hours tracking down why tracker-miner-fs is not dying when > its session bus connection goes away - this is why. Agree, this is evil. Again a leftover from the old code where it was working in a different way. I've checked the rest of the code, this is the last occurence, only fuse daemon requires the call since it's wrapped in a fuse mainloop.
Created attachment 227730 [details] [review] proxy volume monitor: Get session bus on demand (In reply to comment #0) > g_proxy_volume_monitor_teardown_session_bus_connection looks evil too - it > closes the shared session bus connection, which is equally bad. This patch changes the way session bus is connected to. Instead of connect & use as global/static instance, let's keep the work on proxies. This also changes the way we report errors, instead of explicit connect attempt on module load and reporting error immediately, we keep error reporting on proxies. Shouldn't make any difference. At the end, g_proxy_volume_monitor_teardown_session_bus_connection() was renamed to g_proxy_volume_monitor_unload_cleanup().
(In reply to comment #0) > Finally, Colin points out that we should probably remove the g_getenv > ("DBUS_SESSION_BUS_ADDRESS") and patch callers to setenv (GIO_USE_VFS=local) That would be great, however tracking users is difficult as nearly everybody use GIO nowadays. Do we want to go the risky way? This is not easy to find out, see the discussion in bug 526454. Looks more like a GnomeGoal to me.
Review of attachment 227730 [details] [review]: Looks great to me, thanks.
(In reply to comment #3) > (In reply to comment #0) > > Finally, Colin points out that we should probably remove the g_getenv > > ("DBUS_SESSION_BUS_ADDRESS") and patch callers to setenv (GIO_USE_VFS=local) > > That would be great, however tracking users is difficult as nearly everybody > use GIO nowadays. Do we want to go the risky way? This is not easy to find out, > see the discussion in bug 526454. Looks more like a GnomeGoal to me. Fine with me to leave that as is for now.
Committed both patches to master and a lighter variant of the second patch also in stable gnome-3-6 branch.
leftover tracker-miner-fs processes break the ability to shutdown respective reboot into windows/gaming operating system for non administators and non hackers as the system behaves as there would be still another user session. Usability in a "family environment" is degraded by this bug. I hope this bug will vanish in gnome-3.6.2 .