[Twisted-Python] trial.unitest-specific segfault with lxml

Tristan Seligmann mithrandi at mithrandi.net
Fri Aug 18 00:05:58 MDT 2017


On Fri, 18 Aug 2017 at 00:47 Phil Mayers <p.mayers at imperial.ac.uk> wrote:

> SSCCE - well, hopefully correct - here:
>
> https://gist.github.com/philmayers/387597c7407ab98f159426cea5f44a69
>

Note that I don't think you're allowed to catch GeneratorExit like this;
normally doing so will crash your program with a RuntimeError after the
generator fails to exit (possibly masked here by the generator living until
the end of the program). However, I was able to reproduce the crash even
after removing the try/except, so I don't think this issue is related.

Given that the crash only occurs at exit, I suspect this has something to
do with finalizers running at a bad time during interpreter shutdown, but I
don't have time at the moment to look into this deeply (I just spotted the
GeneratorExit issue and wanted to check if that was the problem).

I suspect this is an lxml or Cython bug, ultimately, but changing the test
base class changes some ordering of events arbitrarily resulting in this
heisencrash. Alternatively, it might have something to do with logging.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20170818/7ce6a6fe/attachment-0002.html>


More information about the Twisted-Python mailing list