[mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-11 Thread Alexander Hartmaier


Hi!

1. Problem Description:

My apache child crash with a segfault when I call a page which generates a graph
using the perl module GD::Graph.

My system specs are:

Fedora Core 1
httpd-2.0.47 (from fedora, also tried with self-compiled 2.0.48)
mod_perl-1.99_11 (the final version, self-compiled)
embperl-2.0b10 (current cvs snapshot, self-compiled)
perl-5.8.1 (from fedora, also tried with self-compiled 5.8.2)
gd-2.0.15 (from fedora, also tried with self-compiled 2.0.15)
freetype-2.1.4 (from fedora, also tried with self-compiled 2.1.5)

All perl modules are the newest version from CPAN.

The reported versions are my current state:
httpd from fedora, everything else self-compiled.

2. Used Components and their Configuration:

*** mod_perl version 1.9911

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS=> /usr/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME => mod_perl
  MP_USE_DSO => 1
  MP_USE_STATIC  => 1

*** /usr/sbin/httpd -V
Server version: Apache/2.0.47
Server built:   Oct 23 2003 06:48:44
Server's Module Magic Number: 20020903:4
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 (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="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/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/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
osname=linux, osvers=2.4.22-1.2115.nptl, archname=i686-linux
uname='linux nac1.mon.dsh.at 2.4.22-1.2115.nptl #1 wed oct 29 15:31:21 est
2003 i686 athlon i386 gnulinux '
config_args='-de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O3',
cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.3.2 20031022 (Red Hat Linux 3.3.2-1)',
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='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.2'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Nov 11 2003 12:52:54
  %ENV:
PERL_LWP_USE_HTTP_10="1"
  @INC:
/usr/local/lib/perl5/5.8.2/i686-linux
/usr/local/lib/perl5/5.8.2
/usr/local/lib/perl5/site_perl/5.8.2/i686-linux
/usr/local/lib/perl5/site_perl/5.8.2
/usr/local/lib/perl5/site_perl
.


3. This is the core dump trace: (if you get a core dump):

I tried but I can't catch any (I don't know and didn't manage to find out which
directory has to be writeable for the apache2 process under Embperl).

This report was generated by t/REPORT on Tue Nov 11 13:00:29 2003 GMT.



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-13 Thread Alexander Hartmaier


No I don't know...the embperl page calls another embperl page which generates
the graph and returns the link to the graph as html  tag

Thanks, Alex




Von:  Randy Kobes <[EMAIL PROTECTED]> am 13.11.2003 05:48



An:   Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED]
Kopie:[EMAIL PROTECTED]

Thema:Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

On Tue, 11 Nov 2003, Alexander Hartmaier wrote:

> Hi!
>
> 1. Problem Description:
>
> My apache child crash with a segfault when I call a page
> which generates a graph using the perl module GD::Graph.
>
> My system specs are:
>
> Fedora Core 1
> httpd-2.0.47 (from fedora, also tried with self-compiled 2.0.48)
> mod_perl-1.99_11 (the final version, self-compiled)
> embperl-2.0b10 (current cvs snapshot, self-compiled)
> perl-5.8.1 (from fedora, also tried with self-compiled 5.8.2)
> gd-2.0.15 (from fedora, also tried with self-compiled 2.0.15)
> freetype-2.1.4 (from fedora, also tried with self-compiled 2.1.5)
>
> All perl modules are the newest version from CPAN.

Do you know if an anlagous page outside of Embperl, using
either ModPerl::Registry or a mod_perl content handler, also
segfaults with GD::Graph?

--
best regards,
randy kobes
*1*




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-13 Thread Alexander Hartmaier


Thats the output I got:

Program received signal SIGSEGV, Segmentation fault.
0x006bc582 in ?? ()
(gdb)
(gdb)
(gdb) BT
#0  0x006bc582 in ?? ()
#1  0x00603c44 in ?? ()
#2  0x0106 in ?? ()
#3  0x005d4aa6 in ?? ()
#4  0x010a6940 in ?? ()
#5  0x0ab5c5bc in ?? ()
#6  0x41414141 in ?? ()
#7  0xbfe6e9a8 in ?? ()
#8  0x00fdebdd in ?? ()
#9  0x41414141 in ?? ()
#10 0x0a8be838 in ?? ()
#11 0x006039e4 in ?? ()
#12 0x0ab5c5bc in ?? ()
#13 0x0aa8d29c in ?? ()
#14 0xbfe6e9c8 in ?? ()
#15 0x005e2493 in ?? ()
#16 0x0ab5c5bc in ?? ()
#17 0x004c1410 in ?? ()
#18 0x0a8be838 in ?? ()

Is THIS really useful?

Should I compile with debugging symbols?
If yes what? apache or mod_perl? or embperl?

Thanks, Alex




Von:  Gerald Richter <[EMAIL PROTECTED]> am 12.11.2003 07:55



An:   Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], [EMAIL PROTECTED]
Kopie:[EMAIL PROTECTED]

Thema:Re: [mp2] segfault when generating graphs with GD::Graph under Embperl


>
> 3. This is the core dump trace: (if you get a core dump):
>
> I tried but I can't catch any (I don't know and didn't manage to find out
which
> directory has to be writeable for the apache2 process under Embperl).
>


Please try to start your httpd under gdb:

gdb /path/to/httpd
set args -X -f /path/to/httpd.conf
r

Now request the page that segfaults, gdb should show the segfault, then type

BT

and you should get the backtrace.

Gerald

P.S. -X tell Apache to only start one process, which is better for debugging

*2*




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-13 Thread Alexander Hartmaier


compiled mod_perl and embperl with debugging option.
output is this:

# gdb /usr/sbin/httpd
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 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-redhat-linux-gnu"...(no debugging symbols
found)...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb)  set args -X
(gdb) r
Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x002a9582 in ?? ()
(gdb) BT
#0  0x002a9582 in ?? ()
#1  0x009d5c44 in ?? ()
#2  0x0106 in ?? ()
#3  0x009a6aa6 in ?? ()
#4  0x005e3940 in ?? ()
#5  0x09f72cf4 in ?? ()
(gdb)

Doesn't look like a better output than without debugging option...
I never did this before. Is something missing?

THX Alex





Von:  Gerald Richter <[EMAIL PROTECTED]> am 13.11.2003 15:44



An:   Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED]
Kopie:[EMAIL PROTECTED], [EMAIL PROTECTED]

Thema:Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph
  under Embperl

>
> Should I compile with debugging symbols?

Yes

> If yes what? apache or mod_perl? or embperl?
>

mod_perl and Embperl

For Embperl do

perl Makefile.PL debug

I don't have in mind the Makefile.PL flag for mod_perl, but you surly find
it in the docs :-)

Gerald


> Thanks, Alex
>
>
>
>
> Von:  Gerald Richter <[EMAIL PROTECTED]> am 12.11.2003 07:55
>
>
>
> An:   Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED],
> [EMAIL PROTECTED]
> Kopie:[EMAIL PROTECTED]
>
> Thema:Re: [mp2] segfault when generating graphs with GD::Graph
> under Embperl
>
>
>>
>> 3. This is the core dump trace: (if you get a core dump):
>>
>> I tried but I can't catch any (I don't know and didn't manage to
>> find out which directory has to be writeable for the apache2 process
>> under Embperl).
>>
>
>
> Please try to start your httpd under gdb:
>
> gdb /path/to/httpd
> set args -X -f /path/to/httpd.conf
> r
>
> Now request the page that segfaults, gdb should show the segfault,
> then type
>
> BT
>
> and you should get the backtrace.
>
> Gerald
>
> P.S. -X tell Apache to only start one process, which is better for
> debugging
>
> *2*

--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-

*1*




--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-14 Thread Alexander Hartmaier


Hi Guys!

Another day, another try...another segfault ;-(

(gdb) run -X
Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x00e89582 in ?? ()
(gdb)
(gdb)
(gdb) BT
#0  0x00e89582 in ?? ()
#1  0x006e8c44 in ?? ()
#2  0x0106 in ?? ()
#3  0x006b9aa6 in ?? ()
#4  0x00508940 in ?? ()
#5  0x09c59c74 in ?? ()
#6  0x41414141 in ?? ()
#7  0xbff90488 in ?? ()
#8  0x00440bdd in ?? ()
#9  0x41414141 in ?? ()
#10 0x0968542c in ?? ()
#11 0x006e89e4 in ?? ()
#12 0x09c59c74 in ?? ()
#13 0x09b89b40 in ?? ()
#14 0xbff904a8 in ?? ()
#15 0x006c7493 in ?? ()
#16 0x09c59c74 in ?? ()
#17 0x00d3a410 in ?? ()
#18 0x0968542c in ?? ()

I rewrote the smaller one of the graph-generating epl's as perl code.

This is how i call the embperl page:

[-
  Execute('../call/flow-graph.epl', "$date", "src");
  Execute('../call/flow-graph.epl', "$date", "dest");
-]

And this the mod_perl way:

[-
  Execute({inputfile => '../call/flow-graph.pl', syntax => 'Perl', param =>
["$date", 'src']});
  Execute({inputfile => '../call/flow-graph.pl', syntax => 'Perl', param =>
["$date", 'dest']});
-]

Both lead to a segfault.

BUT:

If i call flow-graph.pl directly from the browser the page works!!!

@Martien: I forwarded the mail to you too because maybe you know something about
the problem as it occurs only with your GD::Graph module.

Thanks, Alex





Von:  Stas Bekman <[EMAIL PROTECTED]> am 13.11.2003 22:41



An:   Gerald Richter <[EMAIL PROTECTED]>
Kopie:Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], [EMAIL PROTECTED],
  [EMAIL PROTECTED]

Thema:Re: Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs
  with GD::Graph under Embperl

Gerald Richter wrote:
> Hi Stas,
>
>>There is an easy way to work around it. Run the program under gdb and
>>it'll remember the trace even the memory (frames) gets corrupted.
>>
>>gdb /path/to/httpd
>>gdb> run -X
>>issue a request here and gdb will tell you that you've got a segfault
>> bt
>>will give you the trace.
>>
>
>
> This is excatly what we have done and which gives the above trace with does
> not contain any usefull informations ...

Sorry, Gerald. I've missed that detail then.

In which case you need to try to manually step through guessing some
breakpoints where things could go wrong.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

*2*




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

2003-11-14 Thread Alexander Hartmaier


snip from httpd.conf:


SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI


Yours sincerly
Alexander Hartmaier

T-Systems

T-Systems Austria
TCS/Network Monitoring & Security Specialist
address: Hofmühlgasse 3-5, 1060 Wien
telephone: +43 (0)57057 - 4320
fax: +43 (0)57057 - 4152
mobile: +43 (0)676 8642 - 4320
mail: [EMAIL PROTECTED]
Internet: http://www.t-systems.at




Von:  Gerald Richter <[EMAIL PROTECTED]> am 14.11.2003 12:38



An:   Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], Stas Bekman <[EMAIL 
PROTECTED]>,
  [EMAIL PROTECTED]
Kopie:[EMAIL PROTECTED], [EMAIL PROTECTED]

Thema:Re: [mp2] segfault when generating graphs with GD::Graph under Embperl

>
> If i call flow-graph.pl directly from the browser the page works!!!
>
How is the file run when you call it directly, as CGI or via
Apache::Registry ?

Gerald

--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-

*2*




--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html