[XML-SIG] pyxml fails in mod_python-2.7.8

Martin v. L÷wis martin@v.loewis.de
12 Dec 2002 19:37:28 +0100


Tobias Hintze <th@hbsn.de> writes:

> > > see updated test case below. what data should i send to help debug?
> > 
> > I assume this works when not run inside mod_python?

In that case, I can only wish you good luck, as you will need quite a
lot of debugging to understand this.

My initial thought is that you may be calling the wrong Expat copy,
assuming multiple copies of Expat functions live inside Apache. This
could be verified by setting breakpoints on the various Expat
functions, to see which of them are invoked; adding printf statements
inside PyXML's copy of Expat may also help.

Of course, should not happen, as Python should use RTLD_LOCAL (BTW:
what operating system?)

If it is not that, you will have to perform step-by-step debugging,
first on the Python level, e.g. by printing to a file in /tmp. If the
ExpatBuilder loses its curNode attribute, print the contents of
self.__dict__ in each callback function (i.e. *_handler); printing the
keys might be sufficient. If that ever changes in an unreasonable way,
then check whether the identity of the dict changes.

If the dictionary loses the key, find the latest point where it is
still there, and the earliest point where it is gone. This either
points to the source of the problem, or you find that there are no
Python statements in-between (i.e. in one callback, it was there until
the end, and in the next callback, it is gone). Then you will have to
use a C debugger.

HTH,
Martin