Bug 487277

Summary: chkconfig segfault
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-05 21:50:25 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:

Description Mark McLoughlin 2009-02-25 09:34:04 UTC
Just playing around and I created /etc/chkconfig.d/libvirtd with:

  # chkconfig: 345 98 02

and ran "chkconfig libvirtd resetpriorities" and got:

Program received signal SIGSEGV, Segmentation fault.
0x0019ce1a in strcmp () from /lib/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.9-3.i686 popt-1.13-4.fc10.i386
(gdb) bt
#0  0x0019ce1a in strcmp () from /lib/libc.so.6
#1  0x080493ed in frobOneDependencies (s=0x80560ec, servs=<value optimized out>, numservs=74, target=0) at chkconfig.c:136
#2  0x080498e8 in frobDependencies (s=0xbffff4b0) at chkconfig.c:224
#3  0x0804a50f in setService (name=0xbffff906 "libvirtd", where=60, state=-2) at chkconfig.c:534
#4  0x0804affa in main (argc=3, argv=0xbffff7c4) at chkconfig.c:699

If I add another newline to the file, it doesn't segfault anymore.

Comment 1 Bill Nottingham 2009-03-05 21:50:25 UTC
This should be fixed in rawhide - I can't reproduce this there, and I did some changes in the parsing for invalid scripts.