Bug 112016

Summary: pulse fails to start if backup name not specified
Product: Red Hat Enterprise Linux 2.1 Reporter: Mike McLean <mikem>
Component: piranhaAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
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: 2004-11-12 22:02:16 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:
Bug Depends On:    
Bug Blocks: 131576    
Attachments:
Description Flags
Ensure we're not NULL before trying to duplicate none

Description Mike McLean 2003-12-12 21:56:34 UTC
* 2.1AS
* piranha-0.7.0-5

The config parsing code in piranha assumes that the backup field is
specified in lvs.cf.  If it is not then pulse will segfault.

WORKAROUND: Specify a value for backup in lvs.cf, even if the backup
is disabled.  For example:
backup_active = 0
backup = 0.0.0.0

If you are using the piranha-gui interface you can simply enable and
then disable the backup (under the Redundancy tab).

[root@i386-21as piranha]# gdb ./pulse
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -nv
Starting program: /usr/src/redhat/BUILD/piranha/./pulse -nv
 
Program received signal SIGSEGV, Segmentation fault.
0x400e029d in __strdup (s=0x0) at ../sysdeps/i386/i486/bits/string.h:530
530     ../sysdeps/i386/i486/bits/string.h: No such file or directory.
        in ../sysdeps/i386/i486/bits/string.h
(gdb) bt
#0  0x400e029d in __strdup (s=0x0) at
../sysdeps/i386/i486/bits/string.h:530
#1  0x08052d9a in parseConfiguration (fs=0xbffeca00, ob=0x0,
config=0xbffece00, eConfig=0x0) at lvsconfig.c:1842
#2  0x0805308e in lvsParseConfig (fd=5, config=0xbffece00,
badLineNum=0xbffece88) at lvsconfig.c:1961
#3  0x0804d336 in main (argc=2, argv=0xbffecf14, env=0xbffecf20) at
pulse.c:2460
#4  0x40075687 in __libc_start_main (main=0x804ce78 <main>, argc=2,
ubp_av=0xbffecf14, init=0x80490c8 <_init>,
    fini=0x8053b90 <_fini>, rtld_fini=0x4000dc54 <_dl_fini>,
stack_end=0xbffecf0c)
    at ../sysdeps/generic/libc-start.c:129
(gdb)

Comment 1 Lon Hohberger 2004-09-01 18:08:06 UTC
Got Patch(tm).

Comment 2 Lon Hohberger 2004-09-01 18:09:49 UTC
Created attachment 103354 [details]
Ensure we're not NULL before trying to duplicate

Other places referencing backupServer (struct in_addr) check to see if it's
zero (which it would be if nothing was specified in lvs.cf - as we memset the
config data).  If it's zero, they set backup_active to 0 and proceed with life.

Comment 3 Lon Hohberger 2004-09-01 19:17:01 UTC
Patch tested.

Comment 7 John Flanagan 2004-12-13 21:23:54 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-469.html


Comment 8 John Flanagan 2004-12-21 01:26:14 UTC
An advisory has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-470.html