Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Bus Error with mod_perl 2.04

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


david at kineticode

Apr 22, 2008, 12:50 PM

Post #1 of 11 (1371 views)
Permalink
Bus Error with mod_perl 2.04

Howdy,

I can get Apache to crash with a Bus Error with this httpd.conf:

LoadModule perl_module modules/mod_perl.so
ServerName localhost
ServerRoot /usr/local/apache2
PidFile logs/httpd.pid
Listen 80
User daemon
Group daemon
StartServers 2
ErrorLog logs/error_log
CustomLog logs/access_log combined
TypesConfig conf/mime.types
PerlModule mod_perl2
PerlPassEnv PERL5LIB
PerlModule MyConfig

This is MyConfig.pm:

package MyConfig;

require Apache2::ServerUtil;
my $s = Apache2::ServerUtil->server;
$s->add_config([
'NameVirtualHost *:80',
'<VirtualHost *:80>',
' DocumentRoot /usr/local/apache2/htdocs',
'</VirtualHost>',
]);

1;

If I comment out the <VirtualHost> section, it works. So there's
something about <VirtualHost> sections that add_config doesn't seem to
like. I've attached the Crash file created by Mac OS X. I'm using
mod_perl 2.04 as a DSO with Apache 2.2.8 and Perl 5.10. Holler if you
need more details on my configuration.

Thanks,

David
Attachments: crash.txt (2.68 KB)


gozer at ectoplasm

Apr 23, 2008, 12:54 AM

Post #2 of 11 (1334 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

David E. Wheeler wrote:
> Howdy,
>
> I can get Apache to crash with a Bus Error with this httpd.conf:

Worrysome. Can you also do it with Apache/httpd < 2.2.8


> LoadModule perl_module modules/mod_perl.so
> ServerName localhost
> ServerRoot /usr/local/apache2
> PidFile logs/httpd.pid
> Listen 80
> User daemon
> Group daemon
> StartServers 2
> ErrorLog logs/error_log
> CustomLog logs/access_log combined
> TypesConfig conf/mime.types
> PerlModule mod_perl2
> PerlPassEnv PERL5LIB
> PerlModule MyConfig
>
> This is MyConfig.pm:
>
> package MyConfig;
>
> require Apache2::ServerUtil;
> my $s = Apache2::ServerUtil->server;
> $s->add_config([.
> 'NameVirtualHost *:80',
> '<VirtualHost *:80>',
> ' DocumentRoot /usr/local/apache2/htdocs',
> '</VirtualHost>',
> ]);
>
> 1;
>
> If I comment out the <VirtualHost> section, it works. So there's
> something about <VirtualHost> sections that add_config doesn't seem to
> like. I've attached the Crash file created by Mac OS X. I'm using
> mod_perl 2.04 as a DSO with Apache 2.2.8 and Perl 5.10. Holler if you
> need more details on my configuration.

Can you get a debug build and get a good backtrace out of it ?

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.24 KB)


david at kineticode

Apr 23, 2008, 10:50 AM

Post #3 of 11 (1323 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On Apr 23, 2008, at 00:54, Philippe M. Chiasson wrote:

> David E. Wheeler wrote:
>> Howdy,
>> I can get Apache to crash with a Bus Error with this httpd.conf:
>
> Worrysome. Can you also do it with Apache/httpd < 2.2.8

Dunno. I'll try another version in a bit.

>> If I comment out the <VirtualHost> section, it works. So there's
>> something about <VirtualHost> sections that add_config doesn't seem
>> to like. I've attached the Crash file created by Mac OS X. I'm
>> using mod_perl 2.04 as a DSO with Apache 2.2.8 and Perl 5.10.
>> Holler if you need more details on my configuration.
>
> Can you get a debug build and get a good backtrace out of it ?

I recompiled mod_perl with MP_DEBUG=1. Is that all I need to do? If
so, where would I find the backtrace? The crash file that Mac OS X
creates isn't any different.

Thanks,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

Apr 23, 2008, 11:07 AM

Post #4 of 11 (1330 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On Apr 23, 2008, at 10:50, David E. Wheeler wrote:

>> Can you get a debug build and get a good backtrace out of it ?
>
> I recompiled mod_perl with MP_DEBUG=1. Is that all I need to do? If
> so, where would I find the backtrace? The crash file that Mac OS X
> creates isn't any different.

I found the docs on perl.apache.org site. I got this:

Core was generated by `/usr/local/apache2/bin/httpd'.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ............ done
#0 0x0002f43b in open_multi_logs ()
(gdb) bt
#0 0x0002f43b in open_multi_logs ()
#1 0x0002f7be in init_config_log ()
#2 0x00002b88 in ap_run_open_logs ()
#3 0x0000a701 in main ()

So I'm guessing that's not enough. I'll recompile Apache with debug
symbols and try again.

Best,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

Apr 23, 2008, 11:26 AM

Post #5 of 11 (1332 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On Apr 23, 2008, at 11:07, David E. Wheeler wrote:

> (gdb) bt
> #0 0x0002f43b in open_multi_logs ()
> #1 0x0002f7be in init_config_log ()
> #2 0x00002b88 in ap_run_open_logs ()
> #3 0x0000a701 in main ()

Shit! I recompiled Perl, Apache, and mod_perl with debugging info, and
got exactly the same thing!

(gdb) bt
#0 0x0002efd2 in open_multi_logs ()
#1 0x0002f354 in init_config_log ()
#2 0x00002514 in ap_run_open_logs ()
#3 0x0000a115 in main ()

Annoying. Is there something else I can do? Would you like me to
upload the core file somewhere?

Best,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


gozer at ectoplasm

Apr 24, 2008, 12:03 AM

Post #6 of 11 (1307 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

David E. Wheeler wrote:
> On Apr 23, 2008, at 11:07, David E. Wheeler wrote:
>
>> (gdb) bt
>> #0 0x0002f43b in open_multi_logs ()
>> #1 0x0002f7be in init_config_log ()
>> #2 0x00002b88 in ap_run_open_logs ()
>> #3 0x0000a701 in main ()
>
> Shit! I recompiled Perl, Apache, and mod_perl with debugging info, and
> got exactly the same thing!
>
> (gdb) bt
> #0 0x0002efd2 in open_multi_logs ()
> #1 0x0002f354 in init_config_log ()
> #2 0x00002514 in ap_run_open_logs ()
> #3 0x0000a115 in main ()
>
> Annoying. Is there something else I can do? Would you like me to
> upload the core file somewhere?

Nah, the core file by itself is not exactly super usefull. You just have
to figure out how to get a debugging build. Also, I've tried to reproduce
this on OS X/Apache 2.2.8 prefork/ Perl 5.10 without any luck.

Can you post the exact details on how you built each of these ?

For me, it goes something like:

perl> ./Configure -des \
-Doptimize=-g \
-Dprefix=$HOME/opt/perl.org/perl/5.10.0/debug
apache> CFLAGS="-g" ./configure \
--with-included-apr \
--with-mpm=prefork \
--enable-maintainer-mode \
--enable-modules=all \
--neable-mods-shared=max \
--prefix=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug
mod_perl> perl Makefile.PL \
MP_APXS=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug/bin/apxs
MP_MAINTAINER=1 \
MP_DEBUG=1

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.24 KB)


david at kineticode

May 28, 2008, 9:54 PM

Post #7 of 11 (963 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On Apr 24, 2008, at 00:03, Philippe M. Chiasson wrote:

> Nah, the core file by itself is not exactly super usefull. You just
> have
> to figure out how to get a debugging build. Also, I've tried to
> reproduce
> this on OS X/Apache 2.2.8 prefork/ Perl 5.10 without any luck.
>
> Can you post the exact details on how you built each of these ?
>
> For me, it goes something like:
>
> perl> ./Configure -des \
> -Doptimize=-g \
> -Dprefix=$HOME/opt/perl.org/perl/5.10.0/debug

For me:

perl-5.10.0> sh Configure -des \
-Duseshrplib\
-Dprefix=/usr/local/perl-5.10.0.d \
-Doptimize='-g'

> apache> CFLAGS="-g" ./configure \
> --with-included-apr \
> --with-mpm=prefork \
> --enable-maintainer-mode \
> --enable-modules=all \
> --neable-mods-shared=max \
> --prefix=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug

For me:

httpd-2.2.8>export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g"
./configure \
--prefix=/usr/local/apache2 \
--with-mpm=prefork \
--enable-dav \
--enable-dav-fs \
--enable-log-config \
--enable-authn-file \
--enable-authz-host \
--enable-authz-group \
--enable-authz-user \
--prefix=/usr/local/apache2.d \
--enable-mods-shared="rewrite info worker proxy deflate mod_auth
include ssl env mime-magic auth_digest expires dav dav_fs perl"

So I added the -g to CFLAGS. I didn't have that before. Instead I used
--enable-maintainer-mode as documented in

http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files

Is that out of date, perhaps?

> mod_perl> perl Makefile.PL \
> MP_APXS=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug/bin/apxs
> MP_MAINTAINER=1 \
> MP_DEBUG=1

For me:

mod_perl-2.0.4>/usr/local/perl-5.10.0.d/bin/perl Makefile.PL \
MP_AP_PREFIX=/usr/local/apache2.d \
MP_MAINTAINER=1 \
MP_PROMPT_DEFAULT=1 \

The above URL doesn't have the MP_MAINTAINER=1 bit, but I followed
your lead. Should it have that?

Ah, bloody hell! Now I get this:

# make
cd "src/modules/perl" && make
cc -I/usr/local/src/mod_perl-2.0.4/src/modules/perl -I/usr/local/src/
mod_perl-2.0.4/xs -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/
local/apache2.d/include -fno-common -DPERL_DARWIN -no-cpp-precomp -
DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/
local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE -DMOD_PERL -Wall -
Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror
-Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG -DMP_TRACE -
DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g \
-c mod_perl.c && mv mod_perl.o mod_perl.lo
In file included from /usr/local/perl-5.10.0.d/lib/5.10.0/
darwin-2level/CORE/perl.h:2382,
from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/handy.h:85:1:
error: "bool" redefined
In file included from /usr/include/mach-o/dyld.h:29,
from /usr/include/apr-1/apr_portable.h:166,
from /usr/local/apache2.d/include/http_protocol.h:31,
from modperl_apache_includes.h:30,
from mod_perl.h:20,
from mod_perl.c:17:
/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdbool.h:36:1: error:
this is the location of the previous definition
cc1: warnings being treated as errors
In file included from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perl.h:3969:
warning: function declaration isn’t a prototype
In file included from modperl_io_apache.h:22,
from modperl_io.h:20,
from mod_perl.h:83,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perliol.h:173:
warning: function declaration isn’t a prototype
mod_perl.c: In function ‘modperl_response_handler’:
mod_perl.c:1019: warning: unused variable ‘rcfg’
make[1]: *** [mod_perl.lo] Error 1
make: *** [modperl_lib] Error 2

WTF? I could have sworn I built a debugging mod_perl before. Could it
be choking on Perl 5.10 here, too?

Thanks,

David
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


pgollucci at p6m7g8

May 29, 2008, 12:41 PM

Post #8 of 11 (954 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David E. Wheeler wrote:

| perl-5.10.0> sh Configure -des \
| -Duseshrplib\
| -Dprefix=/usr/local/perl-5.10.0.d \
| -Doptimize='-g'
- -g3 -O0 -DDEBUGGING will get you just about everything...


| httpd-2.2.8>export CPPFLAGS="-I/usr/local/include"
| export LDFLAGS="-L/usr/local/lib"
| export CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g"
in bash, you don't need to use the exports like that....

| So I added the -g to CFLAGS. I didn't have that before. Instead I used
| --enable-maintainer-mode as documented in
|http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files
This merely adds -DAP_DEBUG which does not include -g, so yes, thats out of date.

CFLAGS="-g3 -O0 -DAP_UNSAFE_ERROR_LOG_UNESCAPED" ..... ./configure
should get you just about everything.

| Ah, bloody hell! Now I get this:
|
| # make
| -Werror
If you just want to see it compile, edit lib/Apache2/Build.pm and remove
- -Werror stuff.

in todo/bugs_build I see that I wrote
==gcc 4.x and higher compiles break under -Werror
==[pgollucci volunteers]

that might be fixed because I did build it recently on FreeBSD with 4.2.x.....

- -Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG
| In file included from
| /usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perl.h:2382,
| from modperl_perl_includes.h:65,
| from modperl_common_includes.h:24,
| from mod_perl.h:21,
| from mod_perl.c:17:
| /usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/handy.h:85:1:
| error: "bool" redefined
Definitely a perl 5.10 bug in Darwin. Take it to p5p :)
You are not the first to post this.

| WTF? I could have sworn I built a debugging mod_perl before. Could it be
| choking on Perl 5.10 here, too?


- --
- ------------------------------------------------------------------------
Philip M. Gollucci (philip[at]ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPwb+dbiP+9ubjBwRAr4UAJ0YwBYllpaXTwJn1Sg56cOGfugC1gCfbXUd
hhQxlrvlZ47zCC6LEU620HU=
=CFEg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


pgollucci at p6m7g8

May 31, 2008, 2:27 PM

Post #9 of 11 (928 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

Philip M. Gollucci wrote:
> David E. Wheeler wrote:
> This merely adds -DAP_DEBUG which does not include -g, so yes, thats out
> of date.
>
> CFLAGS="-g3 -O0 -DAP_UNSAFE_ERROR_LOG_UNESCAPED" ..... ./configure
> should get you just about everything.
Updated in 662085.

Thanks!


------------------------------------------------------------------------
Philip M. Gollucci (philip[at]ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

May 31, 2008, 2:29 PM

Post #10 of 11 (928 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On May 31, 2008, at 14:27, Philip M. Gollucci wrote:

>> David E. Wheeler wrote:
>> This merely adds -DAP_DEBUG which does not include -g, so yes,
>> thats out of date.
>> CFLAGS="-g3 -O0 -DAP_UNSAFE_ERROR_LOG_UNESCAPED" ..... ./configure
>> should get you just about everything.
> Updated in 662085.

Cool, thanks!

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

Jul 13, 2008, 12:35 AM

Post #11 of 11 (450 views)
Permalink
Re: Bus Error with mod_perl 2.04 [In reply to]

On May 29, 2008, at 12:41, Philip M. Gollucci wrote:

> | perl-5.10.0> sh Configure -des \
> | -Duseshrplib\
> | -Dprefix=/usr/local/perl-5.10.0.d \
> | -Doptimize='-g'
> - -g3 -O0 -DDEBUGGING will get you just about everything...

Okay, did this:

sh Configure -des \
-Duseshrplib \
-Dprefix=/usr/local/perl-5.10.0.d \
-Doptimize='-g3 -O0 -DDEBUGGING'

> | httpd-2.2.8>export CPPFLAGS="-I/usr/local/include"
> | export LDFLAGS="-L/usr/local/lib"
> | export CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g"
> in bash, you don't need to use the exports like that....
>
> | So I added the -g to CFLAGS. I didn't have that before. Instead I
> used
> | --enable-maintainer-mode as documented in
> |http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files
> This merely adds -DAP_DEBUG which does not include -g, so yes, thats
> out of date.

Okay, did this:

export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g"
./configure \
--prefix=/usr/local/apache2.d \
--with-mpm=prefork \
--enable-dav \
--enable-dav-fs \
--enable-log-config \
--enable-authn-file \
--enable-authz-host \
--enable-authz-group \
--enable-authz-user \
--prefix=/usr/local/apache2.d \
--enable-maintainer-mode \
--enable-mods-shared="rewrite info worker proxy deflate mod_auth
include ssl env mime-magic auth_digest expires dav dav_fs perl"


> | Ah, bloody hell! Now I get this:
> |
> | # make
> | -Werror
> If you just want to see it compile, edit lib/Apache2/Build.pm and
> remove
> - -Werror stuff.
>
> in todo/bugs_build I see that I wrote
> ==gcc 4.x and higher compiles break under -Werror
> ==[pgollucci volunteers]
>
> that might be fixed because I did build it recently on FreeBSD with
> 4.2.x.....
>
> - -Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG
> | In file included from
> | /usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perl.h:2382,
> | from modperl_perl_includes.h:65,
> | from modperl_common_includes.h:24,
> | from mod_perl.h:21,
> | from mod_perl.c:17:
> | /usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/handy.h:85:1:
> | error: "bool" redefined
> Definitely a perl 5.10 bug in Darwin. Take it to p5p :)
> You are not the first to post this.

Now I get this from svn head:

benedict% make
cd "src/modules/perl" && make
cc -I/Users/david/dev/perl/modperl2/src/modules/perl -I/Users/david/
dev/perl/modperl2/xs -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/
local/apache2.d/include -fno-common -DPERL_DARWIN -no-cpp-precomp -
DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/
local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE -DMOD_PERL -Wall -
Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror
-Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG -DMP_TRACE -
DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -DAP_DEBUG -g3 -
O0 -DDEBUGGING \
-c mod_perl.c && mv mod_perl.o mod_perl.lo
In file included from /usr/local/perl-5.10.0.d/lib/5.10.0/
darwin-2level/CORE/perl.h:2382,
from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/handy.h:85:1:
error: "bool" redefined
In file included from /usr/include/mach-o/dyld.h:29,
from /usr/include/apr-1/apr_portable.h:166,
from /usr/local/apache2.d/include/http_protocol.h:31,
from modperl_apache_includes.h:30,
from mod_perl.h:20,
from mod_perl.c:17:
/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdbool.h:36:1: error:
this is the location of the previous definition
cc1: warnings being treated as errors
In file included from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perl.h:3969:
warning: function declaration isn’t a prototype
In file included from modperl_io_apache.h:22,
from modperl_io.h:20,
from mod_perl.h:83,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perliol.h:173:
warning: function declaration isn’t a prototype
mod_perl.c: In function ‘modperl_response_handler’:
mod_perl.c:1019: warning: unused variable ‘rcfg’
make[1]: *** [mod_perl.lo] Error 1
make: *** [modperl_lib] Error 2

:-(

So I commented-out this line:

$Wall .= " -Werror" if $] >= 5.006002;

And all was well.

I then ran the code to get the core dump. Just a a reminder, here is
the httpd.conf:

LoadModule perl_module modules/mod_perl.so
ServerName localhost
ServerRoot /usr/local/apache2
PidFile logs/httpd.pid
Listen 80
User daemon
Group daemon
StartServers 2
ErrorLog logs/error_log
CustomLog logs/access_log combined
TypesConfig conf/mime.types
PerlModule mod_perl2
PerlPassEnv PERL5LIB
PerlModule MyConfig

And here is MyConfig.pm:

package MyConfig;
require Apache2::ServerUtil;
my $s = Apache2::ServerUtil->server;
$s->add_config([
'NameVirtualHost *:80',
'<VirtualHost *:80>',
' DocumentRoot /usr/local/apache2/htdocs',
'</VirtualHost>',
]);
1;

I ran it like so:

sudo env PERL5LIB=/Users/david/Desktop /usr/local/apache2-debug/bin/
httpd -f /Users/david/Desktop/httpd.conf

This did generate a core file, but its backtrace doesn't look
particuarly interesting:

% sudo gdb /usr/local/apache2-debug/bin/httpd /cores/core.23077GNU gdb
6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for
shared libraries ........ done

Core was generated by `/usr/local/apache2-debug/bin/httpd'.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ............ done
#0 0x0002efd2 in open_multi_logs ()
(gdb) bt
#0 0x0002efd2 in open_multi_logs ()
#1 0x0002f354 in init_config_log ()
#2 0x00002514 in ap_run_open_logs ()
#3 0x0000a115 in main ()

What more doe you need?

Best,

David
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.