Re: [gdm-list] GDM D-Bus on Solaris




Jon:

I was able to track down the problem with GDM not working on Solaris.  It
turns out that various processes were crashing due to g_debug calls that
were passing NULLS in as arguments.  The attached patch fixes these issues
and now the GDM dialog asks me for username and password and I can log
in using the new GDM.  That makes it a lot easier for me to work on the
new GDM, and start doing more interesting things than just getting it
to work on Solaris.  Can this patch go upstream?

I figured out the problem by using truss, and it highlighted that certain
processes were causing a SEGV, and that helped to track down the problem.
Havoc recommended this when I asked about this problem on the dbus mail
list.  In that discussion, Havoc had some recommendations about how the
generate_address function could be improved:

  http://lists.freedesktop.org/archives/dbus/2007-September/008416.html
  http://lists.freedesktop.org/archives/dbus/2007-September/008417.html

Brian


I just updated to ConsoleKit head and to gdm-gobject head to see if
that would help.  It's now failing immediately after starting X, and
won't display the dialog anymore.  I'm seeing this in the syslog
output:

Sep  5 17:12:57 brianca gdm-simple-slave[21301]: [ID 702911 daemon.warning]
      DEBUG: obj_path=/org/gnome/DisplayManager/GreeterServer
      interface=org.gnome.DisplayManager.GreeterServer method=GetDisplayId
Sep  5 17:12:57 brianca gdm-session-worker[21335]: [ID 702911 daemon.warning]
      DEBUG: connecting to address:
      unix:path=/tmp/dbus-NZVajPMdCn,guid=aa76d498af6a38a1f31def0046df29e9
Sep  5 17:12:57 brianca gdm-simple-greeter[21330]: [ID 702911 daemon.warning]
      WARNING: Unable to GetDisplayId: Connection was disconnected before a reply
      was received
Sep  5 17:12:57 brianca gdm-session-worker[21335]: [ID 702911 daemon.warning]
      WARNING: error opening connection: Failed to connect to socket
     /tmp/dbus-NZVajPMdCn: Connection refused

I notice the perms on the /tmp/dbus-* file is as follows:

srwxrwxrwx   1 root     root           0 Sep  5 17:12 dbus-NZVajPMdCn

It sort of seems that the gdm-session-worker is failing to start up for
some reason?  I'm guessing this is causing GetDisplayId to fail?

This seems somewhat similar to the previous problem of InfoQuery failing
since both are handled by gdm-greeter-server.c and GetDisplayId is a new
thing you just added.

Isn't this the private D-Bus connection between the greeter and the daemon
for passing username and password information and other private communications?
If so, isn't this a special kind of D-Bus connection?  I'm wondering if
there are any special configurations I need in order to make this work on
Solaris.

Ay ideas?

Brian


Looking a bit more closely at the problem, I found that the worker was
crashing on a g_debug line because username is NULL, and Solaris tends
to crash in printf functions if you pass in NULL for an argument.  I
think the attached patch should be applied to the branch to avoid
crashing on the g_debug line.

After applying this patch, I can see it getting farther along based on
the /var/adm/messages information, but it still seems to fail with the
same error (showing "Prompt:" and not letting you actually log in).

Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: Verifying user: (null) host:  service: gdm tty: /dev/console
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: initializing PAM
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: authenticating user
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: 1 new messages received from PAM
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: received pam message of type 2 with payload 'Username:'
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning] WARNING: Unable to send InfoQuery: Connection was disconnected before a
     reply was received
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: PAM conversation returning 6
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: authentication returned 6: Conversation failure
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: uninitializing PAM
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: Unable to verify user
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: Conversation failure
Sep 4 18:40:43 brianca gdm-session-worker[1871]: [ID 702911 daemon.warning]
     DEBUG: Verification failed: Conversation failure

Not sure why the D-Bus conversation would fail at this point. It seems that we are getting the "Username:" request, but failing when GDM tries to respond
to this.  Any tips to further debug?

One other thing I noticed that is probably a bug on Solaris is that
/usr/sbin/dbus-daemon-launch-helper is not set to the right permissions
and did not have the setuid bit set.  So now I fixed it on my machine to be
chmod 4750 owner root:root.  Not sure if this affects how GDM would work
or not.

Brian


On 8/31/07, Brian Cameron <Brian Cameron sun com> wrote:
However, the greeter doesn't seem particularly functional for starting my
session.  A dialog comes up and asks "Prompt".  If I type something and
hit the OK button, the dialog disappears and things just hang. If I hit
the Cancel button it also does the same thing.
If it says "Prompt" that means that it isn't being commanded by the
GdmSession to ask a particular question.  And indicates a problem...
Ok, thanks.

Do I need to install libpam-ck-connector or something? I notice the following
debug messages in my syslog.  It seems that the greeter is sending my
username, but the answer is empty for some reason.  I think the DBUS
destroyed message might have been caused by my killing the Xserver with
Ctrl-Alt-Backspace, but am not sure.
No you don't need libpam-ck-connector.  Seems like one of the
processes is dying.  Can you try attaching a debugger to the various
gdm processes to find out what is going on?
Could you explain what processes should be running when the new GDM is
working properly?  It would be helpful if you could give me a feeling
for how the processes talk to each other.  I assume it is a bit
different than the old daemon/slave-daemon/GUI model?

Brian

_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list

Index: gdm-session.c
===================================================================
--- gdm-session.c	(revision 5232)
+++ gdm-session.c	(working copy)
@@ -1069,13 +1069,17 @@
                          DBusMessage     *message,
                          void            *user_data)
 {
+        const char *dbus_destination = dbus_message_get_destination (message);
+        const char *dbus_path        = dbus_message_get_path (message);
+        const char *dbus_interface   = dbus_message_get_interface (message);
+        const char *dbus_member      = dbus_message_get_member (message);
+
         g_debug ("session_message_handler: destination=%s obj_path=%s interface=%s method=%s",
-                 dbus_message_get_destination (message),
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_destination ? dbus_destination : "(null)",
+                 dbus_path        ? dbus_path        : "(null)",
+                 dbus_interface   ? dbus_interface   : "(null)",
+                 dbus_member      ? dbus_member      : "(null)");
 
-
         if (dbus_message_is_method_call (message, "org.freedesktop.DBus", "AddMatch")) {
                 DBusMessage *reply;
 
@@ -1149,18 +1153,18 @@
                             DBusMessage    *message,
                             void           *user_data)
 {
-        GdmSession *session = GDM_SESSION (user_data);
-        const char *path;
+        GdmSession *session        = GDM_SESSION (user_data);
+        const char *dbus_path      = dbus_message_get_path (message);
+        const char *dbus_interface = dbus_message_get_interface (message);
+        const char *dbus_message   = dbus_message_get_member (message);
 
-        path = dbus_message_get_path (message);
-
         g_debug ("obj_path=%s interface=%s method=%s",
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_path      ? dbus_path      : "(null)",
+                 dbus_interface ? dbus_interface : "(null)",
+                 dbus_message   ? dbus_message   : "(null)");
 
         if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected")
-            && strcmp (path, DBUS_PATH_LOCAL) == 0) {
+            && strcmp (dbus_path, DBUS_PATH_LOCAL) == 0) {
 
                 g_debug ("Disconnected");
 
Index: gdm-session-relay.c
===================================================================
--- gdm-session-relay.c	(revision 5232)
+++ gdm-session-relay.c	(working copy)
@@ -533,13 +533,17 @@
                                 DBusMessage     *message,
                                 void            *user_data)
 {
+        const char *dbus_destination = dbus_message_get_destination (message);
+        const char *dbus_path        = dbus_message_get_path (message);
+        const char *dbus_interface   = dbus_message_get_interface (message);
+        const char *dbus_member      = dbus_message_get_member (message);
+
         g_debug ("session_relay_message_handler: destination=%s obj_path=%s interface=%s method=%s",
-                 dbus_message_get_destination (message),
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_destination ? dbus_destination : "(null)",
+                 dbus_path        ? dbus_path        : "(null)",
+                 dbus_interface   ? dbus_interface   : "(null)",
+                 dbus_member      ? dbus_member      : "(null)");
 
-
         if (dbus_message_is_method_call (message, "org.freedesktop.DBus", "AddMatch")) {
                 DBusMessage *reply;
 
@@ -583,18 +587,18 @@
                             DBusMessage    *message,
                             void           *user_data)
 {
-        GdmSessionRelay *session_relay = GDM_SESSION_RELAY (user_data);
-        const char      *path;
+        GdmSessionRelay *session_relay  = GDM_SESSION_RELAY (user_data);
+        const char      *dbus_path      = dbus_message_get_path (message);
+        const char      *dbus_interface = dbus_message_get_interface (message);
+        const char      *dbus_message   = dbus_message_get_member (message);
 
-        path = dbus_message_get_path (message);
-
         g_debug ("obj_path=%s interface=%s method=%s",
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_path      ? dbus_path      : "(null)",
+                 dbus_interface ? dbus_interface : "(null)",
+                 dbus_message   ? dbus_message   : "(null)");
 
         if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected")
-            && strcmp (path, DBUS_PATH_LOCAL) == 0) {
+            && strcmp (dbus_path, DBUS_PATH_LOCAL) == 0) {
 
                 g_debug ("Disconnected");
 
Index: gdm-greeter-server.c
===================================================================
--- gdm-greeter-server.c	(revision 5232)
+++ gdm-greeter-server.c	(working copy)
@@ -529,13 +529,17 @@
                                 DBusMessage     *message,
                                 void            *user_data)
 {
+        const char *dbus_destination = dbus_message_get_destination (message);
+        const char *dbus_path        = dbus_message_get_path (message);
+        const char *dbus_interface   = dbus_message_get_interface (message);
+        const char *dbus_member      = dbus_message_get_member (message);
+
         g_debug ("greeter_server_message_handler: destination=%s obj_path=%s interface=%s method=%s",
-                 dbus_message_get_destination (message),
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_destination ? dbus_destination : "(null)",
+                 dbus_path        ? dbus_path        : "(null)",
+                 dbus_interface   ? dbus_interface   : "(null)",
+                 dbus_member      ? dbus_member      : "(null)");
 
-
         if (dbus_message_is_method_call (message, "org.freedesktop.DBus", "AddMatch")) {
                 DBusMessage *reply;
 
@@ -580,17 +584,17 @@
                             void           *user_data)
 {
         GdmGreeterServer *greeter_server = GDM_GREETER_SERVER (user_data);
-        const char      *path;
+        const char       *dbus_path      = dbus_message_get_path (message);
+        const char       *dbus_interface = dbus_message_get_interface (message);
+        const char       *dbus_message   = dbus_message_get_member (message);
 
-        path = dbus_message_get_path (message);
-
         g_debug ("obj_path=%s interface=%s method=%s",
-                 dbus_message_get_path (message),
-                 dbus_message_get_interface (message),
-                 dbus_message_get_member (message));
+                 dbus_path      ? dbus_path      : "(null)",
+                 dbus_interface ? dbus_interface : "(null)",
+                 dbus_message   ? dbus_message   : "(null)");
 
         if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected")
-            && strcmp (path, DBUS_PATH_LOCAL) == 0) {
+            && strcmp (dbus_path, DBUS_PATH_LOCAL) == 0) {
 
                 g_debug ("Disconnected");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]