Bug 110315 - GDM miscounts current sessions
Summary: GDM miscounts current sessions
Alias: None
Product: Fedora
Classification: Fedora
Component: gdm   
(Show other bugs)
Version: rawhide
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
Depends On: 114986
TreeView+ depends on / blocked
Reported: 2003-11-18 11:53 UTC by Phil Anderson
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-02 19:49:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gdm- (1.66 KB, patch)
2004-02-02 01:29 UTC, Warren Togami
no flags Details | Diff
gdm- (3.62 KB, text/plain)
2004-02-02 03:03 UTC, Warren Togami
no flags Details

Description Phil Anderson 2003-11-18 11:53:32 UTC
Description of problem:
GDM in fedora core 1 has broken 'Maximum Number of Sessions' in XDCMP.
 Instead of counting concurrent sessions, it counts the sessions which
have happened since the gdm process started.  i.e. it seems to forget
to subtract 1 from the session count when someone logs out.

After 16 log ins and log outs, you get 'XDCMP fatal error: Session
declined Maximum number of open sessions reached'

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Log in and out 16 times with XDCMP.
Actual results:
17th time will fail.

Expected results:
17th time will work.

Additional info:
Work around is to either restart gdm regularly, or set the limit to 9999.

There are no signs of stray processes from old sessions, so it seems
like the old sessions are logging out correctly.

Comment 1 Warren Togami 2004-01-28 10:10:48 UTC
Still broken in rawhide.  This is particularly crippling for K12LTSP
and my LUG's super-linux-advocacy presentation of K12LTSP at a huge
educator's conference on February 3rd.  Help!!!

Comment 2 Phil Anderson 2004-01-28 22:11:19 UTC
The work around which I'm using is to set in your /etc/X11/gdm/gdm.conf


And I restart gdm nightly.

Comment 3 Stephen Walton 2004-01-29 05:16:06 UTC
I don't know if this helps, but I had a chance to look at the source
code and compare it with an older version of gdm.  The culprit seems
to be in display.c lines 411 ff:

    if (d->type == TYPE_XDMCP) {
        if (d->dispstat == XDMCP_MANAGED)
        else if (d->dispstat == XDMCP_PENDING)
        d->type = -1;

In the older version the same code read

    if (d->type == TYPE_XDMCP) {
        if (d->dispstat == XDMCP_PENDING)
                  d->type = -1;

If you look in xdmcp.c, routine gdm_xdmcp_display_alloc increments
xdmcp_pending when it creates a PENDING display, and
gdm_xdmcp_handle_manage decrements xdmcp_pending and increments
xdmcp_sessions when converting a PENDING display to an actual one.  So
the first form of the code above <i>looks</i> correct, but obviously
isn't doing the right thing for some reason.

Comment 4 Warren Togami 2004-02-02 01:29:31 UTC
Created attachment 97405 [details]

It turns out to be a race condition already fixed in gdm-  I copied
and tested the relevant code from upstream into this patch.  Tested in FC2
rawhide only.  Please test in FC1.

Comment 5 Warren Togami 2004-02-02 03:03:27 UTC
Created attachment 97406 [details]

* Sun Feb 01 2004 Warren Togami <wtogami@redhat.com> 1:
- patch30 xdmcp_session counter fix from gdm- #110315
- automake14 really needed, not automake
- BR libcroco-devel, libcroco-devel, libattr-devel, gettext
- conditionally BR libselinux-devel
- explicit epoch in all deps

Comment 6 Warren Togami 2004-02-02 19:49:20 UTC
You should see this in rawhide soon.

Comment 7 Warren Togami 2004-02-04 05:43:34 UTC
updated xdmcp_sessions patch adds two missing lines from upstream CVS

Comment 8 Stephen Walton 2004-02-10 04:40:42 UTC
I know this is closed but wanted to post that the fix works for me. 
Thanks, Warren!

Note You need to log in before you can comment on or make changes to this bug.