Bug 114385 - kdm segfaults on XDMCP request
Summary: kdm segfaults on XDMCP request
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
: 115592 116143 116363 117305 123790 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-14 10:53 UTC by Jerome Borsboom
Modified: 2008-05-19 17:30 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Borsboom 2005-10-14 10:53:46 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.4 
OS:                Linux

When trying to start a new session from a non-local X client by XDMCP, kdm segfaults and the x-server is reset. The problem was traced to the display-configuration not being read from the kdmrc file. The 'LoadDisplayResources' call was removed from 'StartDisplay', but not added to the 'manage' function in xdmcp.c. The patch below corrects this problem.

--- kdebase-3.4.3/kdm/backend/xdmcp.c   2005-10-05 15:39:11.000000000 +0200
+++ kdebase-3.4.3/kdm/backend/xdmcp.c   2005-10-14 10:25:17.000000000 +0200
@@ -940,7 +940,13 @@
                        }
                        DisposeProtoDisplay( pdpy );
                        Debug( "starting display %s,%s\n", d->name, d->class2 );
-                       StartDisplay( d );
+                       if (d->status == notRunning)
+                               if (LoadDisplayResources( d ) < 0 ) {
+                                       LogError( "Unable to read configuration for display %s; "
+                                                 "stopping it.\n", d->name );
+                                       StopDisplay( d );
+                               else
+                                       StartDisplay( d );
                        CloseGetter();
                }
        }
Comment 1 Jerome Borsboom 2005-10-14 16:40:51 UTC
small error in the patch, below is one that compiles

-- kdebase-3.4.3/kdm/backend/xdmcp.c   2005-10-05 15:39:11.000000000 +0200
+++ kdebase-3.4.3/kdm/backend/xdmcp.c   2005-10-14 10:25:17.000000000 +0200
@@ -940,7 +940,14 @@
                        }
                        DisposeProtoDisplay( pdpy );
                        Debug( "starting display %s,%s\n", d->name, d->class2 );
-                       StartDisplay( d );
+                       if (d->status == notRunning)
+                               if (LoadDisplayResources( d ) < 0 ) {
+                                       LogError( "Unable to read configuration for display %s; "
+                                                 "stopping it.\n", d->name );
+                                       StopDisplay( d );
+                               }
+                               else
+                                       StartDisplay( d );
                        CloseGetter();
                }
        }
Comment 2 Oswald Buddenhagen 2005-10-15 11:07:54 UTC
thx, fixed in 3.4 and 3.5 branches.
fwiw, the status check is superfluous, as the display was just created in notRunning state. and the compiler might have warned about missing braces.
Comment 3 Oswald Buddenhagen 2005-11-03 10:28:47 UTC
*** Bug 115592 has been marked as a duplicate of this bug. ***
Comment 4 Oswald Buddenhagen 2005-11-11 20:04:43 UTC
*** Bug 116143 has been marked as a duplicate of this bug. ***
Comment 5 Bernie 2005-11-14 11:43:05 UTC
I had exactly the same problem: when contacting the server via VNC or XDMCP kdm 3.4.3-2 crashed (x86-64 , suse 10.0 with updates). Here I read that it should be fixed by now, so downloaded kdebase3-kdm-3.4.92-1.x86_64.rpm and installed this rpm package and rebooted. The problem still occurs! After trying to contact the server via VNC, the log shows:

bernie kernel: kdm[6287]: segfault at 0000000000000000 rip 0000000000418221 rsp 00007fffffb7f790 error 4
Nov 14 11:34:55 bernie kdm[5564]: Unknown session exit code 0 (sig 11) from manager process

rpm -qa | grep kdm --> kdebase3-kdm-3.4.92-1

Help!

Bernard
Comment 6 Oswald Buddenhagen 2005-11-14 20:19:53 UTC
*** Bug 116363 has been marked as a duplicate of this bug. ***
Comment 7 Oswald Buddenhagen 2005-11-29 23:04:49 UTC
*** Bug 117305 has been marked as a duplicate of this bug. ***
Comment 8 Oswald Buddenhagen 2006-04-12 10:28:50 UTC
*** Bug 123790 has been marked as a duplicate of this bug. ***