After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 495623 - XDMCP Logins don't work from or to GDM in 2.20
XDMCP Logins don't work from or to GDM in 2.20
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.20.x
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-10 16:07 UTC by John Brook
Modified: 2007-11-27 21:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
a different misc.c patch (727 bytes, patch)
2007-11-14 16:51 UTC, Ely Levy
none Details | Review
Fixed hints patch against 2.20 release (757 bytes, patch)
2007-11-15 20:47 UTC, Ely Levy
none Details | Review
The hints diff against svn (1.12 KB, patch)
2007-11-16 09:12 UTC, Ely Levy
committed Details | Review
log file (79.34 KB, application/x-bzip2)
2007-11-27 01:37 UTC, Andrew
  Details
close XDMCP socket (1.99 KB, patch)
2007-11-27 15:06 UTC, Andrew Ziem
committed Details | Review
gdm-2.20.1-svnfixes.patch (4.32 KB, patch)
2007-11-27 21:35 UTC, Pacho Ramos
none Details | Review

Description John Brook 2007-11-10 16:07:21 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)
Comment 1 Dylan Leigh 2007-11-12 06:16:52 UTC
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



Comment 2 Brian Cameron 2007-11-12 18:18:41 UTC
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.
Comment 3 Dylan Leigh 2007-11-14 04:07:35 UTC
That's fixed the problem on my FreeBSD system, thanks!
Comment 4 Ely Levy 2007-11-14 16:51:10 UTC
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)
Comment 5 Brian Cameron 2007-11-14 18:22:29 UTC
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.
Comment 6 John Brook 2007-11-15 14:45:09 UTC
(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...

Comment 7 John Brook 2007-11-15 15:32:02 UTC
(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.
Comment 8 Brian Cameron 2007-11-15 18:17:57 UTC
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.
Comment 9 Ely Levy 2007-11-15 20:47:35 UTC
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
Comment 10 Ely Levy 2007-11-16 09:12:07 UTC
Created attachment 99194 [details] [review]
The hints diff against svn

Port of the hints patch to svn.
Comment 11 John Brook 2007-11-16 10:37:27 UTC
(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           
Comment 12 Brian Cameron 2007-11-16 18:12:53 UTC
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.
Comment 13 Pacho Ramos 2007-11-24 11:51:17 UTC
Similar problem under gentoo:
http://bugs.gentoo.org/show_bug.cgi?id=199606
Comment 14 Andrew 2007-11-27 01:37:37 UTC
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.
Comment 15 Andrew Ziem 2007-11-27 15:06:07 UTC
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?
Comment 16 Brian Cameron 2007-11-27 17:44:58 UTC
Thanks.  Fixed in SVN head.

As Andrew asked, does this fix the XDMCP problems people have reported?
Comment 17 Brian Cameron 2007-11-27 17:51:24 UTC
Oops, I meant to say "Fixed in 2.20 branch".  This is not a SVN head issue.
Comment 18 Pacho Ramos 2007-11-27 21:25:49 UTC
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)
Comment 19 Pacho Ramos 2007-11-27 21:35:54 UTC
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
Comment 20 Brian Cameron 2007-11-27 21:40:13 UTC
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.