You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2005/11/09 18:45:06 UTC
RE: ImageMagick
pkg_add -r perl
pkg_add -r ImageMagick
pkg_add -r mod_perl2
ls -1 /var/db/pkg
ImageMagick-6.2.2.1
apache-2.0.55
expat-1.95.8_3
fontconfig-2.2.3,1
freetype2-2.1.10_1
ghostscript-gnu-7.07_13
gsfonts-8.11_2
jasper-1.701.0
jbigkit-1.6
jpeg-6b_3
lcms-1.14,1
libfpx-1.2.0.12
libiconv-1.9.2_1
libltdl-1.5.20
libxml2-2.6.22
mod_perl2-2.0.1,2
mpeg2codec-1.2_1
perl-5.8.7
pkgconfig-0.17.2
pkgdb.db
png-1.2.8_2
tiff-3.7.4
xorg-libraries-6.8.2
First of all, sweet crap thats a lot of stuff.
trunks# cat /usr/local/etc/apache2/Includes/mod_perl.conf
LoadModule perl_module libexec/apache2/mod_perl.so
PerlSwitches -wT
PerlPostConfigRequire etc/apache2/startup.pl
trunks# cat /usr/local/etc/apache2/startup.pl
## CORE PERL Modules
use strict;
use warnings FATAL => 'all';
use Carp;
## Core MP2 Modules
use mod_perl2;
use ModPerl::MethodLookup ();
&ModPerl::MethodLookup::preload_all_modules();
use Image::Magick ();
1;
trunks# apachectl start
Segmentation fault (core dumped)
Of course, the FreeBSD pkg builds are without debugging.
I'll give that a whirl shortly.
This was on FreeBSD 7.0-current i386
--
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
Re: ImageMagick
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Philip M. Gollucci wrote:
> cd /usr/local/sbin
> ./apachectl start
> Segmentation Fault (core dumped)
> (gdb) run -X -d /usr/local
> Starting program: /usr/local/sbin/httpd -X -d /usr/local
> gdb in realloc(): error: pointer to wrong page
> Abort (core dumped)
>
> Of course, my gdb itself dumps core *sigh*
> Anyone know how to help gdb out? I can use it, but its internals
> are out of my league.
So I've tried on 3 different computers now and gdb core dumps when trying to debug httpd2 with or without loading
mod_perl2. I've tried -g -O0 and -ggdb3 -O0 as well.
I can say, that if I do
./httpd -X
it does _NOT_ segfault.
This leads me to believe someting in the ChildInit Phase is crapping out.
I remember gdb working less then 3 months ago for me..... did something change ?
--
--------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
Re: ImageMagick
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Len Kranendonk wrote:
>>Of course, the FreeBSD pkg builds are without debugging.
>>I'll give that a whirl shortly.
> Thanks for that Philip. I know perl but this is way beyond my reach.
If you're wondering why I don't just compile these by hand, its because
I don't want to deal with installing ImageMagick outside of the ports tree
which gets very nasty due to all its dependencies.
[assumming my previous pkg_add -r commands]
pkg_delete -f mod_perl2 ImageMagick apache2 and perl5.8
Can't use the packages, need debugging, use ports Makefiles.
PERL:
-----------
cd /usr/ports/lang/perl5.8
Fix the Optimize Flags
(I'll file a gnats PR for FreeBSD for this diff)
trunks# diff -u Makefile.orig Makefile
--- Makefile.orig Wed Nov 9 17:40:13 2005
+++ Makefile Wed Nov 9 17:40:03 2005
@@ -52,7 +52,7 @@
.include <bsd.port.pre.mk>
.if defined(WITH_DEBUGGING)
-CONFIGURE_ARGS+= -Doptimize="-g" -DDEBUGGING
+CONFIGURE_ARGS+= -Doptimize="-g -ggdb3 -O0" -DDEBUGGING
.else
CONFIGURE_ARGS+= -Doptimize="${CFLAGS}"
.endif
make WITH_DEBUGGING=yes all install clean
APACHE:
------------
To build apache2 from ports you need autoconf259
pkg_add -r autoconf259
cd /usr/ports/www/apache2
make WITH_DEBUG=yes all install clean
MOD_PERL2:
--------------
cd /usr/ports/www/mod_perl2
Add debug hook
(Again, I'll file a gnats PR for FreeBSD for this diff)
trunks# diff -u Makefile.orig Makefile
--- Makefile.orig Wed Nov 9 17:37:26 2005
+++ Makefile Wed Nov 9 17:37:09 2005
@@ -26,6 +26,10 @@
# use paths returned by apxs to install some components. Fixes welcome.
CONFIGURE_ARGS= MP_APXS=${LOCALBASE}/sbin/apxs PREFIX=${PREFIX}
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+= MP_MAINTAINER=1
+.endif
+
MAN3= APR.3 APR::Base64.3 APR::Brigade.3 APR::Bucket.3 \
APR::BucketAlloc.3 APR::BucketType.3 APR::Const.3 \
APR::Date.3 APR::Error.3 APR::Finfo.3 APR::IpSubnet.3 \
make WITH_DEBUG=yes all install clean
IMAGE MAGICK:
-----------------
To build ImageMagick from ports you need gmake
pkg_add -r gmake
cd /usr/ports/graphics/ImageMagick
Add debug hook
(Again, I'll file a gnats PR for FreeBSD for this diff)
trunks# diff -u Makefile.orig Makefile
--- Makefile.orig Wed Nov 9 19:01:06 2005
+++ Makefile Wed Nov 9 19:00:48 2005
@@ -36,6 +36,10 @@
PLIST_SUB+= PORTVERSION=${PORTVERSION:R}
+.if defined(WITH_DEBUG)
+CPPFLAGS+= -g -ggdb3 -O0
+.endif
+
.if !defined(WITHOUT_IMAGEMAGICK_PERL)
CONFIGURE_ARGS+= --with-perl=${PERL5}
PLIST_SUB+= WITH_PERL=''
make WITH_DEBUG=yes all install clean
installed packages:
----------------
ls -1 /var/db/pkg
trunks# ls -1
apache-2.0.55
autoconf-2.59_2
expat-1.95.8_3
fontconfig-2.2.3,1
freetype2-2.1.10_1
gettext-0.14.5
ghostscript-gnu-7.07_13
gmake-3.80_2
gsfonts-8.11_2
jasper-1.701.0
jbigkit-1.6
jpeg-6b_3
lcms-1.14,1
libfpx-1.2.0.12
libiconv-1.9.2_1
libltdl-1.5.20
libtool-1.5.20
libxml2-2.6.22
m4-1.4.3
mod_perl2-2.0.2,2
mpeg2codec-1.2_1
perl-5.8.7
pkgconfig-0.17.2
pkgdb.db
png-1.2.8_2
tiff-3.7.4
xorg-libraries-6.8.2
TEST:
-----------
cd /usr/local/sbin
./apachectl start
Segmentation Fault (core dumped)
YAY!! it still dumps with debugging enabled!
[assuming my previous mod_perl.conf and startup.pl]
http://httpd.apache.org/dev/debugging.html#gdb
(gdb) run -X -d /usr/local
Starting program: /usr/local/sbin/httpd -X -d /usr/local
gdb in realloc(): error: pointer to wrong page
Abort (core dumped)
Of course, my gdb itself dumps core *sigh*
Anyone know how to help gdb out? I can use it, but its internals
are out of my league.
Maybe someone else can submit a gdb backtrace so we can see if its PERL or
mod_perl that ImageMagick is mucking up.
--
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
Re: ImageMagick
Posted by Len Kranendonk <le...@primaat.com>.
> trunks# apachectl start
> Segmentation fault (core dumped)
>
> Of course, the FreeBSD pkg builds are without debugging.
> I'll give that a whirl shortly.
Thanks for that Philip. I know perl but this is way beyond my reach.