Perl problems in -current

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Perl problems in -current

Tom Murphy-7
I'm running the June 20 2010 snapshot on a webserver and was attempting
to get Blogsum
up and running, but I get this error in the log:

[Tue Jul  6 11:21:47 2010] [error] PerlRun: `Can't locate Carp/Heavy.pm
in @INC (@INC contains:
/usr/local/lib/perl5/site_perl/5.10.1/i386-openbsd
/usr/libdata/perl5/i386-openbsd/5.10.1
/usr/local/libdata/perl5/i386-openbsd/5.10.1 /usr/libdata/perl5
/usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl .
/var/www/ /var/www/lib/perl) at /usr/libdata/perl5/Carp.pm line 39.\n'

I've tried non-chrooting the web server and the message does not change.
I've checked the file and it does exist and is there. If I run perl on
the command-line, it can see that file just fine. The @INC includes the
file in its paths.

This error does not occur in 4.7-release. Has there been something up
with the Perl packages in -current lately?

Thanks,
Tom

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

J.C. Roberts-3
On Tue, 06 Jul 2010 11:26:42 +0100 Tom Murphy <[hidden email]>
wrote:
>
> This error does not occur in 4.7-release. Has there been something up
> with the Perl packages in -current lately?

Marc Espie (espie@) has been doing tons and tons of work on the ports
system. The packages in question are actually parts of the ports system.

--
The OpenBSD Journal - http://www.undeadly.org

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Tom Murphy-7
Carp/Heavy.pm is actually part of base.
It doesn't make sense that the file is in @INC and still perl cannot find it.

Tom

----- Original message -----

> On Tue, 06 Jul 2010 11:26:42 +0100 Tom Murphy <[hidden email]>
> wrote:
> >
> > This error does not occur in 4.7-release. Has there been something up
> > with the Perl packages in -current lately?
>
> Marc Espie (espie@) has been doing tons and tons of work on the ports
> system. The packages in question are actually parts of the ports system.
>
> --
> The OpenBSD Journal - http://www.undeadly.org

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Marc Espie-2
In reply to this post by J.C. Roberts-3
On Sun, Jul 11, 2010 at 09:25:44AM -0700, J.C. Roberts wrote:
> On Tue, 06 Jul 2010 11:26:42 +0100 Tom Murphy <[hidden email]>
> wrote:
> >
> > This error does not occur in 4.7-release. Has there been something up
> > with the Perl packages in -current lately?
>
> Marc Espie (espie@) has been doing tons and tons of work on the ports
> system. The packages in question are actually parts of the ports system.

Not that kind of change. Looks like an installation issue to me.
Especially since /usr/libdata/perl5/Carp/Heavy.pm is still in base.

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Philip Guenther-2
In reply to this post by Tom Murphy-7
On Tue, Jul 6, 2010 at 3:26 AM, Tom Murphy <[hidden email]> wrote:

> I'm running the June 20 2010 snapshot on a webserver and was attempting
> to get Blogsum
> up and running, but I get this error in the log:
>
> [Tue Jul  6 11:21:47 2010] [error] PerlRun: `Can't locate Carp/Heavy.pm
> in @INC (@INC contains:
> /usr/local/lib/perl5/site_perl/5.10.1/i386-openbsd
> /usr/libdata/perl5/i386-openbsd/5.10.1
> /usr/local/libdata/perl5/i386-openbsd/5.10.1 /usr/libdata/perl5
> /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd
> /usr/libdata/perl5/site_perl/i386-openbsd
> /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl .
> /var/www/ /var/www/lib/perl) at /usr/libdata/perl5/Carp.pm line 39.\n'
>
> I've tried non-chrooting the web server and the message does not change.
> I've checked the file and it does exist and is there. If I run perl on
> the command-line, it can see that file just fine. The @INC includes the
> file in its paths.

When in doubt, use a bigger hammer.  You could try using 'ktrace' on
the web server (probably with the -i option) to see exactly what is
happening when perl tries to open the Carp/Heavy.pm file.


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Tom Murphy-7
On Sun, Jul 11, 2010 at 06:27:41PM -0700, Philip Guenther wrote:
> When in doubt, use a bigger hammer.  You could try using 'ktrace' on
> the web server (probably with the -i option) to see exactly what is
> happening when perl tries to open the Carp/Heavy.pm file.
>
>
> Philip Guenther

Hi Philip,

  ktrace produces a rather large (6M) kdump file. I checked all the paths
below and the only place the file exists is at
/usr/libdata/perl5/Carp/Heavy.pm. The permissions on the file are root:wheel
and 0444, so it should be readable by anyone. I am not sure why it can't
find this file at all. It seems to find Exporter/Heavy.pm further up in the
trace. Copying that file to one of the other places doesn't help.

  Here are the relevant bits from the trace:

  2037 httpd    CALL  stat(0x8325d900,0xcfbdac90)
  2037 httpd    NAMI  "/usr/local/lib/perl5/site_perl/5.10.1/i386-openbsd/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/local/lib/perl5/site_perl/5.10.1/i386-openbsd/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f180,0xcfbdac90)
  2037 httpd    NAMI  "/usr/libdata/perl5/i386-openbsd/5.10.1/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/libdata/perl5/i386-openbsd/5.10.1/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f780,0xcfbdac90)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/i386-openbsd/5.10.1/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/i386-openbsd/5.10.1/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f480,0xcfbdac90)
  2037 httpd    NAMI  "/usr/libdata/perl5/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/libdata/perl5/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f080,0xcfbdac90)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f7c0,0xcfbdac90)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/site_perl/i386-openbsd/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/site_perl/i386-openbsd/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f580,0xcfbdac90)
  2037 httpd    NAMI  "/usr/libdata/perl5/site_perl/i386-openbsd/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/libdata/perl5/site_perl/i386-openbsd/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f540,0xcfbdac90)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/site_perl/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/local/libdata/perl5/site_perl/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f280,0xcfbdac90)
  2037 httpd    NAMI  "/usr/libdata/perl5/site_perl/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/usr/libdata/perl5/site_perl/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x88596f60,0xcfbdac90)
  2037 httpd    NAMI  "./Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "./Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x88596fa0,0xcfbdac90)
  2037 httpd    NAMI  "/var/www//Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/var/www//Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325f580,0xcfbdac90)
  2037 httpd    NAMI  "/var/www/lib/perl/Carp/Heavy.pmc"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  stat(0x8325d280,0xcfbdabf0)
  2037 httpd    NAMI  "/var/www/lib/perl/Carp/Heavy.pm"
  2037 httpd    RET   stat -1 errno 2 No such file or directory
  2037 httpd    CALL  gettimeofday(0xcfbd6c48,0)
 2037 httpd    RET   gettimeofday 0
  2037 httpd    CALL  fstat(0x12,0xcfbd6b10)
  2037 httpd    RET   fstat 0
  2037 httpd    CALL  mprotect(0x819b3000,0x1000,0x3)
  2037 httpd    RET   mprotect 0
  2037 httpd    CALL  mprotect(0x819b3000,0x1000,0x1)
  2037 httpd    RET   mprotect 0
  2037 httpd    CALL  write(0x12,0x8a23f000,0x1f6)
  2037 httpd    GIO   fd 18 wrote 502 bytes
       "[Tue Jul 20 13:10:55 2010] [error] PerlRun: `Can't locate Carp/Heavy.p\
        m in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.10.1/i386-o\
        penbsd /usr/libdata/perl5/i386-openbsd/5.10.1 /usr/local/libdata/perl5\
        /i386-openbsd/5.10.1 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/\
        local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_per\
        l/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/s\
        ite_perl . /var/www/ /var/www/lib/perl) at /usr/libdata/perl5/Carp.pm \
        line 39.\\n'
       "

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Philip Guenther-2
On Tue, Jul 20, 2010 at 5:27 AM, Tom Murphy <[hidden email]> wrote:
> On Sun, Jul 11, 2010 at 06:27:41PM -0700, Philip Guenther wrote:
>> When in doubt, use a bigger hammer.  You could try using 'ktrace' on
>> the web server (probably with the -i option) to see exactly what is
>> happening when perl tries to open the Carp/Heavy.pm file.
>
>  ktrace produces a rather large (6M) kdump file. I checked all the paths
> below and the only place the file exists is at
> /usr/libdata/perl5/Carp/Heavy.pm. The permissions on the file are
root:wheel
> and 0444, so it should be readable by anyone. I am not sure why it can't
> find this file at all.

I think I was a bit misleading in my suggestion.  I think you should
scan the *entire* kdump output to see if it's calling chroot(), for
example, which will completely screw the lazy-loading used by Carp.pm
for Carp/Heavy.pm.

...
>  2037 httpd    CALL  stat(0x8325f480,0xcfbdac90)
>  2037 httpd    NAMI  "/usr/libdata/perl5/Carp/Heavy.pmc"
>  2037 httpd    RET   stat -1 errno 2 No such file or directory

You confirm that that file exists when you check with the normal root
directory, which suggests the process is running with some other root
directory when it is doing the above, no?


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Tom Murphy-7
On Tue, Jul 20, 2010 at 07:01:20PM -0700, Philip Guenther wrote:

> I think I was a bit misleading in my suggestion.  I think you should
> scan the *entire* kdump output to see if it's calling chroot(), for
> example, which will completely screw the lazy-loading used by Carp.pm
> for Carp/Heavy.pm.
>
> ...
> >  2037 httpd    CALL  stat(0x8325f480,0xcfbdac90)
> >  2037 httpd    NAMI  "/usr/libdata/perl5/Carp/Heavy.pmc"
> >  2037 httpd    RET   stat -1 errno 2 No such file or directory
>
> You confirm that that file exists when you check with the normal root
> directory, which suggests the process is running with some other root
> directory when it is doing the above, no?
>
>
> Philip Guenther

Hi Philip,

  Looking at the line numbering. chroot is called at line 153297 which
is after Exporter/Heavy.pm is read (line 13180) but Carp/Heavy.pm isn't
looked for until line 155196. So the chroot is taking place in between
those times.

  I have tried running apache without chroot, but I get the same error.
I wonder if there is something wrong with mod_perl itself?

  Tom

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Philip Guenther-2
On Wed, Jul 21, 2010 at 6:48 AM, Tom Murphy <[hidden email]> wrote:
>  Looking at the line numbering. chroot is called at line 153297 which
> is after Exporter/Heavy.pm is read (line 13180) but Carp/Heavy.pm isn't
> looked for until line 155196. So the chroot is taking place in between
> those times.
>
>  I have tried running apache without chroot, but I get the same error.
> I wonder if there is something wrong with mod_perl itself?

Sounds like it.  Have you checked the release notes/change log for
versions of mod_perl after the one included in OpenBSD?  Is there a
newer version in ports (though it would probably require a different
apache too)?  If so, have you tried that one?


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: Perl problems in -current

Tom Murphy-7
On Wed, Jul 21, 2010 at 09:32:50PM -0700, Philip Guenther wrote:
> Sounds like it.  Have you checked the release notes/change log for
> versions of mod_perl after the one included in OpenBSD?  Is there a
> newer version in ports (though it would probably require a different
> apache too)?  If so, have you tried that one?
>
>
> Philip Guenther

Well, updating to latest snapshot and pkg_add -u -D update -D updatedepends
seems to have fixed it. Quite possibly there was an issue in base that was
resolved. Anyway, it all works now, thankfully!

Tom