You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@cpan.org> on 2003/06/04 11:08:48 UTC
[mp1] Segfautl with constant handlers and perl 5.6.x
I've narrowed down a strange bug I reported a while back.
Seems that using constant for Perl* directives doesn't quite work for
perl 5.6.1 and 5.6.x
<Location /segv>
PerlModule Apache::Constants
SetHandler perl-script
PerlHandler Apache::OK
</Location>
#0 0x0816df79 in ?? ()
#1 0x400a38c7 in S_call_body (myop=0xbffff240, is_eval=0) at perl.c:1821
#2 0x400a3514 in perl_call_sv (sv=0x85f12c0, flags=4) at perl.c:1742
#3 0x08070b19 in perl_call_handler (sv=0x85f12c0, r=0x86eb964, args=0x0) at mod_perl.c:1661
#4 0x0807004f in perl_run_stacked_handlers (hook=0x80c8527 "PerlHandler", r=0x86eb964, handlers=0x8612760) at mod_perl.c:1374
#5 0x0806da98 in perl_handler (r=0x86eb964) at mod_perl.c:897
#6 0x080984af in ap_invoke_handler (r=0x86eb964) at http_config.c:518
#7 0x080aca34 in process_request_internal (r=0x86eb964) at http_request.c:1310
#8 0x080aca93 in ap_process_request (r=0x86eb964) at http_request.c:1326
#9 0x080a3d52 in child_main (child_num_arg=0) at http_main.c:4653
#10 0x080a3ef2 in make_child (s=0x80e6de4, slot=0, now=1054716897) at http_main.c:4768
#11 0x080a4058 in startup_children (number_to_start=5) at http_main.c:4850
#12 0x080a46f5 in standalone_main (argc=6, argv=0xbffff5b4) at http_main.c:5169
#13 0x080a4f13 in main (argc=6, argv=0xbffff5b4) at http_main.c:5511
> svpeek(0x85f12c0)
PV("Apache::OK"\0)
and the op being called is quite bogus indeed
> display (*myop)
*myop = {
op_next = 0x0,
op_sibling = 0x0,
op_ppaddr = 0,
op_targ = 0,
op_type = 0,
op_seq = 0,
op_flags = 66 'B' (OPf_STACKED|OPf_WANT_SCALAR),
op_private = 0 '\0'
}
And I get this error on the following availble perls:
Perl-5.6.x@19034:
5.6.x/devel
5.6.x/devel-perlio
5.6.x/devel-perlio-shrplib
5.6.x/devel-perlio-shrplib-threads
5.6.x/devel-perlio-threads
5.6.x/devel-shrplib
5.6.x/devel-shrplib-threads
5.6.x/devel-threads
5.6.x/perlio
5.6.x/perlio-shrplib
5.6.x/perlio-shrplib-threads
5.6.x/perlio-threads
5.6.x/shrplib
5.6.x/shrplib-threads
5.6.x/threads
And Perl 5.6.1 vanilla
5.6.1/perlio
5.6.1/perlio-shrplib
5.6.1/perlio-shrplib-threads
5.6.1/perlio-threads
5.6.1/shrplib
5.6.1/shrplib-threads
5.6.1/threads
Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
that Apache::OK isn't a plain sub but a constant, but ???
Gozer out.
--
-- -----------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Mon, 2003-06-09 at 12:14, Stas Bekman wrote:
>
>>Philippe M. Chiasson wrote:
>>[...]
>>
>>>>>Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
>>>>>that Apache::OK isn't a plain sub but a constant, but ???
>>>>
>>>>I have tried these two:
>>>>
>>>> <Location /foo>
>>>> SetHandler perl-script
>>>> PerlFixupHandler Apache::DECLINED
>>>> PerlHandler +Foo
>>>> </Location>
>>>>
>>>><Location /segv>
>>>> PerlModule Apache::Constants
>>>> SetHandler perl-script
>>>> PerlHandler Apache::OK
>>>></Location>
>>>>
>>>>Both "work" (no segfault). Want me to try with another perl?
>>>
>>>
>>>Now, that is wierd. I've copy-pasted your 2 example and they both segv
>>>the same way, and my perl is just like yours... I am starting to think
>>>that there must be something strange about me, not you all ;-S
>>
>>Have you tried taking a shower? ;)
>
>
> Well, you know what? I just did that, came back all clean, and figured
> out I would take the time to _really_ track this bugger down.
>
> Cleaned up all my src, cvs co'ed all afresh and started with the
> simplest build script and configuration.
>
> Guess what? It's gone. I am running all my smokes right now, and nothing
> breaks anymore?
Cool!
> There was somethign funny about my setup, but it's gone now and I can't
> figure out what it might have been...
>
> "The truth is out there!"
More like :
perl -le 'print "I will take a shower more than once a week" while (1)'
;)
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Mon, 2003-06-09 at 12:14, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> [...]
> >>>Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
> >>>that Apache::OK isn't a plain sub but a constant, but ???
> >>
> >>I have tried these two:
> >>
> >> <Location /foo>
> >> SetHandler perl-script
> >> PerlFixupHandler Apache::DECLINED
> >> PerlHandler +Foo
> >> </Location>
> >>
> >><Location /segv>
> >> PerlModule Apache::Constants
> >> SetHandler perl-script
> >> PerlHandler Apache::OK
> >></Location>
> >>
> >>Both "work" (no segfault). Want me to try with another perl?
> >
> >
> > Now, that is wierd. I've copy-pasted your 2 example and they both segv
> > the same way, and my perl is just like yours... I am starting to think
> > that there must be something strange about me, not you all ;-S
>
> Have you tried taking a shower? ;)
Well, you know what? I just did that, came back all clean, and figured
out I would take the time to _really_ track this bugger down.
Cleaned up all my src, cvs co'ed all afresh and started with the
simplest build script and configuration.
Guess what? It's gone. I am running all my smokes right now, and nothing
breaks anymore?
There was somethign funny about my setup, but it's gone now and I can't
figure out what it might have been...
"The truth is out there!"
> > Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
> > Platform:
> > osname=linux, osvers=2.4.20, archname=i686-linux-thread-multi
> > uname='linux shou.sg.ectoplasm.org 2.4.20 #4 smp sat apr 12 20:16:56 sgt 2003 i686 athlon i386 gnulinux '
> > config_args='-des -Dprefix=/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads -Doptimize='-g' -Duseshrplib -Dusethreads'
> > hint=recommended, useposix=true, d_sigaction=define
> > usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
> > useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
> > use64bitint=undef use64bitall=undef uselongdouble=undef
> > Compiler:
> > cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> > optimize='-g',
> > cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
> > ccversion='', gccversion='3.2.3 20030422 (Red Hat Linux 3.2.3-4)', gccosandvers=''
> > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
> > 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 -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
> > perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
> > libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
> > Dynamic Linking:
> > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads/lib/5.6.1/i686-linux-thread-multi/CORE'
> > cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
> We have a different libc, though mine reports a wrong library. it reports the
> lib it was compiled with libc=/lib/libc-2.2.5.so. However
>
> % ldd ~/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi/CORE/libperl.so
> libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> /home/stas/bios> l /lib/i686/libc.so.6
> lrwxrwxrwx 1 root root 13 Jan 24 09:23 /lib/i686/lib
> c.so.6 -> libc-2.3.1.so*
>
> so I'm running 2.3.1 and you 2.3.2 (maybe, check the real version with ldd).
> And that could make the difference.
>
> Also, try to use an empty/minimal httpd.conf when you test this segfault
>
> __________________________________________________________________
> 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
--
-- -----------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
[...]
>>>Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
>>>that Apache::OK isn't a plain sub but a constant, but ???
>>
>>I have tried these two:
>>
>> <Location /foo>
>> SetHandler perl-script
>> PerlFixupHandler Apache::DECLINED
>> PerlHandler +Foo
>> </Location>
>>
>><Location /segv>
>> PerlModule Apache::Constants
>> SetHandler perl-script
>> PerlHandler Apache::OK
>></Location>
>>
>>Both "work" (no segfault). Want me to try with another perl?
>
>
> Now, that is wierd. I've copy-pasted your 2 example and they both segv
> the same way, and my perl is just like yours... I am starting to think
> that there must be something strange about me, not you all ;-S
Have you tried taking a shower? ;)
> Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
> Platform:
> osname=linux, osvers=2.4.20, archname=i686-linux-thread-multi
> uname='linux shou.sg.ectoplasm.org 2.4.20 #4 smp sat apr 12 20:16:56 sgt 2003 i686 athlon i386 gnulinux '
> config_args='-des -Dprefix=/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads -Doptimize='-g' -Duseshrplib -Dusethreads'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
> useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> Compiler:
> cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-g',
> cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
> ccversion='', gccversion='3.2.3 20030422 (Red Hat Linux 3.2.3-4)', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
> 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 -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
> perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
> libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads/lib/5.6.1/i686-linux-thread-multi/CORE'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
We have a different libc, though mine reports a wrong library. it reports the
lib it was compiled with libc=/lib/libc-2.2.5.so. However
% ldd ~/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi/CORE/libperl.so
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
/home/stas/bios> l /lib/i686/libc.so.6
lrwxrwxrwx 1 root root 13 Jan 24 09:23 /lib/i686/lib
c.so.6 -> libc-2.3.1.so*
so I'm running 2.3.1 and you 2.3.2 (maybe, check the real version with ldd).
And that could make the difference.
Also, try to use an empty/minimal httpd.conf when you test this segfault
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Sat, 2003-06-07 at 07:52, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> > I've narrowed down a strange bug I reported a while back.
> >
> > Seems that using constant for Perl* directives doesn't quite work for
> > perl 5.6.1 and 5.6.x
> >
> > <Location /segv>
> > PerlModule Apache::Constants
> > SetHandler perl-script
> > PerlHandler Apache::OK
> > </Location>
> >
> > #0 0x0816df79 in ?? ()
> > #1 0x400a38c7 in S_call_body (myop=0xbffff240, is_eval=0) at perl.c:1821
> > #2 0x400a3514 in perl_call_sv (sv=0x85f12c0, flags=4) at perl.c:1742
> > #3 0x08070b19 in perl_call_handler (sv=0x85f12c0, r=0x86eb964, args=0x0) at mod_perl.c:1661
> > #4 0x0807004f in perl_run_stacked_handlers (hook=0x80c8527 "PerlHandler", r=0x86eb964, handlers=0x8612760) at mod_perl.c:1374
> > #5 0x0806da98 in perl_handler (r=0x86eb964) at mod_perl.c:897
> > #6 0x080984af in ap_invoke_handler (r=0x86eb964) at http_config.c:518
> > #7 0x080aca34 in process_request_internal (r=0x86eb964) at http_request.c:1310
> > #8 0x080aca93 in ap_process_request (r=0x86eb964) at http_request.c:1326
> > #9 0x080a3d52 in child_main (child_num_arg=0) at http_main.c:4653
> > #10 0x080a3ef2 in make_child (s=0x80e6de4, slot=0, now=1054716897) at http_main.c:4768
> > #11 0x080a4058 in startup_children (number_to_start=5) at http_main.c:4850
> > #12 0x080a46f5 in standalone_main (argc=6, argv=0xbffff5b4) at http_main.c:5169
> > #13 0x080a4f13 in main (argc=6, argv=0xbffff5b4) at http_main.c:5511
> >
> >
> >>svpeek(0x85f12c0)
> >
> > PV("Apache::OK"\0)
> >
> > and the op being called is quite bogus indeed
> >
> >>display (*myop)
> >
> > *myop = {
> > op_next = 0x0,
> > op_sibling = 0x0,
> > op_ppaddr = 0,
> > op_targ = 0,
> > op_type = 0,
> > op_seq = 0,
> > op_flags = 66 'B' (OPf_STACKED|OPf_WANT_SCALAR),
> > op_private = 0 '\0'
> > }
> >
> > And I get this error on the following availble perls:
> >
> > Perl-5.6.x@19034:
> > 5.6.x/devel
> > 5.6.x/devel-perlio
> > 5.6.x/devel-perlio-shrplib
> > 5.6.x/devel-perlio-shrplib-threads
> > 5.6.x/devel-perlio-threads
> > 5.6.x/devel-shrplib
> > 5.6.x/devel-shrplib-threads
> > 5.6.x/devel-threads
> > 5.6.x/perlio
> > 5.6.x/perlio-shrplib
> > 5.6.x/perlio-shrplib-threads
> > 5.6.x/perlio-threads
> > 5.6.x/shrplib
> > 5.6.x/shrplib-threads
> > 5.6.x/threads
> >
> > And Perl 5.6.1 vanilla
> > 5.6.1/perlio
> > 5.6.1/perlio-shrplib
> > 5.6.1/perlio-shrplib-threads
> > 5.6.1/perlio-threads
> > 5.6.1/shrplib
> > 5.6.1/shrplib-threads
> > 5.6.1/threads
> >
> >
> > Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
> > that Apache::OK isn't a plain sub but a constant, but ???
>
> I have tried these two:
>
> <Location /foo>
> SetHandler perl-script
> PerlFixupHandler Apache::DECLINED
> PerlHandler +Foo
> </Location>
>
> <Location /segv>
> PerlModule Apache::Constants
> SetHandler perl-script
> PerlHandler Apache::OK
> </Location>
>
> Both "work" (no segfault). Want me to try with another perl?
Now, that is wierd. I've copy-pasted your 2 example and they both segv
the same way, and my perl is just like yours... I am starting to think
that there must be something strange about me, not you all ;-S
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.20, archname=i686-linux-thread-multi
uname='linux shou.sg.ectoplasm.org 2.4.20 #4 smp sat apr 12 20:16:56 sgt 2003 i686 athlon i386 gnulinux '
config_args='-des -Dprefix=/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads -Doptimize='-g' -Duseshrplib -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.2.3 20030422 (Red Hat Linux 3.2.3-4)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
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 -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/home/gozer/opt/perl/i386-linux/5.6.1/shrplib-threads/lib/5.6.1/i686-linux-thread-multi/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
> Platform:
> osname=linux, osvers=2.4.19-16mdksmp, archname=i686-linux-thread-multi
> uname='linux hope.stason.org 2.4.19-16mdksmp #1 smp fri sep 20 16:08:37
> cest 2002 i686 unknown unknown gnulinux '
> config_args='-des -Dprefix=/home/stas/perl/5.6.1-ithread -Dusethreads
> -Doptimize=-g -Duseshrplib -Dusedevel'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=define use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> Compiler:
> cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-g',
> cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing'
> ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-1mdk)', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
> 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 -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
> perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
> libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
> -Wl,-rpath,/home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi/CORE'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
> PERL_IMPLICIT_CONTEXT
> Built under linux
> Compiled at Nov 29 2002 10:11:18
> @INC:
> /home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi
> /home/stas/perl/5.6.1-ithread/lib/5.6.1
> /home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1/i686-linux-thread-multi
> /home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1
> /home/stas/perl/5.6.1-ithread/lib/site_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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
--
-- -----------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> I've narrowed down a strange bug I reported a while back.
>
> Seems that using constant for Perl* directives doesn't quite work for
> perl 5.6.1 and 5.6.x
>
> <Location /segv>
> PerlModule Apache::Constants
> SetHandler perl-script
> PerlHandler Apache::OK
> </Location>
>
> #0 0x0816df79 in ?? ()
> #1 0x400a38c7 in S_call_body (myop=0xbffff240, is_eval=0) at perl.c:1821
> #2 0x400a3514 in perl_call_sv (sv=0x85f12c0, flags=4) at perl.c:1742
> #3 0x08070b19 in perl_call_handler (sv=0x85f12c0, r=0x86eb964, args=0x0) at mod_perl.c:1661
> #4 0x0807004f in perl_run_stacked_handlers (hook=0x80c8527 "PerlHandler", r=0x86eb964, handlers=0x8612760) at mod_perl.c:1374
> #5 0x0806da98 in perl_handler (r=0x86eb964) at mod_perl.c:897
> #6 0x080984af in ap_invoke_handler (r=0x86eb964) at http_config.c:518
> #7 0x080aca34 in process_request_internal (r=0x86eb964) at http_request.c:1310
> #8 0x080aca93 in ap_process_request (r=0x86eb964) at http_request.c:1326
> #9 0x080a3d52 in child_main (child_num_arg=0) at http_main.c:4653
> #10 0x080a3ef2 in make_child (s=0x80e6de4, slot=0, now=1054716897) at http_main.c:4768
> #11 0x080a4058 in startup_children (number_to_start=5) at http_main.c:4850
> #12 0x080a46f5 in standalone_main (argc=6, argv=0xbffff5b4) at http_main.c:5169
> #13 0x080a4f13 in main (argc=6, argv=0xbffff5b4) at http_main.c:5511
>
>
>>svpeek(0x85f12c0)
>
> PV("Apache::OK"\0)
>
> and the op being called is quite bogus indeed
>
>>display (*myop)
>
> *myop = {
> op_next = 0x0,
> op_sibling = 0x0,
> op_ppaddr = 0,
> op_targ = 0,
> op_type = 0,
> op_seq = 0,
> op_flags = 66 'B' (OPf_STACKED|OPf_WANT_SCALAR),
> op_private = 0 '\0'
> }
>
> And I get this error on the following availble perls:
>
> Perl-5.6.x@19034:
> 5.6.x/devel
> 5.6.x/devel-perlio
> 5.6.x/devel-perlio-shrplib
> 5.6.x/devel-perlio-shrplib-threads
> 5.6.x/devel-perlio-threads
> 5.6.x/devel-shrplib
> 5.6.x/devel-shrplib-threads
> 5.6.x/devel-threads
> 5.6.x/perlio
> 5.6.x/perlio-shrplib
> 5.6.x/perlio-shrplib-threads
> 5.6.x/perlio-threads
> 5.6.x/shrplib
> 5.6.x/shrplib-threads
> 5.6.x/threads
>
> And Perl 5.6.1 vanilla
> 5.6.1/perlio
> 5.6.1/perlio-shrplib
> 5.6.1/perlio-shrplib-threads
> 5.6.1/perlio-threads
> 5.6.1/shrplib
> 5.6.1/shrplib-threads
> 5.6.1/threads
>
>
> Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do with the fact
> that Apache::OK isn't a plain sub but a constant, but ???
I have tried these two:
<Location /foo>
SetHandler perl-script
PerlFixupHandler Apache::DECLINED
PerlHandler +Foo
</Location>
<Location /segv>
PerlModule Apache::Constants
SetHandler perl-script
PerlHandler Apache::OK
</Location>
Both "work" (no segfault). Want me to try with another perl?
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.19-16mdksmp, archname=i686-linux-thread-multi
uname='linux hope.stason.org 2.4.19-16mdksmp #1 smp fri sep 20 16:08:37
cest 2002 i686 unknown unknown gnulinux '
config_args='-des -Dprefix=/home/stas/perl/5.6.1-ithread -Dusethreads
-Doptimize=-g -Duseshrplib -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing'
ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-1mdk)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
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 -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Nov 29 2002 10:11:18
@INC:
/home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi
/home/stas/perl/5.6.1-ithread/lib/5.6.1
/home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1/i686-linux-thread-multi
/home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1
/home/stas/perl/5.6.1-ithread/lib/site_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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> I've narrowed down a strange bug I reported a while back.
>
> Seems that using constant for Perl* directives doesn't quite work for
> perl 5.6.1 and 5.6.x
>
> <Location /segv>
> PerlModule Apache::Constants
> SetHandler perl-script
> PerlHandler Apache::OK
> </Location>
I don't think it's supposed to work. It should be:
PerlHandler Apache::Constants::OK
>>svpeek(0x85f12c0)
>
> PV("Apache::OK"\0)
and that's exactly what it is -- a string.
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org