You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Juanma Barranquero <le...@terra.es> on 2003/11/15 17:53:12 UTC

Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

First of all, sorry if this is not the appropriate list.

I have a problem with the latest mod_perl 2.0 binary for Windows and
ActivePerl 5.8.1 build 807. (I've tested it on XP and 2K with identical
results, BTW.)

I know the latest release of mod_perl 2.0 is 1.99_11, but by following
the instructions at

  http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages

what gets installed is something that identifies itself as 1.99_12:

  ppm> query mod_perl
  Querying target 1 (ActivePerl 5.8.1.807)
    1. mod_perl     [1.99_12~ Embed a Perl interpreter in the Apache/2.0.48 http~
  ppm>

Once installed, it causes some errors with Apache::Status.

For example, requesting http://localhost/perl-status shows the required
information, followed by:

  OK
  The server encountered an internal error or misconfiguration and was
  unable to complete your request.

  [...]

FWIW, Apache::Status::handler returns 0, instead of Apache::OK or
whatever, but I'm not sure if that's the right value or not.

http://localhost/perl-status?myconfig fails, and the error logs says:

  [Sat Nov 15 17:39:17 2003] [error] [client 127.0.0.1] Modification of
  a read-only value attempted at C:/bin/Perl/lib/Config.pm line 75.
  , referer: http://localhost/perl-status

Config.pm line 75 tries to modify $summary, which is declared as

  our $summary : unique = ...

which could be the cause, as perlfunc states that:

  [...] this attribute also has the effect of making the
  global readonly when the first new interpreter is cloned (for
  example, when the first new thread is created).

Thanks,

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Stas Bekman <st...@stason.org>.
Elizabeth Mattijsen wrote:
> At 12:20 -0800 11/15/03, Stas Bekman wrote:
> 
>> Juanma Barranquero wrote:
>>
>>>   [Sat Nov 15 17:39:17 2003] [error] [client 127.0.0.1] Modification of
>>>   a read-only value attempted at C:/bin/Perl/lib/Config.pm line 75.
>>>   , referer: http://localhost/perl-status
>>
>> Yup, confirmed, that's a bug in perl:
>>
>> % perl-5.8.1-ithread -le 'use threads; require Config; \
>>   threads->new(sub { })->detach; print Config::myconfig()'
>> Modification of a read-only value attempted at 
>> /home/stas/perl/5.8.1-ithread/lib/5.8.1/i686-linux-thread-multi/Config.pm 
>> line 88.
> 
> 
> One of which I am guilty, I'm afraid.  This was one of the memory saving 
> fixes I submitted for 5.8.1.  To fix this with 5.8.1 and 5.8.2, please 
> add the following code to your program (or to Apache::Status possibly?):
> 
> use Config;
> BEGIN {
>     if ($Config::Config{useithreads} and $] > 5.008 and $] < 5.008003) {
>         no strict 'refs';
>         no warnings 'redefine';
>         sub Config::myconfig {
>             return $Config::summary_expanded if $Config::summary_expanded;
>             ($Config::summary_expanded = $Config::summary) =~ s{\$(\w+)}
>                  { my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
>             $Config::summary_expanded;
>         } #Config::myconfig
>     }
> }

Thanks a lot, Liz. I've committed a similar local workaround, without 
redefining Config::myconfig.

> This code should resolve the issue for 5.8.1 and 5.8.2.  I'll supply 
> patches for 5.8.3 to p5p.

Great! It'd be nice to have this tested as well under threads ;)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Elizabeth Mattijsen <li...@dijkmat.nl>.
At 12:20 -0800 11/15/03, Stas Bekman wrote:
>Juanma Barranquero wrote:
>>   [Sat Nov 15 17:39:17 2003] [error] [client 127.0.0.1] Modification of
>>   a read-only value attempted at C:/bin/Perl/lib/Config.pm line 75.
>>   , referer: http://localhost/perl-status
>Yup, confirmed, that's a bug in perl:
>
>% perl-5.8.1-ithread -le 'use threads; require Config; \
>   threads->new(sub { })->detach; print Config::myconfig()'
>Modification of a read-only value attempted at 
>/home/stas/perl/5.8.1-ithread/lib/5.8.1/i686-linux-thread-multi/Config.pm 
>line 88.

One of which I am guilty, I'm afraid.  This was one of the memory 
saving fixes I submitted for 5.8.1.  To fix this with 5.8.1 and 
5.8.2, please add the following code to your program (or to 
Apache::Status possibly?):

use Config;
BEGIN {
     if ($Config::Config{useithreads} and $] > 5.008 and $] < 5.008003) {
         no strict 'refs';
         no warnings 'redefine';
         sub Config::myconfig {
             return $Config::summary_expanded if $Config::summary_expanded;
             ($Config::summary_expanded = $Config::summary) =~ s{\$(\w+)}
                  { my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
             $Config::summary_expanded;
         } #Config::myconfig
     }
}


>I reported it to p5p and CC'ed you.
>
>However this works:
>
>% perl-5.8.1-ithread -le 'use threads; require Config; \
>   my $config = Config::myconfig(); threads->new(sub { })->detach; \
>   print $config'
>
>though it didn't help in Apache/Status :( I guess temprorary we 
>could call a slow external query:
>
>   qx[$^X -V]
>
>but I'll just disable it till this ussue gets resolved.

This code should resolve the issue for 5.8.1 and 5.8.2.  I'll supply 
patches for 5.8.3 to p5p.



Liz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 15 Nov 2003, Stas Bekman wrote:

> Juanma Barranquero wrote:
>
> > As a follow-up:
> >
> >   /perl-status?inc
> >
> > then click on a module with functions, then on a function, then Deparse;
> > I get, for example:
> >
> >   Deparse of Apache::XSLoader::BOOTSTRAP sub Apache::XSLoader::BOOTSTRAP () { 1 }
> >
> >   OK
> >
> >   The server encountered an internal error or misconfiguration and was
> >   unable to complete your request.
>
> Thanks, Juanma. Now fixed in cvs. (same problem)

I've just updated the mod_perl ppm package to reflect
these changes. The version hasn't changed, so to
install it, you may have to uninstall the old version.

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Stas Bekman <st...@stason.org>.
Juanma Barranquero wrote:

> As a follow-up:
> 
>   /perl-status?inc
> 
> then click on a module with functions, then on a function, then Deparse;
> I get, for example:
> 
>   Deparse of Apache::XSLoader::BOOTSTRAP sub Apache::XSLoader::BOOTSTRAP () { 1 } 
> 
>   OK
> 
>   The server encountered an internal error or misconfiguration and was
>   unable to complete your request.

Thanks, Juanma. Now fixed in cvs. (same problem)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Juanma Barranquero <le...@terra.es>.
On Sat, 15 Nov 2003 12:20:57 -0800, Stas Bekman <st...@stason.org> wrote:

> > FWIW, Apache::Status::handler returns 0, instead of Apache::OK or
> > whatever, but I'm not sure if that's the right value or not.
> 
> Good catch. Now fixed in cvs.

As a follow-up:

  /perl-status?inc

then click on a module with functions, then on a function, then Deparse;
I get, for example:

  Deparse of Apache::XSLoader::BOOTSTRAP sub Apache::XSLoader::BOOTSTRAP () { 1 } 

  OK

  The server encountered an internal error or misconfiguration and was
  unable to complete your request.

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Juanma Barranquero <le...@terra.es>.
On Sat, 15 Nov 2003 16:18:35 -0600 (CST), Randy Kobes <ra...@theoryx5.uwinnipeg.ca> wrote:

> At one point I tried keeping multiple versions. This becomes
> a bit complicated administratively, but more importantly,
> 99.9% of the time older versions have bugs that are fixed in
> the current version. This is the main reason I use the cvs
> version for the builds - however, I make sure that all, or
> at least the vast majority, of tests pass with a given
> build. So there's rarely a case of needing an older version,
> especially for something like mod_perl 2 which is in
> development.

Eh, I was not complaining (or, at least, I didn't mean to), I really am
thankful for the effort.

The "problem" was that I thought that doing "perl mpinstall" would
install the latest release (1.99_11, just announced), not a build from
the CVS HEAD. But I don't mind, I'm not using mod_perl in production,
just testing it, so if I'm bitten by a bug, I post a bug report and go on
happily :)

Cheers,

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Sat, 15 Nov 2003, Stas Bekman wrote:
> 
> 
>>Randy Kobes wrote:
>>
>>
>>>>Yeah, well, the problem is that now there's no 1.99_11 binary on
>>>>Winnipeg :( :)
>>>
>>>At one point I tried keeping multiple versions. This becomes
>>>a bit complicated administratively, but more importantly,
>>>99.9% of the time older versions have bugs that are fixed in
>>>the current version. This is the main reason I use the cvs
>>>version for the builds - however, I make sure that all, or
>>>at least the vast majority, of tests pass with a given
>>>build. So there's rarely a case of needing an older version,
>>>especially for something like mod_perl 2 which is in
>>>development.
>>
>>May be we should keep the binary of the latest release and
>>the cvs one? The cvs version may introduce bugs
>>non-existing in the last release and may go unnoticed for
>>quite some time, if 'make test' doesn't catch them. So if
>>winFU is now a viable platform for production use of
>>mod_perl 2.0 users will most likely be better off with the
>>latest release and not the cvs version.
>>
>>I'm not sure how ppm can handle that, though. Can it
>>ignore the dev versions by some method similar to PAUSE (_
>>in the version number)?
> 
> 
> That's a good point about the cvs vs last release ...
> ppm just downloads the name specified by the package,
> so we could make up two packages - "mod_perl" (the current
> official release), and "mod_perl-cvs", say.

Only if you really try to keep up with the cvs and make new releases let's say 
daily. Otherwise it'd be misleading if the cvs version doesn't match the 
binary. Therefore most likely you just want to call it mod_perl-dev, which 
doesn't guarantee that it's the very latest cvs.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 15 Nov 2003, Stas Bekman wrote:

> Randy Kobes wrote:
>
> >>Yeah, well, the problem is that now there's no 1.99_11 binary on
> >>Winnipeg :( :)
> >
> > At one point I tried keeping multiple versions. This becomes
> > a bit complicated administratively, but more importantly,
> > 99.9% of the time older versions have bugs that are fixed in
> > the current version. This is the main reason I use the cvs
> > version for the builds - however, I make sure that all, or
> > at least the vast majority, of tests pass with a given
> > build. So there's rarely a case of needing an older version,
> > especially for something like mod_perl 2 which is in
> > development.
>
> May be we should keep the binary of the latest release and
> the cvs one? The cvs version may introduce bugs
> non-existing in the last release and may go unnoticed for
> quite some time, if 'make test' doesn't catch them. So if
> winFU is now a viable platform for production use of
> mod_perl 2.0 users will most likely be better off with the
> latest release and not the cvs version.
>
> I'm not sure how ppm can handle that, though. Can it
> ignore the dev versions by some method similar to PAUSE (_
> in the version number)?

That's a good point about the cvs vs last release ...
ppm just downloads the name specified by the package,
so we could make up two packages - "mod_perl" (the current
official release), and "mod_perl-cvs", say.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:

>>Yeah, well, the problem is that now there's no 1.99_11 binary on
>>Winnipeg :( :)
> 
> 
> At one point I tried keeping multiple versions. This becomes
> a bit complicated administratively, but more importantly,
> 99.9% of the time older versions have bugs that are fixed in
> the current version. This is the main reason I use the cvs
> version for the builds - however, I make sure that all, or
> at least the vast majority, of tests pass with a given
> build. So there's rarely a case of needing an older version,
> especially for something like mod_perl 2 which is in
> development.

May be we should keep the binary of the latest release and the cvs one? The 
cvs version may introduce bugs non-existing in the last release and may go 
unnoticed for quite some time, if 'make test' doesn't catch them. So if winFU 
is now a viable platform for production use of mod_perl 2.0 users will most 
likely be better off with the latest release and not the cvs version.

I'm not sure how ppm can handle that, though. Can it ignore the dev versions 
by some method similar to PAUSE (_ in the version number)?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 15 Nov 2003, Juanma Barranquero wrote:

> On Sat, 15 Nov 2003 12:20:57 -0800, Stas Bekman <st...@stason.org> wrote:
>
> > I suppose Randy simply used the cvs version to make this build.

That's right ...

>
> Yeah, well, the problem is that now there's no 1.99_11 binary on
> Winnipeg :( :)

At one point I tried keeping multiple versions. This becomes
a bit complicated administratively, but more importantly,
99.9% of the time older versions have bugs that are fixed in
the current version. This is the main reason I use the cvs
version for the builds - however, I make sure that all, or
at least the vast majority, of tests pass with a given
build. So there's rarely a case of needing an older version,
especially for something like mod_perl 2 which is in
development.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Juanma Barranquero <le...@terra.es>.
On Sat, 15 Nov 2003 12:20:57 -0800, Stas Bekman <st...@stason.org> wrote:

> I suppose Randy simply used the cvs version to make this build.

Yeah, well, the problem is that now there's no 1.99_11 binary on
Winnipeg :( :)

> In fact what happened is that I started to port Apache::Status to mp2, but was 
> distracted by other issues and never had a chance to complete it. It's almost 
> completed though.

Hmm... ActivePerl 5.8.0 and mod_perl 1.99_11 worked flawlessly. ??

> I reported it to p5p and CC'ed you.

Yeah, thanks.

> p.s. though it wasn't needed for this report as I was able to reproduce the 
> problem, in the future bug reports please follow: 
> http://perl.apache.org/bugs/. Thanks.

Will do. Thanks for the prompt response.

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems with mod_perl 1.12 (?) and ActivePerl 5.8.1

Posted by Stas Bekman <st...@stason.org>.
Juanma Barranquero wrote:
> First of all, sorry if this is not the appropriate list.

This is the right list, Juanma. ;) Thank you for your report.

> I have a problem with the latest mod_perl 2.0 binary for Windows and
> ActivePerl 5.8.1 build 807. (I've tested it on XP and 2K with identical
> results, BTW.)
> 
> I know the latest release of mod_perl 2.0 is 1.99_11, but by following
> the instructions at
> 
>   http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages
> 
> what gets installed is something that identifies itself as 1.99_12:
> 
>   ppm> query mod_perl
>   Querying target 1 (ActivePerl 5.8.1.807)
>     1. mod_perl     [1.99_12~ Embed a Perl interpreter in the Apache/2.0.48 http~
>   ppm>

I suppose Randy simply used the cvs version to make this build.

> Once installed, it causes some errors with Apache::Status.
> 
> For example, requesting http://localhost/perl-status shows the required
> information, followed by:
> 
>   OK
>   The server encountered an internal error or misconfiguration and was
>   unable to complete your request.
> 
>   [...]
> 
> FWIW, Apache::Status::handler returns 0, instead of Apache::OK or
> whatever, but I'm not sure if that's the right value or not.

Good catch. Now fixed in cvs. Thank you.

In fact what happened is that I started to port Apache::Status to mp2, but was 
distracted by other issues and never had a chance to complete it. It's almost 
completed though.

> http://localhost/perl-status?myconfig fails, and the error logs says:
> 
>   [Sat Nov 15 17:39:17 2003] [error] [client 127.0.0.1] Modification of
>   a read-only value attempted at C:/bin/Perl/lib/Config.pm line 75.
>   , referer: http://localhost/perl-status
> 
> Config.pm line 75 tries to modify $summary, which is declared as
> 
>   our $summary : unique = ...
> 
> which could be the cause, as perlfunc states that:
> 
>   [...] this attribute also has the effect of making the
>   global readonly when the first new interpreter is cloned (for
>   example, when the first new thread is created).

Yup, confirmed, that's a bug in perl:

% perl-5.8.1-ithread -le 'use threads; require Config; \
   threads->new(sub { })->detach; print Config::myconfig()'
Modification of a read-only value attempted at 
/home/stas/perl/5.8.1-ithread/lib/5.8.1/i686-linux-thread-multi/Config.pm line 88.

I reported it to p5p and CC'ed you.

However this works:

% perl-5.8.1-ithread -le 'use threads; require Config; \
   my $config = Config::myconfig(); threads->new(sub { })->detach; \
   print $config'

though it didn't help in Apache/Status :( I guess temprorary we could call a 
slow external query:

   qx[$^X -V]

but I'll just disable it till this ussue gets resolved.

p.s. though it wasn't needed for this report as I was able to reproduce the 
problem, in the future bug reports please follow: 
http://perl.apache.org/bugs/. Thanks.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org