You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/06/24 10:33:56 UTC

DO NOT REPLY [Bug 10169] New: - Apache seg faults due to attempt to access out of bounds address from hash_buckets[] array

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10169

Apache seg faults due to attempt to access out of bounds address from hash_buckets[] array

           Summary: Apache seg faults due to attempt to access out of bounds
                    address from hash_buckets[] array
           Product: Apache httpd-1.3
           Version: HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_mime
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: supra@netvision.net.il
                CC: supra@netvision.net.il


Here is my compilation procedure of apache-1.3.26:
-----------------------------------------------------------------------
gzip -dc openssl-0.9.6d.tar.gz | tar xvf -
cd openssl-0.9.6d
./config --prefix=/usr/local --openssldir=/usr/local/openssl
make
make install
cd ..
gzip -dc apache_1.3.26.tar.gz | tar xvf -
gzip -dc mod_auth_mysql-2.20.tar.gz | tar xvf -
gzip -dc php-4.2.1.tar.gz | tar xvf -
gzip -dc mod_ssl-2.8.9-1.3.26.tar.gz | tar xvf -
cd apache_1.3.26
./configure
cd ../php-4.2.1
./configure --with-mysql --with-apache=../apache_1.3.26 --enable-track-vars
make
make install
cd ../mod_auth_mysql-2.20
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.26
make install
cd ../mod_ssl-2.8.9-1.3.26
./configure --with-apache=../apache_1.3.26 --with-ssl=../openssl-0.9.6d
cd ../apache_1.3.26
setenv OPTIM " -g -ggdb "
./configure --prefix=/usr/local/apache-ssl --activate-
module=src/modules/php4/libphp4.a --activate-
module=src/modules/auth_mysql/libauth_mysql.a --enable-module=ssl
make
make install
cd ..
cd apache_1.3.26/src
make certificate
-----------------------------------------------------------------------

Everything goes ok (except for a rule on alloc.h in 
src/modules/auth_mysql/Makefile, that could be resolved by simple comment out)

The problem appears when apache runs. Childs dying when trying to get *.gif 
files (for example).
When debugging the apache (with �X) I see that there is a moment when static 
hash_buckets[] array from mod_mime.c gets overwritten. Here is an example:

(gdb) p hash_buckets	// This is after init_mime()
$4 =   {0x82ccb54,
  0x82ccbbc,
  0x82ccc24,
  0x82ccc8c,
  0x82cccf4,
  0x82ccd5c,
  0x82ccdc4,
  0x82cce2c,
  0x82cce94,
  0x82ccefc,
  0x82ccf64,
  0x82ccfcc,
  0x82cd034,
  0x82cd09c,
  0x82cd104,
  0x82cd16c,
  0x82cd1d4,
  0x82cd23c,
  0x82cd2a4,
  0x8305eb4,
  0x8305f1c,
  0x8305f84,
  0x8305fec,
  0x8306054,
  0x83060bc,
  0x8306124,
  0x830618c,
  0x83061f4,
  0x830625c,
  0x83062c4,
  0x830632c,
  0x8306394}
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x814ae03 in ap_table_get (t=0x6b2b587a, key=0x8309dec "gif") at alloc.c:1479
1473        table_entry *elts = (table_entry *) t->a.elts;
(gdb) where
#0  0x814ae03 in ap_table_get (t=0x2956574b, key=0x8309d94 "gif")
    at alloc.c:1473
#1  0x807f5e8 in find_ct (r=0x8307e9c) at mod_mime.c:656
#2  0x814eae4 in run_method (r=0x8307e9c, offset=17, run_all=0)
    at http_config.c:369
#3  0x814eb88 in ap_find_types (r=0x8307e9c) at http_config.c:391
#4  0x8163c0d in process_request_internal (r=0x8307e9c) at http_request.c:1297
#5  0x8163ccc in ap_process_request (r=0x8307e9c) at http_request.c:1324
#6  0x815adce in child_main (child_num_arg=0) at http_main.c:4681
#7  0x815af80 in make_child (s=0x82a09ec, slot=0, now=1024906769)
    at http_main.c:4805
#8  0x815b0d9 in startup_children (number_to_start=5) at http_main.c:4887
#9  0x815b736 in standalone_main (argc=4, argv=0xbffffa24) at http_main.c:5195
#10 0x815bf13 in main (argc=4, argv=0xbffffa24) at http_main.c:5558
(gdb) p hash_buckets	// This is when trying to get .gif file
$5 =   {0x0,
  0x0,
  0x0,
  0x0,
  0x0,
  0x0,
  0x0,
  0x6b2b587a,
  0x62216a5c,
  0x0,
  0x8261934,
  0x0,
  0x82cd234,
  0x82cd29c,
  0x8305eb4,
  0x8305f1c,
  0x8305f84,
  0x8305fec,
  0x8306054,
  0x83060bc,
  0x8306124,
  0x830618c,
  0x83061f4,
  0x830625c,
  0x83062c4,
  0x830632c,
  0x8306394,
  0x83063fc,
  0x8306464,
  0x83064cc,
  0x8306534,
  0x830659c}
(gdb) 

The strange thing is that it doesn't happen all the time. Please help.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org