xslt error logs are gone since 2012

Bug #1551797 reported by Marcus Brinkmann on 2016-03-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Medium
Unassigned

Bug Description

Hi,

I finally debugged a problem that locked us on lxml 2.3.5: xslt errors where spuriously absent from the error log in some situations. Turns out that revision 850144 "efactored error log connection into a context manager, added support for recursive usage of different logs" (Apr 7 14:51:20 2012) by Stefan Behnel broke this, because it only registers an xml error handler and not the one for xslt.

The attached patch fixes this, in addition to adding a test case for it.

Marcus Brinkmann (m-brinkmann) wrote :
scoder (scoder) wrote :
Changed in lxml:
importance: Undecided → Medium
status: New → Fix Committed
milestone: none → 3.6.1

Very cool, thanks a lot!

On 03/18/2016 08:19 PM, scoder wrote:
> I applied your patch and repaired it here:
>
> https://github.com/lxml/lxml/commit/079c1d452d0f0ae3826b73f59b6fd6a9b9d5dcf3
>
>
> ** Changed in: lxml
> Importance: Undecided => Medium
>
> ** Changed in: lxml
> Status: New => Fix Committed
>
> ** Changed in: lxml
> Milestone: None => 3.6.1
>

--
s<e>mantics GmbH
Viktoriaallee 45
52066 Aachen
Web: www.semantics.de
Registergericht : Amtsgericht Aachen, HRB 8189
Geschäftsführer : Kay Heiligenhaus M.A.
                   Dipl. Ing. José de la Rosa

Vojtěch Fried (vojtechfried) wrote :

Hi,
this fix actually broke lxml for me. We are using lxml in multiple threads. Unfortunately, unlike the libxml2 version (xmlSetGenericErrorFunc), the libxslt version (xsltSetGenericErrorFunc) is not thread safe, but is a global. So it cannot be safely used in multithreaded scenarios. Unless it is fixed in libxslt, the best thing to do in lxml is I think to make a build switch that would turn xsltSetGenericErrorFunc off.

Changed in lxml:
status: Fix Committed → New
scoder (scoder) wrote :

Since the previous fix breaks multi-threaded processing, I reverted it.

Changed in lxml:
milestone: 3.6.1 → none
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers