RE: [xml] RE: [xslt] libxml2 segfault



I have upgraded to libxml2-2.5.10. Due to this, an upgrade of libpthread.so to that one from GLIBC_2.3.2 
package was necessary.
I must say the problem did not occur since that upgrade.

Thanks for support.

Marek


Although it sounds strange to me I have to say that

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Saturday, August 30, 2003 11:20 AM
To: Novický Marek
Cc: xml gnome org
Subject: Re: [xml] RE: [xslt] libxml2 segfault

On Sat, Aug 30, 2003 at 09:05:02AM +0200, Novický Marek wrote:
Sorry for not providing details:

My system is intel RH 8.0, RPM libxml2-2.5.4-1, Apache/2.0.44 (prefork MPM),
PHP 4.3.0 (without threads)

  Firsth thing to do : upgrade to libxml2-2.5.10, make sure it's compiled
with thread support anyway. Then try to disable thread support if the
error is reproduceable under the new library.

There is a file /etc/xml/catalog coming from RPM xml-common-0.6.3-12 and contains following XML

<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" 
catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" 
catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <delegatePublic publicIdStartString="ISO 8879:1986" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"; 
catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <delegateURI uriStartString="http://www.oasis-open.org/docbook/"; 
catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <rewriteSystem 
systemIdStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd"; 
rewritePrefix="/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd"/>
  <rewriteURI 
uriStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd"; 
rewritePrefix="/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd"/>
</catalog>

I really don't know whether the problem is in library itself or in an improper invoking from the php soap 
extension (which is in fact very experimental and full of bugs). The problem always comes up during loading 
wsdl file from soap server with exactly the same back-trace. It is not associated with a particular wsdl 
file, I tried several wsdl URLs. The code is quite simple:

sdlPtr load_wsdl(char *struri, sdlPtr parent)
{
      xmlDocPtr wsdl;
      xmlNodePtr root, definitions, types, binding, schema, service, import;
      xmlNodePtr trav, trav2, trav3;
      xmlAttrPtr targetNamespace;
      sdlPtr tmpsdl;
      TSRMLS_FETCH();

      if(!parent)
      {
              tmpsdl = malloc(sizeof(sdl));
              memset(tmpsdl, 0, sizeof(sdl));
              tmpsdl->source = strdup(struri);
      }
      else
              tmpsdl = parent;

      wsdl = xmlParseFile(struri);
      xmlCleanupParser();

  Do NOT call xmlCleanupParser() at each invocation !!!
Read the docs :-(

(gdb) bt
#0  0x41671004 in ?? ()
#1  0x40a9279c in xmlParseCatalogFile () from /usr/lib/libxml2.so.2
#2  0x40a9320f in xmlParseCatalogFile () from /usr/lib/libxml2.so.2
#3  0x40a934f4 in xmlParseCatalogFile () from /usr/lib/libxml2.so.2
#4  0x40a9436f in xmlParseCatalogFile () from /usr/lib/libxml2.so.2
#5  0x40a956a7 in xmlACatalogResolve () from /usr/lib/libxml2.so.2
#6  0x40a95f8a in xmlCatalogResolve () from /usr/lib/libxml2.so.2

  I really don't see how xmlParserGetDirectory() called xmlCatalogResolve()
there is no such call in the code.

#7  0x40a51a52 in xmlParserGetDirectory () from /usr/lib/libxml2.so.2
#8  0x40a51aee in xmlLoadExternalEntity () from /usr/lib/libxml2.so.2
#9  0x40a429d2 in xmlCreateFileParserCtxt () from /usr/lib/libxml2.so.2
#10 0x40a42a9e in xmlSAXParseFileWithData () from /usr/lib/libxml2.so.2
#11 0x40a42bb5 in xmlSAXParseFile () from /usr/lib/libxml2.so.2
#12 0x40a42c2f in xmlParseFile () from /usr/lib/libxml2.so.2
#13 0x4164da0d in load_wsdl (
    struri=0x823166c "http://sun.aag.cz:81/jaxrpc-simple/simple?WSDL";,
    parent=0x0) at /tmp/php-4.3.2/ext/soap/php_sdl.c:545

  I don't see why the recursion in the catalog parsing occurs while 
obviously the URL given does not match any of the delegates or rewrites
from the top XML Catalog. that does not make sense to me.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]