Bug 120085 - [PATCH] Problems with shutil on x86_64
[PATCH] Problems with shutil on x86_64
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-cluster (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Depends On:
  Show dependency treegraph
Reported: 2004-04-05 17:08 EDT by Phillip Sorensen
Modified: 2015-06-16 11:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-25 17:22:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to set the size to zero in diskRawReadLarge (454 bytes, patch)
2004-04-06 15:29 EDT, Phillip Sorensen
no flags Details | Diff

  None (edit)
Description Phillip Sorensen 2004-04-05 17:08:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
There seems to be isses with running clumanager under x86_64 arch.  I
rebuild the clumanager-1.2.9-1.src.rpm with no problems.  The daemons
seem to run, but there are problems.

I have seen two problems:

1.)  Trying to add or modify a member in the redhat-config-cluster
configuration screen results in the following trace:

Traceback (most recent call last):
  File "/usr/share/redhat-config-cluster/configure/memberDialog.py",
line 68, in on_okbutton_clicked
line 131, in validate
    if not ipconvert.ipIsInSameNetAsHost(dns_ipaddress, netmask):
line 101, in ipIsInSameNetAsHost
    submitted_ip_num = self.dottedQuadToNum(submitted_ip)
line 26, in dottedQuadToNum
    return struct.unpack('>L', socket.inet_aton(ip))[0]
struct.error: unpack str size does not match format

2.)  Trying to run "shutil -p /cluster/config.xml" results in a
"Segmentation fault"

I have not looked into this much yet, but it looks like there could be
some issues with the 64bit vs. 32 bit.

Version-Release number of selected component (if applicable):
Comment 2 Phillip Sorensen 2004-04-06 15:26:28 EDT
I looked at the segfault problem more today.  The gdb debugger
produces the following backtrace:

#0  0x0000002a95b1a094 in memcpy () from /lib64/tls/libc.so.6
No symbol table info available.
#1  0x0000002a95f79391 in diskRawReadLarge (offset=147968,
    data_in=0x2a9556c000 "", count=1024) at large.c:289
        size = {180388627136, 180388627136}
        i = 2
        check_ret = {0, 0}
        crc = {1512077761, 1512077761}
        data = {0x2a9556d000 "", 0x2a9556e000 ""}
        pageSize = 4096
        good_part = 0
        mmap_size = 4096
#2  0x0000002a95f7747f in shared_raw_read_atomic (
    pathname=0x7fbff1bbb4 "/cluster/config.xml", buf=0x51af30, count=672)
    at ops.c:116
        offset = 147968
        maxsize = 1048576
        hdrp = (SharedHeader *) 0x2a9556c000
        data = 0x2a9556c020 "HERE WAS XML CODE FOR CONFIG FILE"...
        total = 1024
        rv = 42
#3  0x00000000004031fc in main ()
No symbol table info available.

I noticed that the size going into the memcpy at the end of the
diskRawReadLarge was vary large (see size in frame #1).  Looking at
things with gdb, I found that zeroing size[0] and size[1] at the
beging of the diskRawReadLarge function seemed to corect this.

I created a patch (attached) to do this, and rebuild the program.
I am now able to run the shutil command without segmentation faults.
Comment 3 Phillip Sorensen 2004-04-06 15:29:45 EDT
Created attachment 99157 [details]
Patch to set the size to zero in diskRawReadLarge
Comment 5 Lon Hohberger 2004-04-06 16:32:24 EDT
Narrowing focus of this bugzilla to 'clumanager' package.  Bug #120210
opened for 'redhat-config-cluster' package.
Comment 6 Lon Hohberger 2004-04-06 16:46:53 EDT
Patch applied to CVS; thanks for finding it so quickly.  Typical use
of uninitialized data biting us in the pinky toe.

The patch will be incorporated in the next errata release *after*
Update 2.
Comment 7 Lon Hohberger 2004-04-06 16:58:34 EDT
If I build any new cvs/test rpms which include the patch, I will post
them here.
Comment 8 Mike McLean 2004-06-25 17:22:05 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.