<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "/bugzilla3/bugzilla.dtd">

<bugzilla version="3.0.4.1-2+lenny2"
          urlbase="http://bugzilla.ganglia.info/cgi-bin/bugzilla/"
          maintainer="THE MAINTAINER HAS NOT YET BEEN SET"
>

    <bug>
          <bug_id>198</bug_id>
          
          <creation_ts>2008-08-08 16:49</creation_ts>
          <short_desc>3.1.0 gmetad segfaults when aggregating XML from another 3.1.0 gmetad</short_desc>
          <delta_ts>2008-08-15 06:01:07</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Ganglia Monitoring System</product>
          <component>gmetad</component>
          <version>3.1.x</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <bug_file_loc>http://www.mail-archive.com/ganglia-developers@lists.sourceforge.net/msg04584.html</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bernard Li">bernard@vanhpc.org</reporter>
          <assigned_to name="Brad Nicholes">bnicholes@novell.com</assigned_to>
          <cc>carenas@sajinet.com.pe</cc>

      

      
          <long_desc isprivate="0">
            <who name="Bernard Li">bernard@vanhpc.org</who>
            <bug_when>2008-08-08 16:49:16</bug_when>
            <thetext>When gmetad has a data_source which points to another gmetad&apos;s non-interactive
port (8651 by default), it will segfault.

gmetad debug output:

[Test] is a 2.5 or later data stream
hash_create size = 50
hash-&gt;size is 53
Found a &lt;GRID&gt;, depth is now 1
Segmentation fault

strace output:

0xfee2b0b4)          = ? ERESTART_RESTARTBLOCK (To be restarted)
+++ killed by SIGSEGV +++

gdb output:

#0  0x000000300160af10 in hash_lookup (key=0x44603a90, hash=0x0) at hash.c:304
#1  0x000000000040590b in startElement_EXTRA_ELEMENT (data=0x44604c50, el=&lt;value
optimized out&gt;, attr=0x621980)
    at process_xml.c:731
#2  0x0000000000405eac in start (data=0x44604c50, el=0x61f9dc &quot;EXTRA_ELEMENT&quot;,
attr=0x621980) at process_xml.c:1010
#3  0x0000003005209e49 in strcmp () from /lib64/libexpat.so.1
#4  0x000000300520acf4 in strcmp () from /lib64/libexpat.so.1
#5  0x000000300520be19 in strcmp () from /lib64/libexpat.so.1
#6  0x000000300520ce2b in strcmp () from /lib64/libexpat.so.1
#7  0x0000003005203fb1 in XML_ParseBuffer () from /lib64/libexpat.so.1
#8  0x0000000000405150 in process_xml (d=0x60fb10,
    buf=0x610dd0 &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot;
standalone=\&quot;yes\&quot;?&gt;\n&lt;!DOCTYPE GANGLIA_XML [\n   &lt;!ELEMENT GANGLIA_XML
(GRID|CLUSTER|HOST)*&gt;\n      &lt;!ATTLIST GANGLIA_XML VERSION CDATA #REQUIRED&gt;\n  
   &lt;!ATTLIST&quot;...)
    at process_xml.c:1186
#9  0x0000000000403f2d in data_thread (arg=&lt;value optimized out&gt;) at
data_thread.c:160
#10 0x0000003001e06407 in start_thread () from /lib64/libpthread.so.0
#11 0x00000030012d4b0d in clone () from /lib64/libc.so.6</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2008-08-08 17:13:25</bug_when>
            <thetext>this is partially a duplicated of BUG188, who already has the patch uploaded.

will update it here too for completeness and to track it getting merged into
3.1.1  not to waste this bug then.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2008-08-08 17:14:37</bug_when>
            <thetext>Created an attachment (id=152)
proposed backport patch for 3.1

also uploaded in BUG188</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2008-08-15 06:01:07</bug_when>
            <thetext>Commited revision 1657 for 3.1</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>152</attachid>
            <date>2008-08-08 17:14</date>
            <desc>proposed backport patch for 3.1</desc>
            <filename>ganglia-3.1.0-gmetad-hierarchical.patch</filename>
            <type>text/plain</type>
            <size>481</size>
            <data encoding="base64">SW5kZXg6IGdtZXRhZC9wcm9jZXNzX3htbC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGdtZXRhZC9wcm9jZXNz
X3htbC5jCShyZXZpc2lvbiAxNjM0KQorKysgZ21ldGFkL3Byb2Nlc3NfeG1sLmMJKHdvcmtpbmcg
Y29weSkKQEAgLTcyNCw3ICs3MjQsMTEgQEAKICAgICAKICAgICBpZiAoIXhtbGRhdGEtPmhvc3Rf
YWxpdmUpIAogICAgICAgICByZXR1cm4gMDsKLSAgICAKKworICAgIC8qIE9ubHkga2VlcCBleHRy
YSBlbGVtZW50IGRldGFpbHMgaWYgd2UgYXJlIHRoZSBhdXRob3JpdHkgb24gdGhpcyBjbHVzdGVy
LiAqLworICAgIGlmICghYXV0aG9yaXR5X21vZGUoeG1sZGF0YSkpCisgICAgICAgcmV0dXJuIDA7
CisKICAgICBoYXNoa2V5LmRhdGEgPSAodm9pZCopIG5hbWU7CiAgICAgaGFzaGtleS5zaXplID0g
IHN0cmxlbihuYW1lKSArIDE7CiAgICAgCg==
</data>        

          </attachment>
    </bug>

</bugzilla>