[Bug 1313042] Re: console-kit-daemon session hang (sometimes w/ Glib-CRITICAL warning)

Manfred Hampl 1313042 at bugs.launchpad.net
Tue May 20 09:36:16 UTC 2014


I assume that the GLIB-Critical messages can be avoided by adding some
statements to reset the IDs in the source to prevent calling
g_source_remove with an id that was already removed once:

e.g. for consolekit:
ck-job.c
        if (job->priv->out_watch_id > 0) {
                g_source_remove (job->priv->out_watch_id);
+              job->priv->out_watch_id = 0;
        }
        if (job->priv->err_watch_id > 0) {
                g_source_remove (job->priv->err_watch_id);
+              job->priv->err_watch_id = 0;
        }

ck-run-programs.c
        g_source_remove (cd->timeout_id);
+      cd->timeout_id = 0;

ck-tty-idle-monitor.c
        if (tty_idle_monitor->priv->timeout_id > 0) {
                g_source_remove (tty_idle_monitor->priv->timeout_id);
+              tty_idle_monitor->priv->timeout_id = 0;
        }

ck-vt-monitor.c
        if (vt_monitor->priv->process_queue_id > 0) {
                g_source_remove (vt_monitor->priv->process_queue_id);
+              vt_monitor->priv->process_queue_id = 0;
        }

(Not sure whether I correctly identified all cases where a variable should be reset after use.)
As already stated by others - the ssh hang most probably is not related to the GLIB critical error message noise.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to consolekit in Ubuntu.
https://bugs.launchpad.net/bugs/1313042

Title:
  console-kit-daemon session hang (sometimes w/ Glib-CRITICAL warning)

Status in “consolekit” package in Ubuntu:
  Confirmed

Bug description:
  The day I upgraded from 13.10 to 14.04 some of my ssh sessions into
  the new system (server side is Ubuntu 14.04) started hanging.

  The symptom is: I run some command with a lot of output (say a few
  hundreds of lines) in an ssh session, and the second the command
  completes, and the shell displays a new  prompt, the shell stops
  responding to keyboard input.

  At  the exact time of the hang (to the second) I always see these 3
  warnings in syslog:

  Apr 21 18:15:25 xx console-kit-daemon[3357]: GLib-CRITICAL: Source ID 469 was not found when attempting to remove it
  Apr 21 18:15:25 xx console-kit-daemon[3357]: GLib-CRITICAL: Source ID 86 was not found when attempting to remove it
  Apr 21 18:15:25 xx console-kit-daemon[3357]: GLib-CRITICAL: Source ID 86 was not found when attempting to remove it

  The Source ID numbers vary, but the warnings always come in triplets
  at the time of the hang.   I was able to reproduce this about 10 times
  today.  Every time the session hangs, these warnings appear in the log
  and vice versa: every time they appear in the log, I have a hanged
  remote session.

  A quote from an upstream (bugzilla.gnome.org) comment:

  https://bugzilla.gnome.org/show_bug.cgi?id=721369

      GLib recently started throwing a warning when g_source_remove()
      is passed garbage (as per warning). Your applications have probably been broken
      for a while, and there's no telling what could actually have happened in the
      past when g_source_remove() would happily close any random source because the
      programmer got the wrong argument to g_source_remove().

  So based on this I'm opening a bug against  consolekit for bad calls
  to g_source_remove() which seem to be related to the ssh hang.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/1313042/+subscriptions



More information about the foundations-bugs mailing list