[lxml-dev] Lxml Crash

Alex Klizhentas klizhentas at gmail.com
Wed Mar 4 12:24:49 CET 2009


Hi all,
sometimes i get exception killing apache process. It happens occasionally
(acually it happened once on my production site), so I have no more logs up
to the moment, I can only suspect that crash  happens when I am trying to
replace the node:

    def replace(self,child,new_child):
        root = self.getroottree().getroot()
        index = self.index(child)
        if root._should_notify():
            old_child = deepcopy(child)
            self.insert(index,new_child)
            etree.ElementBase.remove(self,child)
            root._notify(NodeReplaced(old_child,new_child))
            return self[index]
        else:
            self.insert(index,new_child)
            etree.ElementBase.remove(self,child)
            return self[index]

crash log is below:

*** glibc detected *** /usr/sbin/apache2: free(): invalid pointer:
0x08cd6eca ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e26a85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e2a4f0]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x126)[0xa984d1e6]
/usr/lib/libxml2.so.2(xmlFreeNode+0x76)[0xa984d656]
/usr/lib/python2.5/site-packages/lxml-2.2alpha1-py2.5-linux-i686.egg/lxml/etree.so[0xa9992bf2]
/usr/lib/python2.5/site-packages/lxml-2.2alpha1-py2.5-linux-i686.egg/lxml/etree.so[0xa99b529f]

I will bring in more logs if crash repeats, but I will appreciate any
ideas/thoughts/comments so I can quickly eliminate/workaround/prevent the
issue from happening again.

-- 
Regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090304/7c0b8827/attachment.htm 


More information about the lxml-dev mailing list