webdav.xmltools xml request parser memory leak

Bug #143100 reported by Simon Eisenmann
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

When webdav request contain an xml body this xml string is parsed using a xmllib based xml parser. This xmlparser leaks one instance of the parsed xml file for each request. This leads to MemoryError when having lots of such requests. I wasnt able to track this down inside the webdav.xmltools module so i rewrote the parser using minidom and published a monkey patch product. Get the file either from http://longsleep.org/downloads/iPatch_xmltools-0.1.tar.gz/file_view or use the attachment.

Revision history for this message
Simon Eisenmann (longsleep) wrote :
Revision history for this message
Andreas Jung (ajung) wrote :

Looks like a candidate for Zope 2.8. I have some fear
putting this untested into Zope 2.7.

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Uploaded: iPatch_xmltools-0.2.tar.gz

corrected some bugs in version 0.1 and released 0.2 version of the patch. Get it from http://longsleep.org/downloads/iPatch_xmltools-0.2.tar.gz/file_view or use the attached file

Revision history for this message
Andreas Jung (ajung) wrote :

Could make your stuff available as patch against the 2.7/2.8 sources?

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Uploaded: webdav.xmltools.minidom-20041031.patch

Ok. Attached is a patch against 2.7.3. This patch should work with svn trunk as well as there have been no changes to xmltools for a while.

Revision history for this message
Andreas Jung (ajung) wrote :

Status: Pending => Resolved

Patch applied for Zope 2.7.4, 2.8a2.

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Uploaded: xmltools-fixes-1.diff

after some tests with plain zope i discovered a couple of issues with this patch. I managed to fix most of them, and even figured out the reasons for del_attr and remap methods.

Attached is a patch for this stuff to the current zope 2.7 cvs branch.

One thing needs more attention .. see issue #1561 at http://zope.org/Collectors/Zope/1561

Revision history for this message
Sidnei da Silva (sidnei) wrote :

Patch applied to 2.7 and 2.8 except the text node stuff, which would break XML PROPPATCH requests.

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.