You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Danny Rathjens <gm...@rathjens.org> on 2004/06/09 01:18:08 UTC
[mp1] Dumper module becoming undefined sporadically
I started getting this error sporadically from different pieces of code.
Both modules(cached) and scripts(not cached):
[error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper
perl -MData::Dumper -e'print Dumper %ENV' works fine from commandline
which rules out a hdd problem.
An apache restart stopped error completely, which led me to think
it was a RAM problem that messed up the symbol table in a certain
apache child which caused the sporadic errors.
I had no errors for ten days, but now it started doing it again,
with the exact same undefined message for Dumper, which makes me
realize it's not a RAM issue.
It started yesterday, and code had not been modified for 5 days.
I also have
PerlInitHandler Apache::StatINC
PerlSetVar StatINC_UndefOnReload On
Any ideas what could be causing this problem, or suggestions as to how
I should investigate it further?
Here is my version info
Embedded Perl version v5.6.1 for Apache/1.3.29 (Unix) mod_throttle/3.1.2 mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.6b
This is the simplified script I made to reproduce the problem:
#!/usr/bin/perl
use Data::Dumper;
print "Content-type: text/plain\n\n";
print Dumper(\%ENV);
exit;
Which resulted, sporadically(upon hitting certain apache child I assume), in this error:
[Fri May 28 15:09:25 2004] [error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper called at /data/cgi-bin/printenv line 4
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp1] Dumper module becoming undefined sporadically
Posted by Danny Rathjens <gm...@rathjens.org>.
Stas Bekman wrote:
> Danny Rathjens wrote:
>> I started getting this error sporadically from different pieces of code.
>> Both modules(cached) and scripts(not cached):
>> [error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper
[snip]
>
> I think it's due to your use of StatINC, please have a read of this
> section:
> http://perl.apache.org/docs/2.0/api/Apache/Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_that_Cache_the_Code
>
>
> You should move to Apache::Reload anyway (for mp1 it's available on
> CPAN, mp2 is a part of the core), though you will probably have the same
> issue.
>
Thanks for the response. The problem is evidently related to that, but I am
using PerlRun, not Registry. And Data::Dumper is a core module that was
obviously not modified. So I wonder how the internal address is becoming
invalid. I guess it could be some bug in StatINC. It was an accident to
leave that enabled on my live server anyway, ;) So I am disabling that.
If it still happens, then I shall do some more work to trace down the bug.
Thanks again.
--
_.,-*~`^'~*-,._ Danny Rathjens _.,-*~`^'~*-,._
FireCast: Rock solid kiosk software: http://wirespring.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: [mp1] Dumper module becoming undefined sporadically
Posted by Stas Bekman <st...@stason.org>.
Danny Rathjens wrote:
> I started getting this error sporadically from different pieces of code.
> Both modules(cached) and scripts(not cached):
> [error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper
>
> perl -MData::Dumper -e'print Dumper %ENV' works fine from commandline
> which rules out a hdd problem.
>
> An apache restart stopped error completely, which led me to think
> it was a RAM problem that messed up the symbol table in a certain
> apache child which caused the sporadic errors.
>
> I had no errors for ten days, but now it started doing it again,
> with the exact same undefined message for Dumper, which makes me
> realize it's not a RAM issue.
>
> It started yesterday, and code had not been modified for 5 days.
> I also have
> PerlInitHandler Apache::StatINC
> PerlSetVar StatINC_UndefOnReload On
>
> Any ideas what could be causing this problem, or suggestions as to how
> I should investigate it further?
>
> Here is my version info
> Embedded Perl version v5.6.1 for Apache/1.3.29 (Unix) mod_throttle/3.1.2
> mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.6b
>
> This is the simplified script I made to reproduce the problem:
> #!/usr/bin/perl
> use Data::Dumper;
> print "Content-type: text/plain\n\n";
> print Dumper(\%ENV);
> exit;
>
> Which resulted, sporadically(upon hitting certain apache child I
> assume), in this error:
> [Fri May 28 15:09:25 2004] [error] PerlRun: `Undefined subroutine
> &Data::Dumper::Dumper called at /data/cgi-bin/printenv line 4
I think it's due to your use of StatINC, please have a read of this section:
http://perl.apache.org/docs/2.0/api/Apache/Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_that_Cache_the_Code
You should move to Apache::Reload anyway (for mp1 it's available on CPAN, mp2
is a part of the core), though you will probably have the same issue.
--
__________________________________________________________________
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html