Bug 137499

Summary: xsltproc segfaults under libxml2 2.6.15-2
Product: [Fedora] Fedora Reporter: Ken Barber <mountainman>
Component: libxml2Assignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-29 17:37:45 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:

Description Ken Barber 2004-10-28 21:03:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
I'm working on a large DocBook project that has been compiling
successfully until today.  Last night I upgraded libxml2 through
up2date and now when I run xsltproc against my project, it segfaults.  

I've not been able to find any other diagnostic information on
xsltproc.  Perhaps I don't know where to look, or what the right
command switches should be.

Rolling back libxml2 to rel. 2.6.8-1 corrects the problem.

Version-Release number of selected component (if applicable):
2.6.15-2

How reproducible:
Always

Steps to Reproduce:
1.Update FC2 to the latest libxml2 (libxml2-2.6.15-2.i386.rpm)
2.[ken@johngalt HeadStart]$ xsltproc custom-html.xsl WebCAF-book.xml
3.Segmentation fault

    

Actual Results:  Segmentation fault

Expected Results:  Writing pr01s02.html for section(intro_06)
Writing pr01s03.html for section(intro_07)
[...]
Writing go01.html for glossary
Writing index.html for book


Additional info:

You can find the source to my book by snagging all of the .xml and
.xsl files in www.webcaf.com/manual/rsync/

Comment 1 Daniel Veillard 2004-10-28 21:22:33 UTC
Can you try two things:
  1/ get back to libxml2-2.6.15 , run the command 
     xsltproc -v custom-html.xsl WebCAF-book.xml
     and paste the last few lines before it hangs
  2/ then upgrade to libxslt-1.1.11 (you may need to also update
     the -python and -devel if they are installed locally) from
     ftp://xmlsoft.org/ and see if it still hangs.

Getting those informations would help me diagnose and possibly
reproduce the problem, as well as xsltproc --version output.
I will look at it before next week,

   thanks for the report !

Daniel

Comment 2 Daniel Veillard 2004-10-28 21:29:19 UTC
I looked at http://www.webcaf.com/manual/rsync/ , I only get a web page
but not a directory listing, hence I'm unable to guess the filenames.
Could you assemble all the .xsl and .xml needed to run a session 
into a tar.gz and put it on-line ? I need them to reproduce the 
problem.

  thanks,

Daniel

Comment 3 Ken Barber 2004-10-28 23:42:55 UTC
Output of 'xsltproc -v custom-html.xsl WebCAF-book.xml' with
libxml2-2.6.15:

-----------------------
xsltProcessOneNode: applying template
'text()|processing-instruction()|comment()' for text
xsltCopy: text mountainman
xsltCopyText: copy text mountainman
xsltProcessOneNode: applying template
'text()|processing-instruction()|comment()' for text
xsltCopy: text >
xsltCopyText: copy text >
xsltProcessOneNode: applying template '*' for br
xsltCopy: node br
xsltCopyOf: select @*
xsltCopyOf: result is a node set
xsltApplyTemplates: node: br
xsltApplyTemplates: list of 0 nodes
xsltProcessOneNode: applying template
'text()|processing-instruction()|comment()' for text
xsltCopy: text
 
xsltCopyText: copy text
 
call-template returned: name unwrap.p
free(): invalid pointer 0xd023d08!
call-template returned: name paragraph
Segmentation fault
------------------------

After upgrading to libxslt-1.1.11 the problem goes away.

There is an index.html file at the URL I gave earlier, so using a Web
browser to access it is probably a lost cause.  Since it appears that
the bug is on its way to being resolved, I won't upload a .tar.gz at
this time.  Please let me know if you still need it later.

Comment 4 Markus Bertheau 2004-10-29 13:46:28 UTC
I had the same problem and 1.1.11 from rawhide fixed it.

Comment 5 Daniel Veillard 2004-10-29 15:45:27 UTC
Okay after some testing and analysis based on Markus's input,
the bug is related to exslt:node-set extension handling in a given
use in the DocBook stylesheet doing chunking. This is deep voodoo
and the way that extension is handled was cleaned bu since the FC2
area in both libxml2 and libxslt. As a result an unexpected and hard
to detect dependancy was made between both modules.
The simplest and best tested fix is to push an update of libxslt at
the level of libxml2 used, i.e. libxslt-1.1.12, so I will try to get
a fc2 update libxslt-1.1.12-2 out during the week-end,

  thanks for the report and feedback,

Daniel

Comment 6 Daniel Veillard 2004-10-29 17:37:45 UTC
libxslt-1.1.12-2 has been pushed to fc2 updates,

Daniel