[lxml-dev] ERESTARTNOHAND error
Stefan Behnel
stefan_ml at behnel.de
Thu Aug 30 21:33:29 CEST 2007
Salut!
Frédéric Mantegazza wrote:
> 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?
Which version of lxml are you using? Could you try with 1.3.4? You can also
build lxml from sources and pass the "--without-threading" option, which might
work for you.
Stefan
More information about the lxml-dev
mailing list