You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by vi...@outblaze.com on 2002/05/14 10:50:06 UTC

Memory usage option in Apache::Status

Hope someone can give me a hand on this, I am having some problem using
the Memory Usage option in the main menu of Apache::Status.  

It always return me a 500 with the following error.

[Tue May 14 08:48:21 2002] [error] Can't call method "size" on unblessed
reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
94.


This is the config I added to httpd.conf to enable the feature.

<Location /perl-status>
  SetHandler perl-script
  PerlModule Apache::Status
  PerlModule B::TerseSize
  PerlHandler Apache::Status

  PerlSetVar StatusOptionsAll On
  PerlSetVar StatusTerse On
  PerlSetVar StatusTerseSize On
  PerlSetVar StatusTerseSizeMainSummary On
</Location>


Any idea what I have missed?


Tor.

Re: Memory usage option in Apache::Status

Posted by Stas Bekman <st...@stason.org>.
victor@outblaze.com wrote:
>>ok, next trace to the offending code.

> [Tue May 14 10:38:19 2002] [error] Can't call method "size" on unblessed
> reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
> 94.
>         B::AV::size(1, 'B::AV=SCALAR(0xa063444)') called at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 438

I cannot reproduce the problem, but it seems that the problem is in
B/Size.pm:93    my @vals = $sv->ARRAY;

which returns values which aren't references (at least one). You may 
want to muck around this code and print what's inside @vals.

>         B::TerseSize::PADLIST_size('B::CV=SCALAR(0xa0674a0)',
> 'B::CV=SCALAR(0xa0674a0)', 'B::CV=SCALAR(0xa0674a0)',
> 'B::CV=SCALAR(0xa0674a0)') called at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 190
>         B::TerseSize::CV_walk('slow', 'B::NULL::size', 'op_size') called
> at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 123
>         B::TerseSize::package_size('B::NULL') called at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 542
>         B::TerseSize::apache_package_size('B::HV', 'B::Terse',
> 'B::SPECIAL', 'B::NULL') called at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 563
>         B::TerseSize::status_memory_usage('Apache=SCALAR(0x9e4ae5c)',
> 'CGI=HASH(0x9e4aa8c)') called at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Status.pm line 66
>         Apache::Status::handler('Apache=SCALAR(0x9e4ae5c)') called at
> /usr/lib/perl5/5.6.0/Carp.pm line 119
>         require 0 called at /usr/lib/perl5/5.6.0/Carp.pm line 119

> I will see if I can borrow a testing machine tomorrow to try the
> upgrade.

Please check if the problem does go away with 5.6.1. if not please
provide a short script/module that reproduces the problem (via
Apache::Status of course)



__________________________________________________________________
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


Re: Memory usage option in Apache::Status

Posted by vi...@outblaze.com.
> ok, next trace to the offending code. Put in your startup.pl:
> 
> use Carp;
> $SIG{__DIE__} = \&Carp::confess;
> 
> hopefully nobody redefines $SIG{__DIE__}


ok, this is what I get in the error log 


[Tue May 14 10:38:19 2002] [error] Can't call method "size" on unblessed
reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
94.
        B::AV::size(1, 'B::AV=SCALAR(0xa063444)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 438
        B::TerseSize::PADLIST_size('B::CV=SCALAR(0xa0674a0)',
'B::CV=SCALAR(0xa0674a0)', 'B::CV=SCALAR(0xa0674a0)',
'B::CV=SCALAR(0xa0674a0)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 190
        B::TerseSize::CV_walk('slow', 'B::NULL::size', 'op_size') called
at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 123
        B::TerseSize::package_size('B::NULL') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 542
        B::TerseSize::apache_package_size('B::HV', 'B::Terse',
'B::SPECIAL', 'B::NULL') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/B/TerseSize.pm line 563
        B::TerseSize::status_memory_usage('Apache=SCALAR(0x9e4ae5c)',
'CGI=HASH(0x9e4aa8c)') called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Status.pm line 66
        Apache::Status::handler('Apache=SCALAR(0x9e4ae5c)') called at
/usr/lib/perl5/5.6.0/Carp.pm line 119
        require 0 called at /usr/lib/perl5/5.6.0/Carp.pm line 119


> >   Would love to, but it's a production machine, so .. I can't upgrade it
> > unless something major breaks.  (^_^!)
> 
> This is a *major* reason for updating :)
> 

I will see if I can borrow a testing machine tomorrow to try the
upgrade.

Tor.

Re: Memory usage option in Apache::Status

Posted by Stas Bekman <st...@stason.org>.
victor@outblaze.com wrote:
>>victor@outblaze.com wrote:
>>
>>>Hope someone can give me a hand on this, I am having some problem using
>>>the Memory Usage option in the main menu of Apache::Status.
>>>
>>>It always return me a 500 with the following error.
>>>
>>>[Tue May 14 08:48:21 2002] [error] Can't call method "size" on unblessed
>>>reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
>>>94.

>   yes, I have both installed. 

ok, next trace to the offending code. Put in your startup.pl:

use Carp;
$SIG{__DIE__} = \&Carp::confess;

hopefully nobody redefines $SIG{__DIE__}


>>Also 5.6.0 is *very* buggy, so upgrading to 5.6.1 is a very good idea.
> 
> 
> 
>   Would love to, but it's a production machine, so .. I can't upgrade it
> unless something major breaks.  (^_^!)

This is a *major* reason for updating :)


__________________________________________________________________
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


Re: Memory usage option in Apache::Status

Posted by vi...@outblaze.com.
> 
> victor@outblaze.com wrote:
> > Hope someone can give me a hand on this, I am having some problem using
> > the Memory Usage option in the main menu of Apache::Status.
> >
> > It always return me a 500 with the following error.
> >
> > [Tue May 14 08:48:21 2002] [error] Can't call method "size" on unblessed
> > reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
> > 94.


Thanks for you prompt reply stats.

 
> Do you have B::Size installed?
> 
>    perl -MB::Size -e1
> 
> Can you use TerseSize from the command line?
> 
>    perl -MO=TerseSize -e '1'
> 

  yes, I have both installed. and here's the return running the command
you gave.


[]$ perl -MB::Size -e1
[]$ perl -MO=TerseSize -e '1'
LISTOP leave         0x818acf0 {36 bytes}
    OP     enter         0x81c6c90 {24 bytes}
------------------------------------------------------------
    COP    nextstate     0x8173900 {24 bytes}
    OP     null          0x81d6140 {24 bytes} [const - constant item]
-e syntax OK


> Also 5.6.0 is *very* buggy, so upgrading to 5.6.1 is a very good idea.


  Would love to, but it's a production machine, so .. I can't upgrade it
unless something major breaks.  (^_^!)


Tor.

Re: Memory usage option in Apache::Status

Posted by Stas Bekman <st...@stason.org>.
victor@outblaze.com wrote:
> Hope someone can give me a hand on this, I am having some problem using
> the Memory Usage option in the main menu of Apache::Status.  
> 
> It always return me a 500 with the following error.
> 
> [Tue May 14 08:48:21 2002] [error] Can't call method "size" on unblessed
> reference at /usr/lib/perl5/site_perl/5.6.0/i386-linux/B/Size.pm line
> 94.

Do you have B::Size installed?

   perl -MB::Size -e1

Can you use TerseSize from the command line?

   perl -MO=TerseSize -e '1'

Also 5.6.0 is *very* buggy, so upgrading to 5.6.1 is a very good idea.


> This is the config I added to httpd.conf to enable the feature.
> 
> <Location /perl-status>
>   SetHandler perl-script
>   PerlModule Apache::Status
>   PerlModule B::TerseSize
>   PerlHandler Apache::Status
> 
>   PerlSetVar StatusOptionsAll On
>   PerlSetVar StatusTerse On
>   PerlSetVar StatusTerseSize On
>   PerlSetVar StatusTerseSizeMainSummary On
> </Location>

__________________________________________________________________
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