APR::Table sporadic error

APR::Table sporadic error

am 06.05.2011 17:24:18 von Jason Aubrey

--0015174c190c849b2004a29d16dc
Content-Type: text/plain; charset=UTF-8

Hi All,

We have a modperl application that is an online homework system for math
courses called webwork. My installation and a few others have seen a
sporadic error from APR::Table that nobody quite knows how to diagnose.
Here are two typical examples:

Example 1:
Can't locate object method "get" via package "APR::Table" at
[WW]/lib/Apache/WeBWorK.pm line 74
Died within AnswerEvaluator::evaluate called at line 1 of (eval 1321)
System: Ubuntu 8.04, Apache 2.2

Example 2:
Failed to initialize course environment: Could not evaluate global
environment file /opt/webwork/webwork2/conf/global.conf: Can't locate object
method "get" via package "APR::Table" at
/opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 74.
RHEL 5 with RedHat's build of Apache 2.2.3. 1 GB RAM, perl-status shows
ARP::Table is loaded.
APR::Table 0.009000 Fri Sep 19 04:30:28 2008
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /APR/Table.pm

I'm hoping you might be able to provide some suggestions of where to start
looking for the source of this problem.

The modperl handler is here:

http://webwork.maa.org/viewvc/system/trunk/webwork2/lib/Apac he/WeBWorK.pm?view=markup

The error was not seen (and has not been seen) running mod_perl 1. Here is
a report from one user:

We've seen the APR::Table error sporadically, and have found it to be
> chronic and page load dependent. We've found in every case that if we reload
> the page the error will go away. Our hypothesis is that it's probably a
> thread initialization problem, and that it shows up when the apache process
> hands the WeBWorK job off to a new thread that doesn't have all of the
> required Perl loaded before the it tries to execute the WeBWorK request.
> That said, we don't know much about thread management in apache, so we don't
> know if that's even credible.


Any hints/tips/ideas would be very much appreciated.

Thanks,
Jason

--0015174c190c849b2004a29d16dc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi All,

We have a modperl application that is an online homework sys=
tem for math courses called webwork.  My installation and a few others=
have seen a sporadic error from APR::Table that nobody quite knows how to =
diagnose.  Here are two typical examples:



Example 1:
Can't locate object method "get" via packag=
e "APR::Table" at [WW]/lib/Apache/WeBWorK.pm line 74
Died with=
in AnswerEvaluator::evaluate called at line 1 of (eval 1321)
System: Ubu=
ntu 8.04, Apache 2.2



Example 2:
Failed to initialize course environment: Could not evalua=
te global environment file /opt/webwork/webwork2/conf/global.conf: Can'=
t locate object method "get" via package "APR::Table" a=
t /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 74.


RHEL 5 with RedHat's build of Apache 2.2.3. 1 GB RAM, perl-status shows=
ARP::Table is loaded.
APR::Table 0.009000 Fri Sep 19 04:30:28 2008 /=
usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ APR/Table.pm >


I'm hoping you might be able to provide some suggestions of where t=
o start looking for the source of this problem.

The modperl handler =
is here:

ork2/lib/Apache/WeBWorK.pm?view=3Dmarkup">http://webwork.maa .org/viewvc/sys=
tem/trunk/webwork2/lib/Apache/WeBWorK.pm?view=3Dmarkup




The error was not seen (and has not been seen) running mod_perl 1.=C2=
=A0 Here is a report from one user:

0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1e=
x;" class=3D"gmail_quote">

We've seen the APR::Table error sporadically, and have found it to be c=
hronic and page load dependent. We've found in every case that if we re=
load the page the error will go away. Our hypothesis is that it's proba=
bly a thread initialization problem, and that it shows up when the apache p=
rocess hands the WeBWorK job off to a new thread that doesn't have all =
of the required Perl loaded before the it tries to execute the WeBWorK requ=
est. That said, we don't know much about thread management in apache, s=
o we don't know if that's even credible.



Any hints/tips/ideas would be very much appreciated.

Thanks=
,
Jason


--0015174c190c849b2004a29d16dc--

Re: APR::Table sporadic error

am 06.05.2011 18:01:14 von torsten.foertsch

On Friday, May 06, 2011 17:24:18 Jason Aubrey wrote:
> Any hints/tips/ideas would be very much appreciated.

Are you really sure (I mean really really) that APR::Table is loaded? I=20
see you load Apache2::Log but nothing about APR::Table.

I think if you replace line 74

my $warnings =3D $r->notes->get("warnings");

by

my $warnings =3D eval {$r->notes->get("warnings")};
if( $@ ) {
warn "APR::Table is '$INC{q{APR/Table.pm}}'";
die $@;
}

you will see that it is not loaded.

If you use a threaded Perl make sure every interpreter loads APR::Table.=20
Do you by chance use PerlOptions +Parent in a VHost?

Torsten Förtsch

=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Re: APR::Table sporadic error

am 06.05.2011 18:05:57 von Jason Aubrey

--0015174c190c78f8b904a29daba7
Content-Type: text/plain; charset=UTF-8

>
> my $warnings = eval {$r->notes->get("warnings")};
> if( $@ ) {
> warn "APR::Table is '$INC{q{APR/Table.pm}}'";
> die $@;
> }
>
> you will see that it is not loaded.
>
>
Thanks Torsten - we'll try this out.

If you use a threaded Perl make sure every interpreter loads APR::Table.
> Do you by chance use PerlOptions +Parent in a VHost?
>
> No, the typical configuration is like this:

http://webwork.maa.org/viewvc/system/trunk/webwork2/conf/web work.apache2-config.dist?revision=6531&view=markup

Thanks again,
Jason

--0015174c190c78f8b904a29daba7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


argin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); paddin=
g-left: 1ex;">


 my $warnings =3D eval {$r->notes->get("warnings")};<=
br>
 if( $@ ) {

   warn "APR::Table is '$INC{q{APR/Table.pm}}'"=
;;

   die $@;

 }



you will see that it is not loaded.



Thanks Torsten - we'll try this out.

=
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If you use a threaded Perl make sure every interpreter loads APR::Table. >
Do you by chance use PerlOptions +Parent in a VHost?


No, the typical configuration is like this:

href=3D"http://webwork.maa.org/viewvc/system/trunk/webwork2/ conf/webwork.a=
pache2-config.dist?revision=3D6531&view=3Dmarkup">http:/ /webwork.maa.or=
g/viewvc/system/trunk/webwork2/conf/webwork.apache2-config.d ist?revision=3D=
6531&view=3Dmarkup



Thanks again,
Jason
 


--0015174c190c78f8b904a29daba7--

Re: APR::Table sporadic error

am 06.05.2011 20:18:35 von Jason Aubrey

--0015174bde8ecd453c04a29f85ca
Content-Type: text/plain; charset=UTF-8

Additional data:

One effected installation (Ubuntu 10.04.2, Apache 2.2.14, Perl 5.10.1,
libapache2-mod-perl2 2.0.4) reports that that eval
{$r->notes->get("warnings")} did not produce an error ($@ was not set) in
his case, but that this problem went away for him after reverting the ubuntu
perl updates from May 4 (http://www.ubuntu.com/usn/usn-1129-1/).

Those perl updates on Ubuntu seem to have triggered this error for the two
installations that reported it today, but the strange thing is that this is
not the first time we've seen this error - it was reported on a CentOS
installation and two RHEL 5 installations in January.

Perhaps RH et. al. applied the patches for the SVE's in January and Ubuntu
just now, and one of those changes is causing this. Still, we don't know,
so any other possible leads will be eagerly followed.

Jason

2011/5/6 Jason Aubrey

>
>
>> my $warnings = eval {$r->notes->get("warnings")};
>> if( $@ ) {
>> warn "APR::Table is '$INC{q{APR/Table.pm}}'";
>> die $@;
>> }
>>
>> you will see that it is not loaded.
>>
>>
> Thanks Torsten - we'll try this out.
>
> If you use a threaded Perl make sure every interpreter loads APR::Table.
>> Do you by chance use PerlOptions +Parent in a VHost?
>>
>> No, the typical configuration is like this:
>
>
> http://webwork.maa.org/viewvc/system/trunk/webwork2/conf/web work.apache2-config.dist?revision=6531&view=markup
>
> Thanks again,
> Jason
>
>

--0015174bde8ecd453c04a29f85ca
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Additional data:

One effected installation (Ubuntu 10.04.2, Apache 2=
..2.14, Perl 5.10.1, libapache2-mod-perl2 2.0.4) reports that that eval {$r-=
>notes->get("warnings")} did not produce an error ($@ was n=
ot set)  in his case, but that this problem went away for him after re=
verting the ubuntu perl updates from May 4 ( m/usn/usn-1129-1/">http://www.ubuntu.com/usn/usn-1129-1/). 



Those perl updates on Ubuntu seem to have triggered this error for the =
two installations that reported it today, but the strange thing is that thi=
s is not the first time we've seen this error - it was reported on a Ce=
ntOS installation and two RHEL 5 installations in January. 



Perhaps RH et. al. applied the patches for the SVE's in January and=
Ubuntu just now, and one of those changes is causing this.  Still, we=
don't know, so any other possible leads will be eagerly followed.
<=
br>

Jason

2011/5/6 Jason Aubrey ltr"><> span>
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt=
0pt 0.8ex; padding-left: 1ex;">


 my $warnings =3D eval {$r->notes->get("warnings")};<=
br>
 if( $@ ) {

   warn "APR::Table is '$INC{q{APR/Table.pm}}'"=
;;

   die $@;

 }



you will see that it is not loaded.



Thanks Torsten - we'll try this out. r>
rder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding=
-left: 1ex;">


If you use a threaded Perl make sure every interpreter loads APR::Table. >
Do you by chance use PerlOptions +Parent in a VHost?






--0015174bde8ecd453c04a29f85ca--