[lxml-dev] python crashes in xmlDictFree inside Zope
Stefan Behnel
stefan_ml at behnel.de
Mon May 21 08:21:11 CEST 2007
Hi,
Eric Tiffany wrote:
> I have been prototyping some XMLSchema parsing/validating using lxml
> 1.3beta.
>
> Everthing works great from python 2.4.4 started from the command line, or
> running from inside Eclipse.
>
> However, when I moved my code over to my Plone product, python crashes when
> Zope is initializing the product. I am creating my XMLSchema object there.
>
> Some earlier attempts (with python 2.4.3) gave me this error:
>
> python(11139) malloc: *** Deallocation of a pointer not malloced: 0x80; This
> could be a double free(), or free() called with the middle of an allocated
> block; Try setting environment variable MallocHelp to see tools to help
> debug
>
> OS Version: 10.4.9 (Build 8P2137)
> Report Version: 4
>
> Version: 2.4a0 (2.4alpha1)
Is this the Python version? I'm asking because you said it was 2.4.3.
lxml.etree behaves different for Python <= 2.4.2, as there are known bugs with
threading in earlier versions. If you're sure you can reproduce the *same* bug
with a version older than 2.4.2 (and libxml 2.6.28, as you also mentioned),
that would completely shift the focus of the bug hunt.
Is there any way to detect MacOS-X at the C level? In that case, we could try
to disable thread concurrency support completely for this platform - in case
that's the source of the segfault. You can try to see if this would fix the
problem by passing the option "--without-threading" to setup.py when building
lxml. Could you please try that with your current setup and report back to the
list?
Another question: are you using a custom parser (i.e. passing a second
argument to the parse() function) here or is it the default parser that
crashes here?
Stefan
More information about the lxml-dev
mailing list