Apache Mod-Python - BUG: native classes don't like introspection

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > December 2005 > BUG: native classes don't like introspection





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BUG: native classes don't like introspection
Jamie Bliss

2005-12-19, 2:46 am

Introspection of mp_request and some other built-in classes usually
crashes Apache on my system (Win XP SP1).

My Python version (as reported by sys.version) is '2.4.1 (#65, Jun 20
2005, 17:01:55) [MSC v.1310 32 bit (Intel)]'. sys.api_version is 1012.
(All of those values are through mod_python/Apache, not Python
directly.)

Apache is 2.0.55 (magic num 20020903:11). I built Apache myself using
MSVC++ 6. mod_python is the only module loaded.

mod_python.version is '3.2.5b'. The version in the binary
(mod_python.so) is "3.2.5.62634".

In order to reproduce the bug, insert this function in a publisher-enabled =
file.

def request(req):
=09retval =3D ''
=09for i in dir(req):
=09=09if i[:2] =3D=3D "__" and i[-2:] =3D=3D "__": continue
=09=09retval +=3D i+': '+repr(getattr(req, i))+"\n"
=09return retval

I don't expect this bug to appear much on a production system, but it
is fairly annoying to a n00b like myself.

--
Jamie
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Have lots of invites. Gmail now has 2GB.

Jamie Bliss

2005-12-19, 2:46 am

This also comes up when using eval().

On 12/19/05, Jamie Bliss <astronouth7303@gmail.com> wrote:
> Introspection of mp_request and some other built-in classes usually
> crashes Apache on my system (Win XP SP1).
>
> My Python version (as reported by sys.version) is '2.4.1 (#65, Jun 20
> 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]'. sys.api_version is 1012.
> (All of those values are through mod_python/Apache, not Python
> directly.)
>
> Apache is 2.0.55 (magic num 20020903:11). I built Apache myself using
> MSVC++ 6. mod_python is the only module loaded.
>
> mod_python.version is '3.2.5b'. The version in the binary
> (mod_python.so) is "3.2.5.62634".
>
> In order to reproduce the bug, insert this function in a publisher-enable=

d file.
>
> def request(req):
> retval =3D ''
> for i in dir(req):
> if i[:2] =3D=3D "__" and i[-2:] =3D=3D "__": continue
> retval +=3D i+': '+repr(getattr(req, i))+"\n"
> return retval
>
> I don't expect this bug to appear much on a production system, but it
> is fairly annoying to a n00b like myself.
>
> --
> Jamie
> -------------------------------------------------------------------
> http://endeavour.zapto.org/astro73/
> Thank you to JosephM for inviting me to Gmail!
> Have lots of invites. Gmail now has 2GB.
>



--
Jamie
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Have lots of invites. Gmail now has 2GB.

Jamie Bliss

2005-12-19, 2:46 am

I swear, this is the last one.

An access violation occurs in Python24.dlll when this Python code executes:
eval("reg.boundary")
I don't know the internals of apache, so I can't say why or how.

On 12/19/05, Jamie Bliss <astronouth7303@gmail.com> wrote:
> Introspection of mp_request and some other built-in classes usually
> crashes Apache on my system (Win XP SP1).
>
> My Python version (as reported by sys.version) is '2.4.1 (#65, Jun 20
> 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]'. sys.api_version is 1012.
> (All of those values are through mod_python/Apache, not Python
> directly.)
>
> Apache is 2.0.55 (magic num 20020903:11). I built Apache myself using
> MSVC++ 6. mod_python is the only module loaded.
>
> mod_python.version is '3.2.5b'. The version in the binary
> (mod_python.so) is "3.2.5.62634".
>
> In order to reproduce the bug, insert this function in a publisher-enable=

d file.
>
> def request(req):
> retval =3D ''
> for i in dir(req):
> if i[:2] =3D=3D "__" and i[-2:] =3D=3D "__": continue
> retval +=3D i+': '+repr(getattr(req, i))+"\n"
> return retval
>
> I don't expect this bug to appear much on a production system, but it
> is fairly annoying to a n00b like myself.
>
> --
> Jamie
> -------------------------------------------------------------------
> http://endeavour.zapto.org/astro73/
> Thank you to JosephM for inviting me to Gmail!
> Have lots of invites. Gmail now has 2GB.
>



--
Jamie
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Have lots of invites. Gmail now has 2GB.

Nicolas Lehuen

2005-12-19, 2:46 am

Hi Jamie,

This is a known bug :

http://issues.apache.org/jira/browse/MODPYTHON-96

What's weird is that this bug has existed for a long time now, but has
been discovered this month only - and reported twice since !

It is this is the subversion repository, and the fix will be released
in the next beta version.

Regards,
Nicolas

2005/12/19, Jamie Bliss <astronouth7303@gmail.com>:
> I swear, this is the last one.
>
> An access violation occurs in Python24.dlll when this Python code execute=

s:
> eval("reg.boundary")
> I don't know the internals of apache, so I can't say why or how.
>
> On 12/19/05, Jamie Bliss <astronouth7303@gmail.com> wrote:
led file.[vbcol=seagreen]
>
>
> --
> Jamie
> -------------------------------------------------------------------
> http://endeavour.zapto.org/astro73/
> Thank you to JosephM for inviting me to Gmail!
> Have lots of invites. Gmail now has 2GB.
>


Graham Dumpleton

2005-12-19, 5:47 pm

Sorry if this is a duplicate. Resending as am noticing that some of my
python-dev mails are disappearing into a black hole of late and am
trying to work out why.

The other bug:

http://issues.apache.org/jira/browse/MODPYTHON-99

also recently found and related, may also be a contributor to the
problems
you are seeing. As Nicolas pointed out, doing introspection on the
request
object seems to be the flavour of the month.

BTW, has anyone though to do some introspection on server, connection
and filter objects to see if they have any similar issues?

Graham

On 19/12/2005, at 6:54 PM, Nicolas Lehuen wrote:
[vbcol=seagreen]
> Hi Jamie,
>
> This is a known bug :
>
> http://issues.apache.org/jira/browse/MODPYTHON-96
>
> What's weird is that this bug has existed for a long time now, but has
> been discovered this month only - and reported twice since !
>
> It is this is the subversion repository, and the fix will be released
> in the next beta version.
>
> Regards,
> Nicolas
>
> 2005/12/19, Jamie Bliss <astronouth7303@gmail.com>:


Graham Dumpleton

2005-12-19, 5:47 pm

The other bug:

http://issues.apache.org/jira/browse/MODPYTHON-99

also recently found and related, may also be a contributor to the
problems
you are seeing. As Nicolas pointed out, doing introspection on the
request
object seems to be the flavour of the month.

BTW, has anyone though to do some introspection on server, connection
and filter objects to see if they have any similar issues?

Graham

On 19/12/2005, at 6:54 PM, Nicolas Lehuen wrote:
[vbcol=seagreen]
> Hi Jamie,
>
> This is a known bug :
>
> http://issues.apache.org/jira/browse/MODPYTHON-96
>
> What's weird is that this bug has existed for a long time now, but has
> been discovered this month only - and reported twice since !
>
> It is this is the subversion repository, and the fix will be released
> in the next beta version.
>
> Regards,
> Nicolas
>
> 2005/12/19, Jamie Bliss <astronouth7303@gmail.com>:


Jim Gallacher

2005-12-19, 5:47 pm

I believe Martin Devara, the original reporter of MODPYHON-99, tested
both the request and server objects. This was discussed in the
"[mod_python] inspect.getmembers(req) segfaults" thread.

Perhaps he can comment if he examined the connection and filter objects
as well?

Jim

Graham Dumpleton wrote:
> The other bug:
>
> http://issues.apache.org/jira/browse/MODPYTHON-99
>
> also recently found and related, may also be a contributor to the problems
> you are seeing. As Nicolas pointed out, doing introspection on the request
> object seems to be the flavour of the month.
>
> BTW, has anyone though to do some introspection on server, connection
> and filter objects to see if they have any similar issues?
>
> Graham
>
> On 19/12/2005, at 6:54 PM, Nicolas Lehuen wrote:
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com