mod_perl works BUT rtld errors with some modules.

mod_perl works BUT rtld errors with some modules.

am 17.12.2009 04:41:04 von greg.george

This is a multipart message in MIME format.
--=_alternative 00143C30CA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"

Hi List,

I have Apache/2.2.11 mod_perl/2.0.4 Perl/v5.10.1 all built with gcc on AIX
5.3
Mod_perl works for simple scripts.
Adding 'use ARS.pm' to startup.pl causes the following error:

[error] Can't load
'/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so' for module
ARS: rtld: 0712-001 Symbol xdr_sizeof was referenced
from module
/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so(), but a runtime
definition
of the symbol was not found.

Outside of mod_perl, startup.pl runs fine.

Checking ARS.so with dump -Tv shows:

/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so:
***Loader Symbol Table Information***
[Index] Value Scn IMEX Sclass Type IMPid Name
[215] 0x00000000 undef IMP DS EXTref ..
xdr_sizeof

and /usr/lib/libnsl.a(shr.o) contains xdr_sizeof

LDPATH is set in httpd.conf to include /usr/lib and this is confirmed with
a print of %ENV from within startup.pl (from mod_perl ie with use ARS.pm
commented out)

I have confirmed that startup.pl is running as root when the error occurs.

I have googled my heart out but can not find any answers.
Any clues, suggestions etc would be appreciated.
Thanks in advance.

Regards,
Greg George
IT Shared Services
Phone: +613-9091-2492
3/100 Victoria Prd, Melbourne

Please consider the environment before printing this e-mail
************************************************************ ************************************************************ ************************************************************ ***********
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
************************************************************ ************************************************************ ************************************************************ ***********

--=_alternative 00143C30CA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="us-ascii"



Hi List,



I have Apache/2.2.11 mod_perl/2.0.4
Perl/v5.10.1 all built with gcc
on
AIX 5.3


Mod_perl works for simple scripts.

Adding 'use ARS.pm' to startup.pl causes
the following error:




[error] Can't load '/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so'
for module ARS: rtld: 0712-001 Symbol xdr_sizeof was referenced


      from module /opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so(),
but a runtime definition


      of the symbol was
not found.




Outside of mod_perl, startup.pl runs
fine.




Checking ARS.so with dump -Tv shows:



/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so:

           
            ***Loader Symbol Table Information***


[Index]      Value  
   Scn     IMEX Sclass   Type      
    IMPid Name


[215]   0x00000000    undef
     IMP     DS EXTref        
     .. xdr_sizeof




and /usr/lib/libnsl.a(shr.o) contains
xdr_sizeof




LDPATH is set in httpd.conf to include
/usr/lib and this is confirmed with a print of %ENV from within startup.pl
(from mod_perl ie with use ARS.pm commented out)




I have confirmed that startup.pl is
running as root when the error occurs.




I have googled my heart out but can
not find any answers.


Any clues, suggestions etc would be
appreciated.


Thanks in advance.



Regards,

Greg George

IT Shared Services

Phone: +613-9091-2492

3/100 Victoria Prd, Melbourne



Please consider the environment before printing this e-mail

***********************************************************************************************************************************************************************************************
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
***********************************************************************************************************************************************************************************************

--=_alternative 00143C30CA25768F_=--

Re: mod_perl works BUT rtld errors with some modules.

am 17.12.2009 16:01:45 von Perrin Harkins

On Wed, Dec 16, 2009 at 10:41 PM, wrote:
> [error] Can't load
> '/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so' for module AR=
S:
> rtld: 0712-001 Symbol xdr_sizeof was referenced
> =A0 =A0 =A0 from module
> /opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so(), but a runtim=
e
> definition
> =A0 =A0 =A0 of the symbol was not found.
>
> Outside of mod_perl, startup.pl runs fine.

Are you certain that ARS was compiled against the same perl as
mod_perl was? You might try recompiling it

- Perrin

Re: mod_perl works BUT rtld errors with some modules.

am 17.12.2009 22:25:06 von greg.george

This is a multipart message in MIME format.
--=_alternative 0075A620CA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"

Hi Perrin,

Yes I compiled it just after compiling perl. Perl, apache, mod_perl and a
number of modules I need were all compiled with the same compiler on the
same machine.
I have recompiled and installed ARS (just in case I am losing my mind) but
still have the same problem.
Note that I can run the startup.pl from the command line OK, just fails
when mod_perl tries.
I have also added use DBI and setup an Oracle dbh which connects fine - so
at least some XS code does get loaded OK.

BTW apache is starting as root and I have confirmed that startup.pl is
being run as root by apache/mod_perl
I am going to look in more detail at what DynaLoader.pm does in case this
gives any clues.

Greg George

Perrin Harkins wrote on 18/12/2009 02:01:45 AM:
> On Wed, Dec 16, 2009 at 10:41 PM, wrote:
> > [error] Can't load
> > '/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so' for module
ARS:
> > rtld: 0712-001 Symbol xdr_sizeof was referenced
> > from module
> > /opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so(), but a
runtime
> > definition
> > of the symbol was not found.
> >
> > Outside of mod_perl, startup.pl runs fine.
>
> Are you certain that ARS was compiled against the same perl as
> mod_perl was? You might try recompiling it
>
> - Perrin
************************************************************ ************************************************************ ************************************************************ ***********
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
************************************************************ ************************************************************ ************************************************************ ***********

--=_alternative 0075A620CA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="us-ascii"



Hi Perrin,



Yes I compiled it just after compiling
perl.  Perl, apache, mod_perl and a number of modules I need were
all compiled with the same compiler on the same machine.


I have recompiled and installed ARS
(just in case I am losing my mind) but still have the same problem.


Note that I can run the startup.pl from
the command line OK, just fails when mod_perl tries.


I have also added use DBI and setup
an Oracle dbh which connects fine - so at least some XS code does get loaded
OK.




BTW apache is starting as root and I
have confirmed that startup.pl is being run as root by apache/mod_perl


I am going to look in more detail at
what DynaLoader.pm does in case this gives any clues.




Greg George



Perrin Harkins <pharkins@gmail.com> wrote on
18/12/2009 02:01:45 AM:

> On Wed, Dec 16, 2009 at 10:41 PM,  <greg.george@orica.com>
wrote:

> > [error] Can't load

> > '/opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so' for
module ARS:

> > rtld: 0712-001 Symbol xdr_sizeof was referenced

> >       from module

> > /opt/apache/perl/lib/site_perl/5.10.1/aix/auto/ARS/ARS.so(),
but a runtime

> > definition

> >       of the symbol was not found.

> >

> > Outside of mod_perl, startup.pl runs fine.

>

> Are you certain that ARS was compiled against the same perl as

> mod_perl was?  You might try recompiling it

>

> - Perrin

***********************************************************************************************************************************************************************************************
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
***********************************************************************************************************************************************************************************************

--=_alternative 0075A620CA25768F_=--

Re: mod_perl works BUT rtld errors with some modules.

am 17.12.2009 22:29:58 von mpeters

On 12/17/2009 04:25 PM, greg.george@orica.com wrote:
> BTW apache is starting as root and I have confirmed that startup.pl is
> being run as root by apache/mod_perl
> I am going to look in more detail at what DynaLoader.pm does in case
> this gives any clues.

Not sure if this helps or not, but on some systems LD_LIBRARY_PATH can't
be set by the same process that uses it. So you need it set by the
process that starts the process that uses. So for instance, you need to
make sure it's set in your shell environment and that it gets exported
to the commands you run (sometimes "su" can remove ENV vars). And then
you'll need a "PassEnv LD_LIBRARY_PATH" and a "PerlPassEnv
LD_LIBRARY_PATH". But you can't do a "SetEnv LD_LIBRARY_PATH" in your
httpd.conf.

Not sure if that will help or not though since it's been a while since
I've touched AIX.

--
Michael Peters
Plus Three, LP

Re: mod_perl works BUT rtld errors with some modules.

am 17.12.2009 22:38:34 von Fred Moyer

On Thu, Dec 17, 2009 at 1:29 PM, Michael Peters wrote:
> On 12/17/2009 04:25 PM, greg.george@orica.com wrote:
>>
>> BTW apache is starting as root and I have confirmed that startup.pl is
>> being run as root by apache/mod_perl
>> I am going to look in more detail at what DynaLoader.pm does in case
>> this gives any clues.
>
> Not sure if this helps or not, but on some systems LD_LIBRARY_PATH can't be
> set by the same process that uses it. So you need it set by the process that
> starts the process that uses. So for instance, you need to make sure it's
> set in your shell environment and that it gets exported to the commands you
> run (sometimes "su" can remove ENV vars). And then you'll need a "PassEnv
> LD_LIBRARY_PATH" and a "PerlPassEnv LD_LIBRARY_PATH". But you can't do a
> "SetEnv LD_LIBRARY_PATH" in your httpd.conf.
>
> Not sure if that will help or not though since it's been a while since I've
> touched AIX.

I remember LD_LIBRARY_PATH issues a few years ago with 64bit and
libpaths in /usr/lib64 etc. I was able to resolve that by adding the
paths to /etc/ld.so.conf or something similar and then running
ldconfig to update the system library paths. No such facility in AIX:

http://groups.google.com/group/comp.unix.aix/browse_frm/thre ad/b9bad793f5e2a475?pli=1

Re: mod_perl works BUT rtld errors with some modules.

am 17.12.2009 23:19:43 von greg.george

This is a multipart message in MIME format.
--=_alternative 007AA66FCA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"

Thanks guys, seems that AIX does some trickery when there is setuid stuff.
I tried running on port 8080 as a normal users and it works fine.
I will solve the situation and then post back so others can find the
solution.
Thanks heaps guys for the pointers.

Fred Moyer wrote on 18/12/2009 08:38:34 AM:
> On Thu, Dec 17, 2009 at 1:29 PM, Michael Peters
wrote:
> > On 12/17/2009 04:25 PM, greg.george@orica.com wrote:
> >>
> >> BTW apache is starting as root and I have confirmed that startup.pl
is
> >> being run as root by apache/mod_perl
> >> I am going to look in more detail at what DynaLoader.pm does in case
> >> this gives any clues.
> >
> > Not sure if this helps or not, but on some systems LD_LIBRARY_PATH
can't be
> > set by the same process that uses it. So you need it set by the
process that
> > starts the process that uses. So for instance, you need to make sure
it's
> > set in your shell environment and that it gets exported to the
commands you
> > run (sometimes "su" can remove ENV vars). And then you'll need a
"PassEnv
> > LD_LIBRARY_PATH" and a "PerlPassEnv LD_LIBRARY_PATH". But you can't do
a
> > "SetEnv LD_LIBRARY_PATH" in your httpd.conf.
> >
> > Not sure if that will help or not though since it's been a while since
I've
> > touched AIX.
>
> I remember LD_LIBRARY_PATH issues a few years ago with 64bit and
> libpaths in /usr/lib64 etc. I was able to resolve that by adding the
> paths to /etc/ld.so.conf or something similar and then running
> ldconfig to update the system library paths. No such facility in AIX:
>
>
http://groups.google.com/group/comp.unix.aix/browse_frm/thre ad/b9bad793f5e2a475?pli=1

************************************************************ ************************************************************ ************************************************************ ***********
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
************************************************************ ************************************************************ ************************************************************ ***********

--=_alternative 007AA66FCA25768F_=
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="us-ascii"



Thanks guys, seems that AIX does some trickery when
there is setuid stuff.


I tried running on port 8080 as a normal users and
it works fine.


I will solve the situation and then post back so others
can find the solution.


Thanks heaps guys for the pointers.



Fred Moyer <fred@redhotpenguin.com> wrote on
18/12/2009 08:38:34 AM:

> On Thu, Dec 17, 2009 at 1:29 PM, Michael Peters <mpeters@plusthree.com>
wrote:

> > On 12/17/2009 04:25 PM, greg.george@orica.com wrote:

> >>

> >> BTW apache is starting as root and I have confirmed that
startup.pl is

> >> being run as root by apache/mod_perl

> >> I am going to look in more detail at what DynaLoader.pm does
in case

> >> this gives any clues.

> >

> > Not sure if this helps or not, but on some systems LD_LIBRARY_PATH
can't be

> > set by the same process that uses it. So you need it set by the
process that

> > starts the process that uses. So for instance, you need to make
sure it's

> > set in your shell environment and that it gets exported to the
commands you

> > run (sometimes "su" can remove ENV vars). And then
you'll need a "PassEnv

> > LD_LIBRARY_PATH" and a "PerlPassEnv LD_LIBRARY_PATH".
But you can't do a

> > "SetEnv LD_LIBRARY_PATH" in your httpd.conf.

> >

> > Not sure if that will help or not though since it's been a while
since I've

> > touched AIX.

>

> I remember LD_LIBRARY_PATH issues a few years ago with 64bit and

> libpaths in /usr/lib64 etc.  I was able to resolve that by adding
the

> paths to /etc/ld.so.conf or something similar and then running

> ldconfig to update the system library paths.  No such facility
in AIX:

>

>
http://groups.google.com/group/comp.unix.aix/browse_frm/thre ad/b9bad793f5e2a475?pli=1

***********************************************************************************************************************************************************************************************
Please consider the environment before printing this e-mail.

This message is intended solely for the individual(s) and entity(s) addressed. It is confidential and may contain legally privileged information. The use, copying or distribution of this
message or any information it contains, by anyone other than the addressee, is prohibited. If you have received this message in error, please notify postmaster@orica.com. The mailbox address
from which this message has been sent is for business mail only. Mail sent to it may be subject to security scanning and delivery on non-business messages sent to this address may not occur.
Thank you.
***********************************************************************************************************************************************************************************************

--=_alternative 007AA66FCA25768F_=--