GNOME Bugzilla – Bug 495623
XDMCP Logins don't work from or to GDM in 2.20
Last modified: 2007-11-27 21:40:13 UTC
Please describe the problem: This problem was first reported over at Ubuntu's Launchpad. I'm raising it here because they seem to think that upstream should fix the problem. I'm hit by this problem, and would love to see it fixed! I have 2 Ubuntu 7.10 GNOME 2.20 desktops on the same network with no firewall settings, one has XDMCP enabled for remote logins. When I try to connect to it, I see a "dead" X screen (with the X cursor in the middle) for a split second, then I'm returned to my local login screen. The GDM starts without problems while XDMCP is enabled, but the XDMCP connection does not work as explained above. The problem occurs in both 2.20.0 and 2.20.1. Steps to reproduce: 1. Enable Remote Login on PC1 running Ubuntu Gusty/7.10 from Administration > Login Window > Remote with Style same as Login 2. Reboot PC1 to complete enabling the Remote Login. 3. From another PC (PC2) running Ubuntu Gusty/7.10, use Options > Remote Login via XDMCP from the Login Screen 4. PC1 appears on the list. 5. Select PC1, click on connect <problem occurs now!> Actual results: I see a "dead" X screen (with the X cursor in the middle) for a split second, then I'm returned to my local login screen. Or If I was using the switch user option, I'm returned to the lock screen window asking for my local login password. Expected results: I would expect the remote computer's GDM screen to appear, allowing me to log in to GNOME. Does this happen every time? Yes. Other information: It would appear to be a GDM rather than X bug. KDM works fine on the same computers, but only if KDM is used on both computers. There have been many confirmations and a fair amount of discussion about this bug on Ubuntu sites. The following links may have useful info in tracking down the cause. HTH Launchpad bug url: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/150193 Ubuntuforums discussions: http://ubuntuforums.org/showthread.php?p=3485884 http://ubuntuforums.org/showthread.php?t=605976 http://ubuntuforums.org/showthread.php?t=565383 (24 posts, 3239 views)
Just confirming that it occurs on NetBSD and FreeBSD as well. http://www.nabble.com/remaining-issues-with-gnome-2.20-t4721430.html http://lists.freebsd.org/pipermail/freebsd-gnome/2007-November/018561.html
Could someone test if the patch in bug #494817 fixes this problem? That patch fixes some issues noticed on Solaris, and gets XDMCP working on that platform. I'm wondering if this is the same issue.
That's fixed the problem on my FreeBSD system, thanks!
Created attachment 99095 [details] [review] a different misc.c patch I would do the misc.c part a bit differently. This way ipv6 address will be preferable where possible. This also solve https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/150193 (gdm doesn't add the right host to xauthority when ipv6 enabled on ipv4 system)
This patch has a few issues: 1) hints.ai_family is not a bitmask so the |= doesn't make sense 2) Please provide a patch against the latest code in the 2.20 branch, not against the released 2.20.x releases. This patch doesn't apply against the 2.20 branch.
(In reply to comment #2) > Could someone test if the patch in bug #494817 fixes this problem? That patch > fixes some issues noticed on Solaris, and gets XDMCP working on that platform. > I'm wondering if this is the same issue. > Hi Brian, This patch builds properly for me on Ubuntu 7.10 (i386 & amd64) and GDM allows local logins as expected. However, it doesn't fix the problem I'm seeing with xdmcp. Remote logins still fail in the manner described in the original bug report. Will try Ely's patch to see if that makes any difference...
(In reply to comment #4) > Created an attachment (id=99095) [edit] > a different misc.c patch > > I would do the misc.c part a bit differently. This way ipv6 address will be > preferable where possible. > This also solve https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/150193 > (gdm doesn't add the right host to xauthority when ipv6 enabled on ipv4 system) > I took Brian's patch from bug #494817, removed the misc.c part, and replaced it with Ely's misc.c patch. I think that was the recommendation in comment #4. If not, let me know and I'll retest. Testing on Ubuntu 7.10 again, trying to log in from i386 via xdmcp to amd64. This patch doesn't appear to fix the bug either. I have _exactly_ the same behaviour as described in the above bug report. Build and local login are fine with the patch gdm, as per testing on Brian's original patch, but xdmcp is still broken.
Does it make a difference if you configure GDM to have IPv6 turned off by default? Note in configure you can pass --enable-ipv6=yes|no to turn this on or off. Some people have complained that when IPv6 is turned on that it doesn't work when using IPv4.
Created attachment 99168 [details] [review] Fixed hints patch against 2.20 release This patch is against 2.20 release (not trunk) With = instead of |= according to Brian comment
Created attachment 99194 [details] [review] The hints diff against svn Port of the hints patch to svn.
(In reply to comment #8) > Does it make a difference if you configure GDM to have IPv6 turned off by > default? Note in configure you can pass --enable-ipv6=yes|no to turn this on > or off. Some people have complained that when IPv6 is turned on that it > doesn't work when using IPv4. > Disabling IPv6 makes no change to the observed behaviour for me. I installed IPv6-disabled GDMs on both local and remote boxes, but the bug was still the same. So the bug would appear to be independent of any IPv4/6 issues. There was a difference in the netstat -puntl report for the server for each version. The output is below, with results for ntpd included for comparison. GDM with IPv6 enabled (ntpd for comparison) # netstat -puntl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 10.x.x.x:123 0.0.0.0:* 8566/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 8566/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 8566/ntpd udp6 0 0 :::177 :::* 7990/gdm udp6 0 0 ::1:123 :::* 8566/ntpd udp6 0 0 fe80::xxxx:xxx:xxxx:123 :::* 8566/ntpd udp6 0 0 :::123 :::* 8566/ntpd GDM with IPv6 disabled (ntpd for comparison) # netstat -puntl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 0.0.0.0:177 0.0.0.0:* 3434/gdm udp 0 0 10.x.x.x:123 0.0.0.0:* 8566/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 8566/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 8566/ntpd udp6 0 0 ::1:123 :::* 8566/ntpd udp6 0 0 fe80::xxxx:xxx:xxxx:123 :::* 8566/ntpd udp6 0 0 :::123 :::* 8566/ntpd
You might try seeing if you have TCP enabled with your Xserver. Some people have claimed that the setting of DisallowTCP in the GDM configuration makes a difference. Also, you might search the gdm-list archives. XDMCP problems come up pretty regularly and there may be other ideas that I've forgotten. For example, I vaguely remember someone pointing out XDMCP was not behaving properly when their firewall was setup incorrectly. Also, John, you could turn on GDM debug (turn on Enable=true in the [debug] section) and share with us the "gdm" related messages that get sent to your syslog (/var/log/messages). Please attach them to this bug report. Also, Ely, I commited the patch.
Similar problem under gentoo: http://bugs.gentoo.org/show_bug.cgi?id=199606
Created attachment 99691 [details] log file I am attaching a log file from gdm-2.20.1-7fc8. It seems Fedora 8 incorporated a patch similar/same to the one in this thread, and I added the patch from Gnome bug 498277. Info about GDM on Fedora 8: http://cvs.fedoraproject.org/viewcvs/rpms/gdm/F-8/ This morning, I could get 5 people logged in (out of about 20). I added debug and disallowtcp=true to the log file and rebooted about 12 noon, and now I have 11 people. The debug log does not produce any entries around the time of my latest XDMCP attempts (Nov 26 18:05 or so). My newest XDMCP attempts are still getting the gray X screen.
Created attachment 99719 [details] [review] close XDMCP socket Mainly, this patch closes the XDMCP socket. Without the patch, running gdm-restart would not allow XDMCP connections (which you can see in the log file where binding the socket fails). Also, I removed an unused function and fixed a typo that may have affected how GDM counts the number of active sessions. Are people still having XDMCP trouble with GDM 2.20.2 plus this patch?
Thanks. Fixed in SVN head. As Andrew asked, does this fix the XDMCP problems people have reported?
Oops, I meant to say "Fixed in 2.20 branch". This is not a SVN head issue.
I have just tried the patch but problem related in: http://bugs.gentoo.org/show_bug.cgi?id=199606 is still valid :-( (this is maube a different problem then)
Created attachment 99743 [details] [review] gdm-2.20.1-svnfixes.patch At least :-D I found the patch applied in mandriva src.rpm that fixes this :-) Reading chosen name, seems that this should be already fixed in gdm then
Okay, I'm marking this bug as fixed then. If there are more issues with XDMCP, please open a new bug. This one is already cluttered with too many sort-of-related issues.