XML parsing failures on Red Hat

Bug #1099648 reported by Chris Hillery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Nicolae Brinza

Bug Description

As reported here: https://groups.google.com/forum/?fromgroups=#!topic/zorba-users/AcOt1QRReAg

Zorba fails to parse a large number of XML files when compiled from source on Red Hat Linux. These same files parse successfully using Zorba 2.7 from Juan's PPA on Ubuntu.

Related branches

Revision history for this message
Chris Hillery (ceejatec) wrote :

I'm attaching one of the sample XML files from the reporter of this bug.

Changed in zorba:
milestone: none → 2.9
assignee: nobody → Nicolae Brinza (nbrinza)
importance: Undecided → High
Revision history for this message
Chris Hillery (ceejatec) wrote :

I've spent quite some time looking into this. I've narrowed down the problem but cannot come up with a solution.

First off: this query works perfectly if you run it in the debugger. So, that certainly makes it extra aggravating. It also says something about the kind of error it might be. However, when you run the query outside of the debugger, it still runs valgrind clean (even though it raises the parsing error), so it's not some kind of subtle memory smash. I have, I believe, seen the query run successfully outside of the debugger when it ran immediately after a Zorba build, so it's possible this is actually some kind of race condition (although how that's possible I have no idea).

The problem has something to do with our interaction with libxml2. What happens is that xmlPushInput() (called by FragmentXmlLoader::loadXml()) ends up calling back to the SAX error handler (FastXmlLoader::error()) with the message "internal error". I've spent quite a while trying to figure out why without success. Unfortunately, compiling my own version libxml2 to try to debug this also made the query succeed.

I've also spent quite a while trying to figure out if calling xmlPushInput() is the right thing to do. I can't find any libxml2 examples which support using that function in this way. At this point, though, I'm out of time to spend on this...

Revision history for this message
Chris Hillery (ceejatec) wrote :

Also: the fn-parse-xml-fragment test cases seem to fail in the same way. This is described by bug 1088886, which is most likely a duplicate of this one. In that bug it was suggested that this only happens on Fedora 64-bit.

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

Chris, on what version of RedHat have you tested this? Fedora xx 32/64?

Revision history for this message
Chris Hillery (ceejatec) wrote :

64.

Chris Hillery (ceejatec)
Changed in zorba:
status: New → Fix Committed
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.