Bug 8525
Summary: | Patch to fix a core dump in linuxconf | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Edward J. Huff <ejhuff> |
Component: | linuxconf | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-01-17 20:32:52 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Thanks for the patch. It will be included in linuxconf-1.17r2-2, which will be in the next release of Raw Hide. |
Enclosed find patches to fix a core dump in linuxconf, and how to build an unstripped version so that emacs/gdb will bring up the source code. (You ought to have available a way of easily building an entire system with no stripped code so any crash could be debugged easily and all of the source code should be kept ready for access by gdb. Disk space is cheap.) I did an install everything, then installed all of the upgrades up to Jan 1. Somehow I lost the LINUXCONF.distribution redhat line from /etc/conf.linuxconf. (The RPM database was apparently corrupted, claiming that linuxconf was both installed and not installed, or something, so I reinstalled it with the --replacepkgs option. The privileges were wrong on /etc/conf.linuxconf. Why didn't it show MD5 error? I guess because configuration files are allowed to change... I haven't tried to find out how this happened. linuxconf ought to display decent error dialogs so that you could easily figure out what was wrong. Or maybe rpm -V should notice if such vital lines in the /etc/conf.linuxconf file are missing. Missing LINUXCONF.distribution caused core dump in linuxconf. The core dump was caused by lack of init_dialog() call at top of linuxconf main(). Adding that fixed the core dump. (See patches below). The error messages were still very unilluminating, since they refered to path names containing "/DIST/" which is supposed to be substituted by either /def/ or the LINUXCONF.distribution string from /etc/conf.linuxconf. They ought to either give the translated string or add "Where DIST is the value of LINUXCONF.distribution in /etc/conf.linuxconf, or "def"". [root@desk linuxconf-1.16r10]# pwd /usr/src/redhat/BUILD/linuxconf-1.16r10 [root@desk linuxconf-1.16r10]# find . -name '*~' -ls 145004 16 -rw-r--r-- 1 root root 13232 Jan 16 02:49 ./main/main.cc~ 128950 12 -rw-r--r-- 1 root root 9647 Jan 16 02:49 ./Makefile~ [root@desk linuxconf-1.16r10]# diff main/main.cc main/main.cc~ 134d133 < init_dialog(); [root@desk linuxconf-1.16r10]# diff Makefile Makefile~ 81a82 > 92,93c93,94 < @echo "#omit strip $(BIN)/linuxconf" < @echo "#omit -strip -S $(LIB_LINUXCONF)/modules/*.so.*" --- > strip $(BIN)/linuxconf > -strip -S $(LIB_LINUXCONF)/modules/*.so.* 255c256 < --- > [root@desk linuxconf-1.16r10]# [root@desk bin]# pwd /var/tmp/linuxconf-root/bin [root@desk bin]# cd /usr/lib/linuxconf/ [root@desk linuxconf]# find . -name conf.daemons -ls [root@desk linuxconf]# cd /usr/src/redhat/BUILD/linuxconf-1.16r10/ [root@desk linuxconf-1.16r10]# find . -name '*.[ch]*' -exec grep conf.daemons {} \; -ls #define USR_LIB_CONF_DAEMONS USR_LIB_LINUXCONF "/DIST/conf.daemons" 128944 8 -rw-r--r-- 1 root root 7778 Jan 16 02:49 ./paths.h The name of the command is used to located more info in /etc/conf.daemons. 96495 8 -rw-r--r-- 1 root root 5012 Oct 23 1998 ./netconf/daemoni.cc Read a configuration file about command and path named (conf.daemons) mean that the conf.daemons files /* #Specification: conf.daemons / override The content of /usr/lib/linuxconf/conf.daemons can be overriden 96513 12 -rw-r--r-- 1 root root 8415 Nov 27 23:41 ./netconf/daemon1.cc #define USR_LIB_CONF_DAEMONS USR_LIB_LINUXCONF "/DIST/conf.daemons" 128520 8 -rw-r--r-- 1 root root 7777 Nov 27 23:22 ./paths.h.rhconf There is no such thing as /etc/conf.daemons (so comment is wrong) Also no such thing as /usr/lib/DIST/, but it turns out that there is code to change /DIST/ into /redhat/ based on the /etc/conf.linuxconf LINUXCONF.distribution line.