Re: Class::DBI and CGI::Application under mod_perl

2005-11-09 Thread Badai Aqrandista



Clinton Gormley wrote:

I have recently had a bit of exposure to Class:DBI and CGI::Application
in a project running under CGI.

[...]

What are the experiences/opinions of using these modules under mod_perl
2 on high traffic sites?


I'm currently using them on mod_perl 1, but it shouldn't matter. 
CGI::Application is lightweight and fast.  It will not give you any 
trouble.


Class::DBI is significantly (about an order of magnitude) slower than 
hand-coded DBI objects, but saves you a lot of development time, so my 
current approach is to use it and replace things that end up being too 
slow.  If you want to try something else, the developer of Rose::DB::Object 
has a benchmark that shows his module falling somewhere in between 
Class::DBI and straight DBI calls, although it's still much slower than 
DBI.


- Perrin


Sorry for the very late reply...

You might want to check this out: http://www.perlmonks.org/?node_id=504724

I quite agree with it...

---
Badai Aqrandista
Cheepy (?)

_
REALESTATE: biggest buy/rent/share listings   
http://ninemsn.realestate.com.au




Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Len Kranendonk



As soon as I preload Image::Magick under mod_perl2 
on FreeBSD (5.3, 5.4 and 6.0) I 
get a "Segmentation fault (core dumped)" when 
I start Apache.
 
Without preloading it works fine. 
 
What's the best place to report this bug ? 

 
 
 
 


Re: Roomity.com v 1.5 is a web 2.01

2005-11-09 Thread Randal L. Schwartz
> "shenanigans" == shenanigans  <[EMAIL PROTECTED]> writes:

shenanigans> We have mirrored your mail list in a new application that
shenanigans> provides a more aggregated and safe environment which
shenanigans> utilizes the power of broadband.

Translation: when you visit our site, you will get specifically
targetted ads, to which we will add content that you are providing for
us for free.  In other words, we're a leech.

shenanigans> Roomity.com v 1.5 is a web 2.01 community webapp. Our
shenanigans> newest version adds broadcast video and social networking
shenanigans> such as favorite authors and an html editor.

Translation: [sound of crickets]

shenanigans> It?s free to join and any feedback would be appreciated.

Translation: we don't know what a straight ASCII quote is.  Trust us!


shenanigans> 

shenanigans> Broadband interface (RIA) + mail box saftey = http://ModPerl_Users_List.roomity.com";>ModPerl_Users_List.roomity.com
shenanigans> *Your* clubs, no sign up to read, ad supported; try broadband 
internet. ~~1131487477246~~
shenanigans> 


Translation: We can't even spell "safety" instead of "saftey", or
bother to explain the obscure "RIA" acronym.  Trust us!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Philip M. Gollucci

Len Kranendonk wrote:
As soon as I preload Image::Magick under mod_perl2 on FreeBSD (5.3, 5.4 
and 6.0) I

get a "Segmentation fault (core dumped)" when I start Apache.

look in the Makefile for the Maintainer of the port.
if that doesn't work ports /at/ FreeBSD (dot) org

or you can file a gnats bug report on the FreeBSD.org site.

Finally, make sure you use the ports tree to install Image::Magick and not CPAN 
on FreeBSD.




--

"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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com


Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Philip M. Gollucci

Philip M. Gollucci wrote:

Len Kranendonk wrote:

As soon as I preload Image::Magick under mod_perl2 on FreeBSD (5.3, 
5.4 and 6.0) I

get a "Segmentation fault (core dumped)" when I start Apache.


look in the Makefile for the Maintainer of the port.
if that doesn't work ports /at/ FreeBSD (dot) org

or you can file a gnats bug report on the FreeBSD.org site.

Finally, make sure you use the ports tree to install Image::Magick and 
not CPAN on FreeBSD.
I'm going to have to eat part/all of my words here as there is no port for 
p5-Image-Magick.


I'll give it a whirl myself and see what happens.

--

"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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com


Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Kevin A. McGrail
If it helps, I am under the opinion that ImageMagick on a Linux box is
causing segfaults under modperl1 & 2 and I identified the issue years ago
but have just started tracking it back to ImageMagick.  I expect to be
tackling this issue sometime very soon.

Regards,
KAM

- Original Message - 
From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
To: "Philip M. Gollucci" <[EMAIL PROTECTED]>
Cc: "Len Kranendonk" <[EMAIL PROTECTED]>; 
Sent: Wednesday, November 09, 2005 12:02 PM
Subject: Re: Seg fault with Image::Magick on FreeBSD


> Philip M. Gollucci wrote:
> > Len Kranendonk wrote:
> >
> >> As soon as I preload Image::Magick under mod_perl2 on FreeBSD (5.3,
> >> 5.4 and 6.0) I
> >> get a "Segmentation fault (core dumped)" when I start Apache.
> >
> > look in the Makefile for the Maintainer of the port.
> > if that doesn't work ports /at/ FreeBSD (dot) org
> >
> > or you can file a gnats bug report on the FreeBSD.org site.
> >
> > Finally, make sure you use the ports tree to install Image::Magick and
> > not CPAN on FreeBSD.
> I'm going to have to eat part/all of my words here as there is no port for
> p5-Image-Magick.
>
> I'll give it a whirl myself and see what happens.
>
> -- 
> 
> "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 ([EMAIL PROTECTED]) 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>



Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Philip M. Gollucci

Kevin A. McGrail wrote:

If it helps, I am under the opinion that ImageMagick on a Linux box is
causing segfaults under modperl1 & 2 and I identified the issue years ago
but have just started tracking it back to ImageMagick.  I expect to be
tackling this issue sometime very soon.

Ding!

Lightbulb!

We use Image::Magick under perl 5.8.3 at Liquidity Services, Inc on
Stuck on 5.8.3 because of Endeca.

Linux cron 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:18:24 EDT 2004 i686 i686 i386 
GNU/Linux


Somewhere, it uses $& or one of those operators that change the regex engine of 
perl.  I don't know if its been fixed in 5.8.7 or maint.


Thats what causing it, some other developer here found a way around it, but I 
forget what it is.  I'll bug him later today.



--

"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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com


Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Len Kranendonk
> I'm going to have to eat part/all of my words here as there is no port for
> p5-Image-Magick.

There is a port ImageMagick which also contains the perl module
Image::Magick.
I've mailed the maintainer. Not sure though if he would be able to fix it as
he might
not be into perl.




RE: ImageMagick

2005-11-09 Thread Philip M. Gollucci

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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com


Re: Seg fault with Image::Magick on FreeBSD

2005-11-09 Thread Len Kranendonk
> Somewhere, it uses $& or one of those operators that change the regex
engine of
> perl.  I don't know if its been fixed in 5.8.7 or maint.

I'm running 5.8.7 and it still has this problem.

I'm currently working around it by not preloading Image::Magick and using
"require"
to load Image::Magick on places where it's needed. It works but it's
ugly

Len




[mp2] compile-test error "mod_perl.so: undefined symbol: PL_ppaddr"

2005-11-09 Thread Benjamin Foote

1. Problem Description:

Hi there,

I'm trying to compile mod_perl-2.0.2 on debian sarge and I'm getting the
following error at the beginning of the testing phase:

8<
Syntax error on line 12 of
/home/bfoote/files/mod_perl/mod_perl-2.0.2/t/conf/httpd.conf:
Cannot load
/home/bfoote/files/mod_perl/mod_perl-2.0.2/src/modules/perl/mod_perl.so
into server:
/home/bfoote/files/mod_perl/mod_perl-2.0.2/src/modules/perl/mod_perl.so:
undefined symbol: PL_ppaddr
8<

Mind you I have not compiled apache2 or perl so my guess is that I'll
have to build the entire tool chain in order to get this to go but if
there were some other small piece of the puzzle (like a missing
lib_perl??) I'd be happy to save the time.

Also, at risk of asking a religious question I was wondering what server
platform list participants liked for apache2/mod_perl2.

Thanks for your help,

ben


2. Used Components and their Configuration:

*** mod_perl version 2.02

*** using
/home/bfoote/files/mod_perl/mod_perl-2.0.2/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB => aprext
  MP_APXS=> /usr/bin/apxs2
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME => mod_perl
  MP_USE_DSO => 1


*** /usr/sbin/apache2 -V
Server version: Apache/2.0.54
Server built:   Sep  5 2005 11:11:08
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -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=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec2"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

*** /usr/bin/ldd /usr/sbin/apache2
linux-gate.so.1 =>  (0xe000)
libcrypt.so.1 => /lib/tls/libcrypt.so.1 (0xb7ec)
libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb7eb)
libz.so.1 => /usr/lib/libz.so.1 (0xb7e9d000)
libssl.so.0.9.7 => /usr/lib/i686/cmov/libssl.so.0.9.7 (0xb7e6c000)
libcrypto.so.0.9.7 => /usr/lib/i686/cmov/libcrypto.so.0.9.7
(0xb7d6d000)
libdl.so.2 => /lib/tls/libdl.so.2 (0xb7d69000)
libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0xb7d54000)
libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0xb7d1e000)
liblber.so.2 => /usr/lib/liblber.so.2 (0xb7d1)
libdb-4.2.so => /usr/lib/libdb-4.2.so (0xb7c3a000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7c1a000)
libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0xb7bf9000)
librt.so.1 => /lib/tls/librt.so.1 (0xb7bf1000)
libm.so.6 => /lib/tls/libm.so.6 (0xb7bcb000)
libnsl.so.1 => /lib/tls/libnsl.so.1 (0xb7bb4000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7ba2000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7a6a000)
/lib/ld-linux.so.2 (0xb7ef3000)
libresolv.so.2 => /lib/tls/libresolv.so.2 (0xb7a57000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7a42000)
libgnutls.so.11 => /usr/lib/libgnutls.so.11 (0xb79da000)
libtasn1.so.2 => /usr/lib/libtasn1.so.2 (0xb79ca000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb797d000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb7979000)


*** (apr|apu)-config linking info

 -L/usr/lib -laprutil-0 -lldap -llber -ldb-4.2 -lexpat
 -L/usr/lib -lapr-0 -lrt -lm -lnsl  -lpthread



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
  Platform:
osname=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi
uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004 i686
gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.7
-Dsitearch=/usr/local/lib/perl/5.8.7 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.7 -Dd_dosuid -des'
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='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_

Re: [mp2] Directive changes the command nam

2005-11-09 Thread Philippe M. Chiasson
pradeep kumar wrote:
> I tried to read the whole of  argv and push it in
> modperl_config_srv_argv_push(). But what I can get only upto
> "/app/apache/bin/httpd -d /app/apache" and not the whole of
> "/app/apache/bin/httpd  -d /app/apache -k start". I tried to print
> argv[3] which just gave me null. How can I get the rest of the arguments.

Not sure I follow exactly what you are saying, but please, post whatever
code you have, it's usually much better than trying to explain code (a diff
would be great)

But once again, like I said, we are being bitten by too much magic here, and
especially on HP-UX, it might not even be possible to reset the process full
command name + command arguments at all.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Urgency: 1-Extreme

2005-11-09 Thread Mike T

Urgency: 1-Extreme
 When I restart apache I get
 
 Perl Parser: Inappropriate ioctl for device
 
 I have to restart the server to get apache to restart.
 I have narrowed it down by removing mods on at a time. When I remove the modperl after the error happens I do not have to reboot the server.  
RedHat Enterprise Linux 4
MServer version: Apache/2.0.52
Server built: Jul 7 2005 13:08:18
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with
-D APACHE_MPM_DIR=3D"server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -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=3D"/etc/httpd"

-D SUEXEC_BIN=3D"/usr/sbin/suexec"
-D DEFAULT_PIDLOG=3D"logs/httpd.pid"
-D DEFAULT_SCOREBOARD=3D"logs/apache_runtime_status"
-D DEFAULT_LOCKFILE=3D"logs/accept.lock"
-D DEFAULT_ERRORLOG=3D"logs/error_log"
-D AP_TYPES_CONFIG_FILE=3D"conf/mime.types"
-D SERVER_CONFIG_FILE=3D"conf/httpd.conf"
- Show quoted text -
 DSO-
This is the mod that is giving me trouble. 
LoadModule perl_module modules/mod_perl.so 
LoadModule access_module modules/mod_access.so LoadModule auth_module modules/mod_auth.so LoadModule auth_anon_module modules/mod_auth_anon.so #LoadModule auth_dbm_module modules/mod_auth_dbm.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule ldap_module modules/mod_ldap.so #LoadModule auth_ldap_module modules/mod_auth_ldap.so LoadModule include_module modules/mod_include.so LoadModule log_config_module modules/mod_log_config.so LoadModule env_module modules/mod_env.so LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so LoadModule usertrack_module modules/mod_usertrack.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule mime_module modules/mod_mime.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule asis_module modules/mod_asis.so LoadModule info_module modules/mod_info.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so #LoadModule imap_module modules/mod_imap.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule cache_module modules/mod_cache.so LoadModule suexec_module modules/mod_suexec.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

 When I do a strace and this is what I get
 getuid32() =3D 0
geteuid32() =3D 0
getgid32() =3D 0
getegid32() =3D 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) =3D 5 fstat64(5, {st_mode=3DS_IFREG|0644, st_size=3D39554544, ...}) =3D 0 mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 5, 0) =3D 0xb7df1000
close(5) =3D 0
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =3D 0xb7dd
time([1131377022]) =3D 1131377022
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}=
)
=3D 0
_llseek(0, 0, 0xbfec8b90, SEEK_CUR) =3D -1 ESPIPE (Illegal seek) ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}=
)
=3D 0
_llseek(1, 0, 0xbfec8b90, SEEK_CUR) =3D -1 ESPIPE (Illegal seek) ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}=
)
=3D 0
_llseek(2, 0, 0xbfec8b90, SEEK_CUR) =3D -1 ESPIPE (Illegal seek) open("/dev/null", O_RDONLY|O_LARGEFILE) =3D 5 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfec8c28) =3D -1 ENOTTY (Inappropriate ioctl for device) _llseek(5, 0, [0], SEEK_CUR) =3D 0 fcntl64(5, F_SETFD, FD_CLOEXEC) =3D 0 fstat64(5, {st_mode=3DS_IFCHR|S_ISGID|0666, st_rdev=3Dmakedev(1, 3), ...}) = =3D 0 write(2, "Setuid script not plain file\n", 29) =3D 29

dup(2) =3D 7
fcntl64(7, F_GETFL) =3D 0x8002 (flags O_RDWR|O_LARGEFILE) fstat64(7, {st_mode=3DS_IFCHR|0620, st_rdev=3Dmakedev(136, 0), ...}) =3D 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = =3D 0xb7dcf000 _llseek(7, 0, 0xbfec8a80, SEEK_CUR) =3D -1 ESPIPE (Illegal seek) open("/usr/share/locale/locale.alias", O_RDONLY) =3D 8 fstat64(8,

Re: ImageMagick

2005-11-09 Thread Len Kranendonk
> 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.



Re: ImageMagick

2005-11-09 Thread Philip M. Gollucci

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
+++ MakefileWed Nov  9 17:40:03 2005
@@ -52,7 +52,7 @@
 .include 

 .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
+++ MakefileWed 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
+++ MakefileWed 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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com


Re: ImageMagick

2005-11-09 Thread Philip M. Gollucci

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 ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com