[lxml-dev] etree.clear_error_log() causes segfaults

Christian Heimes lists at cheimes.de
Mon Feb 2 12:49:02 CET 2009


This is a friendly word of warning! Don't call etree.clear_error_log()
from multiple threads.

We found this issue during stress tests of our CherryPy based
application. Every worker thread was calling etree.clear_error_log()
after the page was rendered. Apparently we hit some sort of race condition.

Backtrace:

C  [etree.so+0x21977]
C  [etree.so+0x22d48]
C  [libxslt.so.1+0xdc17]  xsltTransformError+0xf7
C  [libxslt.so.1+0x839d]
C  [libxslt.so.1+0xa5da]  xsltParseStylesheetProcess+0x80a
C  [libxslt.so.1+0x1efbc]  xsltParseStylesheetInclude+0x1ac
C  [libxslt.so.1+0xa0b4]  xsltParseStylesheetProcess+0x2e4
C  [libxslt.so.1+0xb4b9]  xsltParseStylesheetImportedDoc+0x1e9
C  [libxslt.so.1+0xb5b8]  xsltParseStylesheetDoc+0x28
C  [etree.so+0xe640c]
C  [python2.5+0x4ff83]
C  [python2.5+0x11e67]  PyObject_Call+0x27


Christian



More information about the lxml-dev mailing list