httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taneli Saastamoinen <tsaas...@cs.Helsinki.FI>
Subject [users@httpd] Apache 1.3.29 + Rivet 0.3: segfault
Date Wed, 18 Feb 2004 19:51:57 GMT

Hi, I'm using Apache 1.3.29 and Rivet 0.3.0. Both are self-compiled with
gcc 2.95.4 (Debian stable).

The problem is that Rivet causes a seg fault when I try to use the
"parse" command, as in:

------
lobotomy:~/w/root$ cat test.rvt 
<?
parse [file join [file dirname [info script]] test-inc.rvt]
puts "<h1>index, still in code</h1>"
?>
<h1>index, not in code</h1>

lobotomy:~/w/root$ cat test-inc.rvt 
<h1>begin header</h1>
<?
puts "<h1>code in header</h1>"
?>
<h1>end header</h1>

lobotomy:~/w/root$ 
------

This produces:

------
<h1>begin header</h1>
<h1>code in header</h1>

<h1>end header</h1>
------

And:

------
lobotomy:~/kama/apache-install/bin$ tail -1 ../logs/error_log 
[Wed Feb 18 21:32:49 2004] [notice] child pid 21881 exit signal Segmentation fault (11)
lobotomy:~/kama/apache-install/bin$ 
------

When I try to run "gdb ./httpd", then "run -X", then hit the page, I get
this:

------
lobotomy:~/kama/apache-install/bin$ gdb ./httpd 
GNU gdb 2002-04-01-cvs
Copyright 2002 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-linux"...
(gdb) run -X
Starting program: /home/lobotomy/kama/apache-install/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x080fd444 in ?? ()
Cannot access memory at address 0x203040
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0x080fd444 in ?? ()
Cannot access memory at address 0x203040
(gdb) backtrace full
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0x080fd444 in ?? ()
No symbol table info available.
Cannot access memory at address 0x203040
(gdb) 
------

Apache and Rivet should both be compiled with debugging symbols; I used
CC="gcc -g" ./configure --prefix=/home/lobotomy/kama/apache-install with
Apache and included -enable-symbols in the configure options with Rivet.
Neither binary (bin/httpd and libexec/mod_rivet.so) is stripped, and
both have a lengthy list of symbols when I look at them with "nm -a".

When I use gdb to set a breakpoint at ap_process_request, then "run -X",
then hit the page, then use "s" to step forward (several hundred times),
I get the following right before the seg fault:

------
ap_invoke_handler (r=0x80fc4fc) at http_config.c:495
495         int result = HTTP_INTERNAL_SERVER_ERROR;
(gdb) 
497         if (r->handler) {
(gdb) 
502             handler = r->content_type ? r->content_type : 
ap_default_type(r);
(gdb) 
503             if ((p = strchr(handler, ';')) != NULL) { /* MIME type 
arguments */
(gdb) 
509                 handler_len = strlen(handler);
(gdb) 
515         for (handp = handlers; handp->hr.content_type; ++handp) {
(gdb) 
516             if (handler_len == handp->len
(gdb) 
518                 result = (*handp->hr.handler) (r);
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x080fd424 in ?? ()
Cannot access memory at address 0x203040
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0x080fd424 in ?? ()
Cannot access memory at address 0x203040
(gdb) 
------

So it seems that Rivet is causing Apache to crash somehow with the parse
command?

I asked David Welton (Rivet developer) about it, and he told me it works
fine with him ... I don't know why the backtrace doesn't work better, so
this is approximately all the info I have about this.

It might be that this is only a configuration issue or whatever, but I
haven't had any success with tweaking any config files, or anything else
for that matter. Any ideas appreciated...

-- 
Spiritual eclipse
The gateways are closed for me to seek


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message