You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Imago <im...@lockdownonline.com> on 2002/10/30 02:19:31 UTC
[mp2.0] Apache::SubProcess deFUNct sub-process
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
Apache::SubProcess does not appear to be 'fully' working.
When calling:
Apache::SubProcess::spawn_proc_prog($r,'/tmp/proc.pl');
Process tree looks like:
root 3239 /usr/local/apache2/bin/httpd
apache 3242 \_ /usr/local/apache2/bin/httpd
apache 3243 \_ /usr/local/apache2/bin/httpd
apache 3343 | \_ [proc.pl <defunct>]
apache 3244 \_ /usr/local/apache2/bin/httpd
- proc.pl is owned by 'apache' and is executable.
- simply creates a file '/tmp/ran.apache'.
- 'ran.apache' file never gets created.
2. Used Components and their Configuration:
*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_AP_PREFIX => /usr/local/apache2
MP_GENERATE_XS => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
MP_USE_STATIC => 1
*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.43
Server built: Oct 18 2002 14:36:03
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
06:41:59 edt 2002 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localho
st -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix
=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefi
les -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_sysl
og -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversionon
ly -Dpager=/usr/bin/less -isr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags
='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL
E_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdb
m'
ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
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, prototype=define
Linker and Libraries:
ld='gcc', 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.92.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.2.92'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Sep 1 2002 23:56:49
%ENV:
PERL_LWP_USE_HTTP_10="1"
@INC:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
.
3. Plea for sanity
This is the last compatibility hurdle for my apache/perl 1.0->2.0 project.
For the life of me, I just can't see what the problem is.
If more information is needed, don't hesitate to ask.
Any help would be greatly appreciated.
-------------8<---------- End Bug Report --------------8<----------
imago@lockdownonline.com
Re: [mp2.0] Apache::SubProcess deFUNct sub-process
Posted by Stas Bekman <st...@stason.org>.
Imago wrote:
> Apache::SubProcess does not appear to be 'fully' working.
This is quite possible. This module is a complete rewrite of the 1.x
version. I've added some basic tests, but if you can supply a test that
fails that'd be of a great help. Just remember that it should be as
short as possible. See t/response/TestApache/subprocess.pm which is run as:
t/TEST apache/subprocess
Thanks!
__________________________________________________________________
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: [mp2.0] Apache::SubProcess deFUNct sub-process
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
I've tried to reproduce your problem with no luck so far.
I am using a Registry script like this one:
use Apache::SubProcess;
print "Content-type: text/plain\n\n";
Apache::SubProcess::spawn_proc_prog(Apache->request,'/tmp/proc.pl');
print "ok";
And it works fine for me...
One thing worth trying is to try and figure out where proc.pl gets
stuck for you. You can try with strace -p pid, or better, gdb
/usr/bin/perl pid to get a backtrace of it.
Another piece of possibly usefull information would be how you
configured apache to run that script of yours ? ModPerl::Registry ?
PerlHandler ?
On Wed, 2002-10-30 at 09:57, Philippe M. Chiasson wrote:
> What does the output of mod_perl's make test look like, especially
> apache/subprocess ?
>
> What does your code that calls spawn_proc_prog() look like ?
>
> There is also a gotcha documented in the tests
> (./t/response/TestApache/subprocess.pm), look for read_data().
>
> On Wed, 2002-10-30 at 09:19, Imago wrote:
> > -------------8<---------- Start Bug Report ------------8<----------
> >
> > 1. Problem Description:
> >
> > Apache::SubProcess does not appear to be 'fully' working.
> >
> > When calling:
> >
> > Apache::SubProcess::spawn_proc_prog($r,'/tmp/proc.pl');
> >
> > Process tree looks like:
> >
> > root 3239 /usr/local/apache2/bin/httpd
> > apache 3242 \_ /usr/local/apache2/bin/httpd
> > apache 3243 \_ /usr/local/apache2/bin/httpd
> > apache 3343 | \_ [proc.pl <defunct>]
> > apache 3244 \_ /usr/local/apache2/bin/httpd
> >
> > - proc.pl is owned by 'apache' and is executable.
> > - simply creates a file '/tmp/ran.apache'.
> >
> > - 'ran.apache' file never gets created.
> >
> > 2. Used Components and their Configuration:
> >
> > *** using lib/Apache/BuildConfig.pm
> > *** Makefile.PL options:
> > MP_AP_PREFIX => /usr/local/apache2
> > MP_GENERATE_XS => 1
> > MP_LIBNAME => mod_perl
> > MP_USE_DSO => 1
> > MP_USE_STATIC => 1
> >
> >
> > *** /usr/local/apache2/bin/httpd -V
> > Server version: Apache/2.0.43
> > Server built: Oct 18 2002 14:36:03
> > Architecture: 32-bit
> > Server compiled with....
> > -D APACHE_MPM_DIR="server/mpm/prefork"
> > -D APR_HAS_SENDFILE
> > -D APR_HAS_MMAP
> > -D APR_HAVE_IPV6
> > -D APR_USE_SYSVSEM_SERIALIZE
> > -D APR_USE_PTHREAD_SERIALIZE
> > -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> > -D APR_HAS_OTHER_CHILD
> > -D AP_HAVE_RELIABLE_PIPED_LOGS
> > -D HTTPD_ROOT="/usr/local/apache2"
> > -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
> > -D DEFAULT_PIDLOG="logs/httpd.pid"
> > -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> > -D DEFAULT_LOCKFILE="logs/accept.lock"
> > -D DEFAULT_ERRORLOG="logs/error_log"
> > -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> > -D SERVER_CONFIG_FILE="conf/httpd.conf"
> >
> >
> > *** /usr/bin/perl -V
> > Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
> > Platform:
> > osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
> > uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
> > 06:41:59 edt 2002 i686 i686 i386 gnulinux '
> >
> >
> >
> >
> > config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localho
> > st -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
> > Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix
> > =/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefi
> > les -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_sysl
> > og -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversionon
> > ly -Dpager=/usr/bin/less -isr'
> > hint=recommended, useposix=true, d_sigaction=define
> > usethreads=define use5005threads=undef useithreads=define
> > usemultiplicity=define
> > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> > use64bitint=undef use64bitall=undef uselongdouble=undef
> > usemymalloc=n, bincompat5005=undef
> > Compiler:
> > cc='gcc', ccflags
> > ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL
> > E_OFFSET_BITS=64 -I/usr/include/gdbm',
> > optimize='-O2 -march=i386 -mcpu=i686',
> >
> >
> >
> >
> > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdb
> > m'
> > ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
> > 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, prototype=define
> > Linker and Libraries:
> > ld='gcc', 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.92.so, so=so, useshrplib=true, libperl=libperl.so
> > gnulibc_version='2.2.92'
> > Dynamic Linking:
> > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
> > ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi
> > /CORE'
> > cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> >
> >
> > Characteristics of this binary (from libperl):
> > Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
> > PERL_IMPLICIT_CONTEXT
> > Built under linux
> > Compiled at Sep 1 2002 23:56:49
> > %ENV:
> > PERL_LWP_USE_HTTP_10="1"
> > @INC:
> > /usr/lib/perl5/5.8.0/i386-linux-thread-multi
> > /usr/lib/perl5/5.8.0
> > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> > /usr/lib/perl5/site_perl/5.8.0
> > /usr/lib/perl5/site_perl
> > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> > /usr/lib/perl5/vendor_perl/5.8.0
> > /usr/lib/perl5/vendor_perl
> > .
> >
> >
> > 3. Plea for sanity
> >
> > This is the last compatibility hurdle for my apache/perl 1.0->2.0 project.
> >
> > For the life of me, I just can't see what the problem is.
> >
> > If more information is needed, don't hesitate to ask.
> >
> > Any help would be greatly appreciated.
> >
> > -------------8<---------- End Bug Report --------------8<----------
> >
> > imago@lockdownonline.com
> >
> >
>
Re: [mp2.0] Apache::SubProcess deFUNct sub-process
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
What does the output of mod_perl's make test look like, especially
apache/subprocess ?
What does your code that calls spawn_proc_prog() look like ?
There is also a gotcha documented in the tests
(./t/response/TestApache/subprocess.pm), look for read_data().
On Wed, 2002-10-30 at 09:19, Imago wrote:
> -------------8<---------- Start Bug Report ------------8<----------
>
> 1. Problem Description:
>
> Apache::SubProcess does not appear to be 'fully' working.
>
> When calling:
>
> Apache::SubProcess::spawn_proc_prog($r,'/tmp/proc.pl');
>
> Process tree looks like:
>
> root 3239 /usr/local/apache2/bin/httpd
> apache 3242 \_ /usr/local/apache2/bin/httpd
> apache 3243 \_ /usr/local/apache2/bin/httpd
> apache 3343 | \_ [proc.pl <defunct>]
> apache 3244 \_ /usr/local/apache2/bin/httpd
>
> - proc.pl is owned by 'apache' and is executable.
> - simply creates a file '/tmp/ran.apache'.
>
> - 'ran.apache' file never gets created.
>
> 2. Used Components and their Configuration:
>
> *** using lib/Apache/BuildConfig.pm
> *** Makefile.PL options:
> MP_AP_PREFIX => /usr/local/apache2
> MP_GENERATE_XS => 1
> MP_LIBNAME => mod_perl
> MP_USE_DSO => 1
> MP_USE_STATIC => 1
>
>
> *** /usr/local/apache2/bin/httpd -V
> Server version: Apache/2.0.43
> Server built: Oct 18 2002 14:36:03
> Architecture: 32-bit
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D HTTPD_ROOT="/usr/local/apache2"
> -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
> -D DEFAULT_PIDLOG="logs/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="logs/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
>
> *** /usr/bin/perl -V
> Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
> Platform:
> osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
> uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
> 06:41:59 edt 2002 i686 i686 i386 gnulinux '
>
>
>
>
> config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localho
> st -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
> Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix
> =/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefi
> les -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_sysl
> og -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversionon
> ly -Dpager=/usr/bin/less -isr'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=define use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='gcc', ccflags
> ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL
> E_OFFSET_BITS=64 -I/usr/include/gdbm',
> optimize='-O2 -march=i386 -mcpu=i686',
>
>
>
>
> cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdb
> m'
> ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
> 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, prototype=define
> Linker and Libraries:
> ld='gcc', 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.92.so, so=so, useshrplib=true, libperl=libperl.so
> gnulibc_version='2.2.92'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
> ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi
> /CORE'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
> PERL_IMPLICIT_CONTEXT
> Built under linux
> Compiled at Sep 1 2002 23:56:49
> %ENV:
> PERL_LWP_USE_HTTP_10="1"
> @INC:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0
> /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0
> /usr/lib/perl5/vendor_perl
> .
>
>
> 3. Plea for sanity
>
> This is the last compatibility hurdle for my apache/perl 1.0->2.0 project.
>
> For the life of me, I just can't see what the problem is.
>
> If more information is needed, don't hesitate to ask.
>
> Any help would be greatly appreciated.
>
> -------------8<---------- End Bug Report --------------8<----------
>
> imago@lockdownonline.com
>
>