You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Robert Friberg <ro...@ensofus.se> on 2003/10/26 09:18:09 UTC

[Config] Upgrading, Need stable setup

Hi all,

I'm running a lot of mod_perl handlers on a
rather old Red Hat Linux, RH 6.0 on intel. Everything has
been working fine until now.

Server: Apache/1.3.6 (Unix)  (Red Hat/Linux) mod_perl/1.21
perl -V output appended at the bottom

I have created a handler for embedded perl. Pages with a
.pxp extension are parsed and wrapped in an anonymous sub,
eval'd and cached. The Apache::Request object is passed as
an arg to the sub on invocation.

Besides some occasional and seemingly random segfaults
the testsites are running fine. Surely there are a few
bugs in my code but I think its time to upgrade anyways,
maybe then the seggies will disappear.

So to the question... Are there any known issues with
Redhat 8.0 which ships with perl 5.8.0, httpd 2.0.40
and mod_perl 1.99? Or should I go for something else?


mvh,
#---------------------------------------------------
#  Robert Friberg     perl,java,xml,uml,sql,delphi,
#  Systemutvecklare   c/c++,vb,php,linux,apache
#  0733-839080
#
#  Ensofus AB         linuxservrar,serverhosting,
#  www.ensofus.se     internetsystem, Miljö Online
#---------------------------------------------------

[rofr@uno rofr]$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.1-ac1, archname=i386-linux
    uname='linux porky.devel.redhat.com 2.2.1-ac1 #1 smp mon feb 1 17:44:44
est 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Apr  6 1999 23:34:07
  @INC:
    /usr/lib/perl5/5.00503/i386-linux
    /usr/lib/perl5/5.00503
    /usr/lib/perl5/site_perl/5.005/i386-linux
    /usr/lib/perl5/site_perl/5.005


Re: [Summary] [Config] Upgrading, Need stable setup

Posted by Stas Bekman <st...@stason.org>.
Robert Friberg wrote:
> 
>>Without seeing the backtrace I can't tell whether it's a bug in 
>>Apache::Request or Perl.
> 
> 
> And either way, the bug report should go to perl5-porters list?

Only if it's a bug in perl, and not Apache::Request. Post the backtrace here 
and we will be able to tell.

__________________________________________________________________
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: anchor tag

Posted by Matthew Westcott <ma...@torchbox.com>.
On 30 Oct 2003 at 1:24, martin moss wrote:

> Heyho,
> 
> If I have a url of http://some.domain.com/test/index.html#test
> 
> When I do a $r->uri I ge the url path /test/index.html
> and $r->path_info is blank.
> 
> How do I get the #test anchor bit on the end of the url?

You can't, unfortunately - the anchor part of the URL is never seen 
by the server at all.

- Matthew


anchor tag

Posted by martin moss <ma...@blueyonder.co.uk>.
Heyho,

If I have a url of http://some.domain.com/test/index.html#test

When I do a $r->uri I ge the url path /test/index.html
and $r->path_info is blank.

How do I get the #test anchor bit on the end of the url?

Regards

Marty



RE: [Summary] [Config] Upgrading, Need stable setup

Posted by Robert Friberg <ro...@ensofus.se>.
Oops, sorry. The answer was in your message.

mvh,
#---------------------------------------------------
#  Robert Friberg     perl,java,xml,uml,sql,delphi,
#  Systemutvecklare   c/c++,vb,php,linux,apache
#  0733-839080
#
#  Ensofus AB         linuxservrar,serverhosting,
#  www.ensofus.se     internetsystem, Miljo Online
#--------------------------------------------------- 


RE: [Summary] [Config] Upgrading, Need stable setup

Posted by Robert Friberg <ro...@ensofus.se>.

> Without seeing the backtrace I can't tell whether it's a bug in 
> Apache::Request or Perl.

And either way, the bug report should go to perl5-porters list?

mvh,
#---------------------------------------------------
#  Robert Friberg     perl,java,xml,uml,sql,delphi,
#  Systemutvecklare   c/c++,vb,php,linux,apache
#  0733-839080
#
#  Ensofus AB         linuxservrar,serverhosting,
#  www.ensofus.se     internetsystem, Miljo Online
#--------------------------------------------------- 

> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org]
> Sent: Tuesday, October 28, 2003 11:55 PM
> To: Robert Friberg
> Cc: modperl@perl.apache.org
> Subject: Re: [Summary] [Config] Upgrading, Need stable setup
> 
> 
> Robert Friberg wrote:
> > Stas Bekman wrote:
> > 
> >>It's probably a good idea to report those segfaults to the 
> >>perl5-porters list.
> > 
> > 
> > Please excuse my ignorance but I would have thought the offensive 
> > code was anywhere *except* in the perl interpreter. I was calling 
> > methods on an invalid Apache::Request object. Isn't perl just 
> > passing a bad memory reference?
> 
> Well, pure Perl code should *never* segfault, no matter how badly 
> the program 
> is written. If it does it's a bug in Perl.
> 
> This is not the case with programs using XS modules. If you get a 
> segfault 
> inside the module's XS code, it's a bug in that code and should 
> be reported to 
> the author of that module.
> 
> When you get a segfault you need to get the backtrace as explained at 
> perl.apache.org and look whether it happens in perl or the XS 
> module, which 
> will tell you where to report the bug.
> 
> Without seeing the backtrace I can't tell whether it's a bug in 
> Apache::Request or Perl.
> 
> 
> __________________________________________________________________
> 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: [Summary] [Config] Upgrading, Need stable setup

Posted by Stas Bekman <st...@stason.org>.
Robert Friberg wrote:
> Stas Bekman wrote:
> 
>>It's probably a good idea to report those segfaults to the 
>>perl5-porters list.
> 
> 
> Please excuse my ignorance but I would have thought the offensive 
> code was anywhere *except* in the perl interpreter. I was calling 
> methods on an invalid Apache::Request object. Isn't perl just 
> passing a bad memory reference?

Well, pure Perl code should *never* segfault, no matter how badly the program 
is written. If it does it's a bug in Perl.

This is not the case with programs using XS modules. If you get a segfault 
inside the module's XS code, it's a bug in that code and should be reported to 
the author of that module.

When you get a segfault you need to get the backtrace as explained at 
perl.apache.org and look whether it happens in perl or the XS module, which 
will tell you where to report the bug.

Without seeing the backtrace I can't tell whether it's a bug in 
Apache::Request or Perl.


__________________________________________________________________
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: [Summary] [Config] Upgrading, Need stable setup

Posted by Robert Friberg <ro...@ensofus.se>.
Stas Bekman wrote:
> It's probably a good idea to report those segfaults to the 
> perl5-porters list.

Please excuse my ignorance but I would have thought the offensive 
code was anywhere *except* in the perl interpreter. I was calling 
methods on an invalid Apache::Request object. Isn't perl just 
passing a bad memory reference?

mvh,
#---------------------------------------------------
#  Robert Friberg     perl,java,xml,uml,sql,delphi,
#  Systemutvecklare   c/c++,vb,php,linux,apache
#  0733-839080
#
#  Ensofus AB         linuxservrar,serverhosting,
#  www.ensofus.se     internetsystem, Miljo Online
#--------------------------------------------------- 

> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org]
> Sent: Tuesday, October 28, 2003 7:18 PM
> To: Robert Friberg
> Cc: modperl@perl.apache.org
> Subject: Re: [Summary] [Config] Upgrading, Need stable setup
> 
> 
> Robert Friberg wrote:
> > Hello All,
> > 
> > Thanks for all the replies. I spent a few hours
> > yesterday installing RH9 on a new box, upgrading
> > perl to 5.8.1, installing apache 1.3.28 and modperl
> > 1.29 from source. No problems at all, just followed
> > the instructions at
> > 
> >    http://perl.apache.org/docs/1.0/guide/install.html
> > 
> > I still got the segfaults though, but I have resolved
> > that issue now. I had an inner sub with a reference
> > to the Apache::Request object. Ouch.
> 
> It's probably a good idea to report those segfaults to the 
> perl5-porters list. 
> Perl shouldn't segfault when something is wrong, but die with an 
> error message.
> __________________________________________________________________
> 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: [Summary] [Config] Upgrading, Need stable setup

Posted by Stas Bekman <st...@stason.org>.
Robert Friberg wrote:
> Hello All,
> 
> Thanks for all the replies. I spent a few hours
> yesterday installing RH9 on a new box, upgrading
> perl to 5.8.1, installing apache 1.3.28 and modperl
> 1.29 from source. No problems at all, just followed
> the instructions at
> 
>    http://perl.apache.org/docs/1.0/guide/install.html
> 
> I still got the segfaults though, but I have resolved
> that issue now. I had an inner sub with a reference
> to the Apache::Request object. Ouch.

It's probably a good idea to report those segfaults to the perl5-porters list. 
Perl shouldn't segfault when something is wrong, but die with an error message.
__________________________________________________________________
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


[Summary] [Config] Upgrading, Need stable setup

Posted by Robert Friberg <ro...@ensofus.se>.
Hello All,

Thanks for all the replies. I spent a few hours
yesterday installing RH9 on a new box, upgrading
perl to 5.8.1, installing apache 1.3.28 and modperl
1.29 from source. No problems at all, just followed
the instructions at

   http://perl.apache.org/docs/1.0/guide/install.html

I still got the segfaults though, but I have resolved
that issue now. I had an inner sub with a reference
to the Apache::Request object. Ouch.


mvh,
#---------------------------------------------------
#  Robert Friberg     perl,java,xml,uml,sql,delphi,
#  Systemutvecklare   c/c++,vb,php,linux,apache
#  0733-839080
#
#  Ensofus AB         linuxservrar,serverhosting,
#  www.ensofus.se     internetsystem, Miljo Online
#--------------------------------------------------- 


Re: [Config] Upgrading, Need stable setup

Posted by John Day <jo...@wordsnimages.com>.
At 08:41 AM 10/26/2003 +0000, Ged Haywood wrote:
>Hi there,
>
>On Sun, 26 Oct 2003, Robert Friberg wrote:
>
>> rather old Red Hat Linux, RH 6.0 on intel.
>> [snip]
>> Apache/1.3.6 (Unix)  (Red Hat/Linux) mod_perl/1.21
>
>Ouch.  They do need upgrading.
>
>> Besides some occasional and seemingly random segfaults
>> the testsites are running fine.
>
>"Segfaults" and "fine" should not be in the same sentence.
>I haven't had a segfault in production for several years.
>
>> Surely there are a few bugs in my code but I think its time to
>> upgrade anyways, maybe then the seggies will disappear.
>
>It's possible.
>
>> Are there any known issues with Redhat 8.0 which ships with perl
>> 5.8.0, httpd 2.0.40 and mod_perl 1.99?
>
>Yes.  It's been discussed a lot here recently, check the archives.
>
>I'd recommend Apache 1.3.28 + mod_perl 1.29.  The mod_perl 1.99 which
>ships with RedHat is out of date and IMHO should not be used at all.
>Version 2 of mod_perl is still experimental, if you're prepared for a
>time of relative instability it might be the way to go but I wouldn't
>put it on a production server.
>
>I'm still using Perl 5.005_03 in production, but there are those who
>would say I'm an old stick-in-the-mud.  You shouldn't have any problems
>with 5.8.1 and even 5.8.0 should be OK if you check the archives to see
>the experiences that other people have had, particularly with locale.
>
>I've used 5.8.0 on development machines for a while with no problems
>but my development boxes are a real motley bunch of homegrown systems
>so that's really nothing to go by if you're stuck with RedHat.
>
>HTH
>
>73,
>Ged.


Hi,

The only comment I would have is that RH8.0 is not a good configuration "out of the box". The Perl installed is 5.8.0 which has issues with Unicode and made installing some modules impossible. My development machine, installed only last week, is RH8.0, Perl 5.8.1, Apache 1.3.28 and mod_perl 1.28 which I was able to get working quite satisfactorily in the end.

I had trouble with some of the RPM's, so in the end I compiled everything from source, took a while, but it all worked the way it should whereas the binary distributions didn't.

John



Re: [Config] Upgrading, Need stable setup

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On Sun, 26 Oct 2003, Robert Friberg wrote:

> rather old Red Hat Linux, RH 6.0 on intel.
> [snip]
> Apache/1.3.6 (Unix)  (Red Hat/Linux) mod_perl/1.21

Ouch.  They do need upgrading.

> Besides some occasional and seemingly random segfaults
> the testsites are running fine.

"Segfaults" and "fine" should not be in the same sentence.
I haven't had a segfault in production for several years.

> Surely there are a few bugs in my code but I think its time to
> upgrade anyways, maybe then the seggies will disappear.

It's possible.

> Are there any known issues with Redhat 8.0 which ships with perl
> 5.8.0, httpd 2.0.40 and mod_perl 1.99?

Yes.  It's been discussed a lot here recently, check the archives.

I'd recommend Apache 1.3.28 + mod_perl 1.29.  The mod_perl 1.99 which
ships with RedHat is out of date and IMHO should not be used at all.
Version 2 of mod_perl is still experimental, if you're prepared for a
time of relative instability it might be the way to go but I wouldn't
put it on a production server.

I'm still using Perl 5.005_03 in production, but there are those who
would say I'm an old stick-in-the-mud.  You shouldn't have any problems
with 5.8.1 and even 5.8.0 should be OK if you check the archives to see
the experiences that other people have had, particularly with locale.

I've used 5.8.0 on development machines for a while with no problems
but my development boxes are a real motley bunch of homegrown systems
so that's really nothing to go by if you're stuck with RedHat.

HTH

73,
Ged.