[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: PATH env garbled in mod_perl 1.21 patch
From:       Oleg Bartunov <oleg () sai ! msu ! su>
Date:       1999-07-31 18:20:10
[Download RAW message or body]

On 31 Jul 1999, Chip Turner wrote:

> Date: 31 Jul 1999 13:35:11 -0400
> From: Chip Turner <chip@zfx.com>
> To: Oleg Bartunov <oleg@sai.msu.su>
> Cc: Tomasz Przygoda <tprzyg@securities.com>, modperl@apache.org
> Subject: Re: PATH env garbled in mod_perl 1.21 patch
> 
> Oleg Bartunov <oleg@sai.msu.su> writes:
> 
> > > --- mod_perl-1.21/src/modules/perl/mod_perl.h~  Thu Jul  1 19:43:35 1999
> > > 
> > > +++ mod_perl-1.21/src/modules/perl/mod_perl.h   Thu Jul 29 14:01:37 1999
> > > 
> > > @@ -256,7 +256,7 @@
> > >  #define HV_SvTAINTED_on(hv,key,klen) \
> > >      SvTAINTED_on(*hv_fetch(hv, key, klen, 0))
> > > 
> > > -#if 0
> > > +#if 1
> > > 
> > >  #define mp_setenv(key, val) \
> > >  mp_magic_setenv(key, val, 1)
> > > 
> > > I guess this may be more correct as it touches couple of other macros,
> > > that (given the
> > > example of PATH)
> > > I don't know if I could trust before - namely:  mp_setenv, mp_SetEnv and
> > > mp_PassEnv.
> > > 
> > 
> > This cause significant memory leak on my Linux 2.2.10 machine running
> > apache 1.3.6+mod_perl 1.21. After 20,000 requests httpd  with this patch 
> > grows from  7Mb to 26 Mb !
> 
> Have you had a chance to test the patch I originally submitted?
> 

Yes, I tried your patch and it seems also has some memory leak but not 
very big. I don't use PATH in my applications so I dont' bothered with
it corruption. BUT, this could hide more problems that's why I'm worry about.
I see PATH corruption thread is rather OLD.

	Regards,

		Oleg

> Something "odd" is going on with the way mod_perl modifies the
> environment.  My suspicion is that it is because of version issues
> with perl itself when it comes to magic variables.  I think to get
> this working correctly will take more than a one line patch,
> unfortunately.
> 
> The corrupt path problem is easily reproduced on my system.
> Basically, start httpd with -X and do two requests to /perl-status?env
> to watch the path.  On the third request, the beginning of the path is
> corrupt -- but nothing else is.  This is running mp 1.21 and apache
> 1.3.6.  I hope to have more time to deal with it, but I'm not certain
> if I will in the next couple days.
> 
> Chip
> 
> -- 
> Chip Turner                   chip@ZFx.com
>                               Programmer, ZFx, Inc.  www.zfx.com
>                               PGP key available at wwwkeys.us.pgp.net
> 

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic