You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by te...@blackhole.acon.nl on 2001/09/28 15:19:22 UTC

axkit segfaults






I used the an test.xml from  example taken from axkit.org



Installed most components  


kampen@eureka:~/down/cpan/AxKit-1.4 > perl Makefile.PL 
checking for module mod_perl >= version 1.17... yes
checking for module XML::Parser >= version 2.27... yes
checking for module Digest::MD5 >= version 2.09... yes
checking for module Compress::Zlib >= version 0... yes
checking for module Error >= version 0.13... yes
checking for module Apache::Request >= version 0.31_03... yes
checking for module XML::XPath >= version 1.00... yes
checking for module Storable >= version 0.7... yes
checking for module HTTP::GHTTP >= version 1.00... yes
checking for module XML::Sablotron >= version 0.40... yes
checking for module XML::LibXSLT >= version 0.99... yes
running xml2-config... ok
checking for main() in -lxml2... yes
checking for iconv() in -liconv... no
checking for libiconv() in -liconv... no
checking for iconv() in -lc... yes
checking if iconv() param 2 is const... no
Writing Makefile for Apache::AxKit::CharsetConv
Writing Makefile for Apache::MimeXML
Writing Makefile for AxKit
kampen@eureka:~/down/cpan/AxKit-1.4 > 


This are ther other modules:

[Fri Sep 28 12:34:55 2001] [notice] Apache/1.3.20 (Unix) AxKit/1.4
mod_perl/1.26 mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 configured --
resuming normal operations
[Fri Sep 28 12:34:55 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/local/apache/bin/suexec)


static build

eureka:/w20/bin # ./httpd  -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_so.c
  mod_setenvif.c
  mod_ssl.c<<<<<<<<<<<<<<<<
  mod_perl.c<<<<<<<<<<<<<<<
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec
eureka:/w20/bin # 


Doing strace on httpd://eureka.acon.nl/xmltest/test.xml

eureka:/w20/bin # ps ax |grep httpd
24650 pts/1    S      0:01 ./httpd -X
eureka:/w20/bin # strace -p 24650
accept(16, 
...........................................

getcwd("/usr/local/apache/htdocs/xmltest", 1024) = 33
brk(0x86eb000)                          = 0x86eb000
read(4, "", 4096)                       = 0
read(4, "", 4096)                       = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
close(4)                                = 0
munmap(0x40018000, 4096)                = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat64("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("./Apache/Axkit/Language/XPathScript.pmc", 0xbffff29c) = -1 ENOENT
(No such file or directory)
open("./Apache/Axkit/Language/XPathScript.pm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
stat64("/usr/local/apache//Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache//Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat64("/usr/local/apache/htdocs/xmltest/test.xml", {st_mode=S_IFREG|0644,
st_size=462, ...}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat64("/usr/local/apache/htdocs/xmltest/.xmlstyle_cache",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/local/apache/htdocs/xmltest/.xmlstyle_cache/a5b1f4f6dae41b93ac41e8a22c7d9db4",
0x826f440) = -1 ENOENT (No such file or directory)
brk(0x86ee000)                          = 0x86ee000
stat64("/usr/local/apache/htdocs/xmltest/test.xps", {st_mode=S_IFREG|0755,
st_size=614, ...}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
brk(0x86ef000)                          = 0x86ef000
stat64("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/5.6.0/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/site_perl/Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("./Apache/Axkit/Language/XPathScript.pmc", 0xbffff29c) = -1 ENOENT
(No such file or directory)
open("./Apache/Axkit/Language/XPathScript.pm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
stat64("/usr/local/apache//Apache/Axkit/Language/XPathScript.pmc",
0xbffff29c) = -1 ENOENT (No such file or directory)
open("/usr/local/apache//Apache/Axkit/Language/XPathScript.pm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) ---
eureka:/w20/bin # 


Doing locate (after updatedb) , it should be there :

eureka:/w20/bin # locate XPathScript
/home/kampen/down/cpan/AxKit-1.4/blib/lib/Apache/AxKit/Language/XPathScript.pm
/home/kampen/down/cpan/AxKit-1.4/blib/man3/Apache::AxKit::Language::XPathScript.3pm
/home/kampen/down/cpan/AxKit-1.4/lib/Apache/AxKit/Language/XPathScript.pm
/usr/lib/perl5/site_perl/5.6.0/i586-linux/Apache/AxKit/Language/XPathScript.pm
/usr/share/man/man3/Apache::AxKit::Language::XPathScript.3pm
/var/cache/man/cat3/Apache::AxKit::Language::XPathScript.3pm.gz
eureka:/w20/bin # 


Maybe its a wrong configuration?

Startup.pl
#!/usr/bin/perl

#modify the include path before we do anything
BEGIN {
        use Apache ();
        use lib Apache->server_root_relative('lib/perl');
}

#commonly used modules
use Apache::Registry ();
use Apache::Constants ();
use CGI qw(-compile :all);
#use CGI::Carp ();
#use DBI ();

#put any other common modules here
#use Apache::DBI ();
#use Apache::Server ();
#use LWP ();
#use DB_File ();
1;

httpd.conf:

PerlRequire             conf/startup.pl
PerlFreshRestart        On
PerlPostReadRequestHandler 'sub { Apache->request(shift) } '

#PerlTransHandler       My::Proxy
PerlInitHandler         Apache::Reload
PerlSetVar              ReloadAll Off

alias /perl/ /usr/local/apache/perl/
<Location /perl/>
sethandler      perl-script
perlhandler     Apache::Registry
perlsendheader  On
options         +ExecCGI
</Location>



PerlModule      AxKit
<Location /xmltest>
        SetHandler      perl-script
        PerlHandler     AxKit
        AxAddStyleMap   application/x-xpathscript \
	Apache::Axkit::Language::XPathScript
</Location>


These are the testing files - example taken from axkit.org
( only reachable by ip number still? 217.158.50.178 If this is a big
issue, I'm willing to offer dns service for this site in return)


eureka:/w20/htdocs/xmltest # less test.xml 
<?xml version="1.0"?>
<?xml-stylesheet href="test.xps" type="application/x-xpathscript"?>
<dromedaries>
    <species name="Camel">
      <humps>1 or 2</humps>
      <disposition>Cranky</disposition>
    </species>
    <species name="Llama">
      <humps>1 (sort of)</humps>
      <disposition>Aloof</disposition>
    </species>
    <species name="Alpaca">
      <humps>(see Llama)</humps>
      <disposition>Friendly</disposition>
    </species>
</dromedaries>

test.xml lines 1-17/17 (END) 


eureka:/w20/htdocs/xmltest # less test.xps 
<%
$t->{'humps'}{'pre'} = "<td>";
$t->{'humps'}{'post'} = "</td>";
$t->{'disposition'}{'pre'} = "<td>";
$t->{'disposition'}{'post'} = "</td>";
$t->{'species'}{testcode} = sub {
    my $node = shift;
    my $t = shift;
    $t->{pre} = '<tr><td>' . findvalue('@name', $node) . '</td>';
    $t->{post} = "</tr>";
    return 1;
}
%>

<html>
<head>
        <title>Know Your Dromedaries</title>
</head>
<body bgcolor="white">
    <table bgcolor="eeeeee" border="1">
    <tr><th>Species</th><th>No. of Humps</th><th>Disposition</th></tr>

    <%= apply_templates('/dromedaries/species') %>

    </table>
</body>
</html>

test.xps lines 1-28/28 (END) 




Clues as to what I'm doing wrong here?


Arnold van Kmapen


Re: axkit segfaults

Posted by Robin Berjon <ro...@knowscape.com>.
On Sunday 30 September 2001 18:20, test@blackhole.acon.nl wrote:
> I read th FAQ but no succes:
>
> kampen@eureka:/w20/htdocs/xmltest > strings /w20/bin/httpd  |grep -i XML
> kampen@eureka:/w20/htdocs/xmltest >
>
> I removed ssl and php4  from the build and only concentrated on modperl
> 1.26 and apache 1.3.20:

Last ditch effort: instead of PerlModule AxKit (or whatever you may be using 
that isn't the following) try have a use AxKit in your startup.pl (before any 
AxKit directives come in. Or alternatively, delete use UNIVERSAL from 
AxKit.pm.

If it is this specific problem, then we'd all appreciate detailed config as 
it occurs quite rarely and iirc is still a mind-boggling problem.

-- 
_______________________________________________________________________
Robin Berjon <ro...@knowscape.com> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
"Chance is irrelevant. We will succeed." 
-- 7o9


Re: axkit segfaults

Posted by te...@blackhole.acon.nl.


I read th FAQ but no succes:



kampen@eureka:/w20/htdocs/xmltest > strings /w20/bin/httpd  |grep -i XML
kampen@eureka:/w20/htdocs/xmltest > 


I removed ssl and php4  from the build and only concentrated on modperl
1.26 and apache 1.3.20:
[Sun Sep 30 18:06:32 2001] [notice] Apache/1.3.20 (Unix) AxKit/1.4
mod_perl/1.26 configured -- resuming normal operations






(gdb) run -X
Starting program: /w20/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x80c476f in Perl_gv_init ()
(gdb) bt
#0  0x80c476f in Perl_gv_init ()
#1  0x80c4a4b in Perl_gv_fetchmeth ()
#2  0x80c4ee8 in Perl_gv_fetchmethod_autoload ()
#3  0x80c4e08 in Perl_gv_fetchmethod ()
#4  0x8108ced in Perl_sv_clear ()
#5  0x810935e in Perl_sv_free ()
#6  0x811a086 in Perl_free_tmps ()
#7  0x80c1827 in perl_eval_sv ()
#8  0x808cf7e in perl_require_module ()
#9  0x402e9a8f in XS_AxKit_load_module () from
/usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/AxKit/AxKit.so
#10 0x81030cd in Perl_pp_entersub ()
#11 0x80fdc80 in Perl_runops_standard ()
#12 0x80c158a in S_call_body ()
#13 0x80c1351 in perl_call_sv ()
#14 0x8087651 in perl_call_handler ()
#15 0x8086f2c in perl_run_stacked_handlers ()
#16 0x80859a4 in perl_handler ()
#17 0x8093019 in ap_invoke_handler ()
#18 0x80a85ef in process_request_internal ()
#19 0x80a8662 in ap_process_request ()
#20 0x809f296 in child_main ()
#21 0x809f455 in make_child ()
#22 0x809f5d6 in startup_children ()
#23 0x809fc5c in standalone_main ()
#24 0x80a048c in main ()
#25 0x400b4baf in __libc_start_main () from /lib/libc.so.6
(gdb) quit
The program is running.  Exit anyway? (y or n) y




I first tried the installation that was mentioned in the AxKit INSTALL
file. After that I tried building building it again in two steps with the
PREP command. In all cases the gdb bt looks quite similar. Each time  I
did new untar's on modperl and apache  tarballs.



kampen@eureka:~/down/modperl/mod_perl-1.26 > less arnold 
#!/bin/bash

perl Makefile.PL \
        EVERYTHING=1 \
        USE_APACI=1 \
        DYNAMIC=1 \
        APACHE_PREFIX=/usr/local/apache \
        APACHE_SRC=../../httpd/apache_1.3.20/src  \
        DO_HTTPD=1 \
        PREP_HTTPD=1 

$ make
# make install


kampen@eureka:~/down/httpd/apache_1.3.20 > less arnold 
#!/bin/bash

SSL_BASE=/usr/local/ssl
./configure \
        --prefix=/usr/local/apache \
        --enable-module=rewrite \
        --enable-shared=rewrite \
        --activate-module=src/modules/perl/libperl.a \
        --enable-module=perl \
        --enable-module=rewrite \
        --enable-module=proxy \
        --disable-rule=expat \
        --enable-suexec \
        --suexec-uidmin=65534 \
        --suexec-gidmin=65534 
        
$ make
# make install





Arnold van kampen






On Fri, 28 Sep 2001, Robin Berjon wrote:

> On Friday 28 September 2001 15:19, test@blackhole.acon.nl wrote:
> > I used the an test.xml from  example taken from axkit.org
> 
> You don't mention having checked you don't have expat compiled in. Quoting 
> from the FAQ:
> 
> "First of all, to find out if this is your problem, execute the command: 
> strings /path/to/apache/bin/httpd | grep -i XML. If there are any results at 
> all then you are going to see these segfaults until you recompile Apache (and 
> probably mod_perl too)"
> 
> -- 
> _______________________________________________________________________
> Robin Berjon <ro...@knowscape.com> -- CTO
> k n o w s c a p e : // venture knowledge agency www.knowscape.com
> -----------------------------------------------------------------------
> Learn from your parents mistakes - use birth control. 
> 


Re: axkit segfaults

Posted by Robin Berjon <ro...@knowscape.com>.
On Friday 28 September 2001 15:19, test@blackhole.acon.nl wrote:
> I used the an test.xml from  example taken from axkit.org

You don't mention having checked you don't have expat compiled in. Quoting 
from the FAQ:

"First of all, to find out if this is your problem, execute the command: 
strings /path/to/apache/bin/httpd | grep -i XML. If there are any results at 
all then you are going to see these segfaults until you recompile Apache (and 
probably mod_perl too)"

-- 
_______________________________________________________________________
Robin Berjon <ro...@knowscape.com> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
Learn from your parents mistakes - use birth control.