[lxml-dev] ERESTARTNOHAND error
Frédéric Mantegazza
mantegazza at ill.fr
Thu Aug 30 11:18:18 CEST 2007
Hello,
Some months ago, I migrated some part of our code from libxml2/libxslt
modules to lxml module (which is much pythonic!). But my code never worked,
because of a seg. fault :o(
The crash occurs at:
result = self.__xslFilter.apply(tree, {'filename':"'%s'" % baseName})
This code is used inside a Pyro server (Pyro is a client/server framework.
see http://pyro.sourceforge.net), so in a multi-threaded environement.
I ran the server using strace to see what happens: I got a ERESTARTNOHAND
error. This error is very strange, and Google does not give usefull
informations...
I tested my code out of Pyro: it works. I made a simple Pyro serveur with
just this part of the code: it works too. It only crashes when using the
real server, which uses a lot of multi-threads calls.
Another guy had a similar problem, but the error was in the python mysql
client wrapper, only on stressed usage.
It seems that there is a problem in either lxml and pymysql when used in a
stressed multi-threaded way. I use locks in my server to avoid re-entrant
calls to lxml, so I'm sure the problem is not there; I feel that it is
related to the number of threads running...
Does anyone has an idea of that problem?
Thanks,
PS: I also use lxml from mod_python, and all is working fine.
--
Frédéric
More information about the lxml-dev
mailing list