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" 
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" 
  <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" 
  <delegatePublic publicIdStartString="ISO 8879:1986" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
  <delegateSystem systemIdStartString=""; 
  <delegateURI uriStartString=""; 

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;

              tmpsdl = malloc(sizeof(sdl));
              memset(tmpsdl, 0, sizeof(sdl));
              tmpsdl->source = strdup(struri);
              tmpsdl = parent;

      wsdl = xmlParseFile(struri);

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

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

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

#7  0x40a51a52 in xmlParserGetDirectory () from /usr/lib/
#8  0x40a51aee in xmlLoadExternalEntity () from /usr/lib/
#9  0x40a429d2 in xmlCreateFileParserCtxt () from /usr/lib/
#10 0x40a42a9e in xmlSAXParseFileWithData () from /usr/lib/
#11 0x40a42bb5 in xmlSAXParseFile () from /usr/lib/
#12 0x40a42c2f in xmlParseFile () from /usr/lib/
#13 0x4164da0d in load_wsdl (
    struri=0x823166c "";,
    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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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