Bug 694

Summary: getltscfg crashes with a segfault
Product: LTSP Reporter: Henry Laxen <nadine.and.henry>
Component: LTSP CoreAssignee: Jim McQuillan <jam>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Henry Laxen 2004-05-31 06:28:58 UTC
I have uncovered a very strange bug in getltscfg.  First some
background.  This bug only happens when I run getltscfg on my HP
T5500 client.  It does NOT happen when I run the identical test
through the getltscfg on my server, even though the code (same
binary) is identical.  First here is the ltsp.conf input file
that works okay:


[Default]
        SERVER             = 192.168.0.10
 	SYSLOG_HOST	   = 192.168.0.10
        XSERVER            = auto
	X_MOUSE_PROTOCOL   = "PS/2"
	X_MOUSE_DEVICE     = "/dev/psaux"
	X_MOUSE_RESOLUTION = 400
	X_MOUSE_PROTOCOL   = "IMPS/2"
	X_MOUSE_BUTTONS    = 3
	X_ZAxisMapping     = "4 5"
	USE_XFS            = Y
	LOCAL_APPS         = Y
        NIS_DOMAIN         = localdomain
        NIS_SERVER         = 192.168.0.10
        RUNLEVEL           = 5
	SCREEN_01          = startx
	DISABLE_ACCESS_CONTROL = Y
	X_HORZSYNC 	   = "31-115"
	X_COLOR_DEPTH	   = 16
	X_MODE_0 	   = 1280x1024  135.0  1280 1296 1440 1688  1024 1025 1028 1066
+hsync +vsync
#	X_MODE_1 	   = 1024x768 75 1024 1048 1184 1328 768  771  777  806  -hsync -vsync
#	X_MODE_2 	   = 800x600  50 800  856  976 1040  600  637  643  666  +hsync +vsync
#	X_MODE_3 	   = 640x480  36 640  696  752  832  480  481  484  509  -hsync -vsync
	SOUND           = Y

[j4]
	SOUND_DAEMON    = esd
	SMODULE_01      = soundcore
	SMODULE_02      = ac97_codec
	SMODULE_03      = via82cxxx_audio
	MODULE_01	= usb-uhci
	MODULE_02	= keybdev
	MODULE_03	= usbkbd
	MODULE_04	= mousedev
	MODULE_05	= usbmouse
	X_MOUSE_DEVICE	= /dev/input/mice
	X_MODE_0 	= 1280x1024
	X_COLOR_DEPTH	= 24

Now if I move the four lines, starting at SOUND_DAEMON and
ending at SMODULE_03 to the end, so that the [j4] block looks
like:

[j4]
	MODULE_01	= usb-uhci
	MODULE_02	= keybdev
	MODULE_03	= usbkbd
	MODULE_04	= mousedev
	MODULE_05	= usbmouse
	X_MOUSE_DEVICE	= /dev/input/mice
	X_MODE_0 	= 1280x1024
	X_COLOR_DEPTH	= 24
	SOUND_DAEMON    = esd
	SMODULE_01      = soundcore
	SMODULE_02      = ac97_codec
	SMODULE_03      = via82cxxx_audio

I get a segfault.  Here is the output from my session on the HP



-bash-2.05b$ cd /bin
-bash-2.05b$ ./getltscfg -a
SERVER="192.168.0.10"
SYSLOG_HOST="192.168.0.10"
XSERVER="auto"
X_MOUSE_PROTOCOL="IMPS/2"
X_MOUSE_DEVICE="/dev/input/mice"
X_MOUSE_RESOLUTION="400"
X_MOUSE_BUTTONS="3"
X_ZAXISMAPPING="4 5"
USE_XFS="Y"
LOCAL_APPS="Y"
NIS_DOMAIN="localdomain"
NIS_SERVER="192.168.0.10"
RUNLEVEL="5"
SCREEN_01="startx"
DISABLE_ACCESS_CONTROL="Y"
X_HORZSYNC="31-115"
X_COLOR_DEPTH="24"
X_MODE_0="1280x1024"
SOUND="Y"
SOUND_DAEMON="esd"
SMODULE_01="soundcore"
SMODULE_02="ac97_codec"
SMODULE_03="via82cxxx_audio"
MODULE_01="usb-uhci"
MODULE_02="keybdev"
MODULE_03="usbkbd"
MODULE_04="mousedev"
MODULE_05="usbmouse"
export SERVER
export SYSLOG_HOST
export XSERVER
export X_MOUSE_PROTOCOL
export X_MOUSE_DEVICE
export X_MOUSE_RESOLUTION
export X_MOUSE_BUTTONS
export X_ZAXISMAPPING
export USE_XFS
export LOCAL_APPS
export NIS_DOMAIN
export NIS_SERVER
export RUNLEVEL
export SCREEN_01
export DISABLE_ACCESS_CONTROL
export X_HORZSYNC
export X_COLOR_DEPTH
export X_MODE_0
export SOUND
export SOUND_DAEMON
export SMODULE_01
export SMODULE_02
export SMODULE_03
export MODULE_01
export MODULE_02
export MODULE_03
export MODULE_04
export MODULE_05
-bash-2.05b$ ./getltscfg -a -c /etc/lts.conf-bad
Segmentation fault


diff lts.conf lts.conf-bad
37,40d36
<       SOUND_DAEMON    = esd
<       SMODULE_01      = soundcore
<       SMODULE_02      = ac97_codec
<       SMODULE_03      = via82cxxx_audio
48a45,48
>       SOUND_DAEMON    = esd
>       SMODULE_01      = soundcore
>       SMODULE_02      = ac97_codec
>       SMODULE_03      = via82cxxx_audio
Comment 1 Jim McQuillan 2004-05-31 07:15:38 UTC
This is a known problem and there is a fix for it.

You can grab a new getltscfg by doing this:

   wget http://www.ltsp.org/getltscfg

Then, copy that file to your /opt/ltsp/i386/bin directory and make sure it is
executable, it will take care of the problem.

This will be fixed in the ltsp-4.1 release.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.