Apache childs segfault when using phplib with php with mysql with apache with redhat 6...
| From: | Brandeis Alumni Relations Webmaster | Date: | Wed, 09 Jun 1999 18:37:49 +0000 |
| Subject: | Apache childs segfault when using phplib with php with mysql with apache with redhat 6... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6773@lists.php.net to get a copy of this message | ||
Hello everyone..
I hope anyone can help me out of this one; I have to add, I am not on any
of the php mailing lists, so I'll need some pointers as to how I can read
anybody's reply to this - of course a CC might do it but I don't know how
happy people are about having to actually add the CC field =]
Anyway. On to the problem.
Human description:
We have a machine running Redhat 6, kernel 2.2.9 with the security patch.
We installed apache 1.3.6 with php3.0.9 and mod_ssl 2.3.1-1.3.6 with openssl
0.9.3a.
We also installed phplib 6.1. PHP3 is configured as a module in apache.
PHP3 itself works fine - phpinfo() outputs the right stuff, and the
neccesary directives are set correctly (in httpd.conf as php3_... here they
are:
# PHP 3 directives
php3_include_path .:/usr/local/apache/php
php3_auto_prepend_file /usr/local/apache/php/prepend.php3
php3_log_errors On
php3_error_log /usr/local/apache/log/php3.log
php3_error_reporting 15
php3_display_errors On
ok - description. Oh btw, this 'error' is entirely reproducible.
The mysql database is perfectly setup, and I'll even go ahead and clear the
active_sessions table (for phplib).
fire up browser.
connect to server (not via the SSL port so we dont introduce one more
variable interfering)
we are firing up the demo index.php3 included with phplib - ok great we see
a page. it shows that the Per Session Data is '1'.
it invites us to reload. .. just before, some more info.
a peek at mysql shows a correct entry in active_sessions. mysql logs show
good stuff. apache logs are all good.
reload....
BAM. The errors:
browsers <-- they receive no data (netscape says no data, ie says invalid
response)
mysql <-- no errors in the logs. the queries are passed; last query is a
select.
php <-- "PHP 3 Warning: Uninitialized variable or array index or property
(auto_free) in
db_mysql.inc on line 65" ... these show up a lot - I'm also enabling debug
big time so... I'm ignoring this.
apache <-- [Wed Jun 9 14:35:46 1999] [notice] child pid 821 exit signal
Segmentation fault
(11)
phplib <-- well.. this is what I can say:
I can test when the error happens. any page_open's, and attempt to show
results from queries (using Tables, show_result for example)...
ok... now the part we all want to look at... the gdb backtrace!
[root@eddie log]# gdb /usr/local/apache/bin/httpd
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 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"...
(no debugging symbols found)...
(gdb) run -X -f /usr/local/apache/conf/httpd.conf
Starting program: /usr/local/apache/bin/httpd -X -f
/usr/local/apache/conf/httpd
.conf
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
chunk_alloc (ar_ptr=0x40205580, nb=88) at malloc.c:2787
malloc.c:2787: No such file or directory.
(gdb)bt
#0 chunk_alloc (ar_ptr=0x40205580, nb=88) at malloc.c:2787
#1 0x40174b8a in __libc_malloc (bytes=78) at malloc.c:2616
#2 0x8063759 in strcpy ()
#3 0x8063a36 in strcpy ()
#4 0x8094e11 in strcpy ()
#5 0x8062276 in strcpy ()
#6 0x805c467 in strcpy ()
#7 0x80898e3 in strcpy ()
#8 0x805d9e5 in strcpy ()
#9 0x805dbc0 in strcpy ()
#10 0x805b279 in strcpy ()
#11 0x805b2da in strcpy ()
#12 0x80ceca3 in strcpy ()
#13 0x80e1ec9 in strcpy ()
#14 0x80e22f0 in strcpy ()
#15 0x80aaa8f in strcpy ()
#16 0x80ceca3 in strcpy ()
#17 0x80e1ec9 in strcpy ()
#18 0x80e1f2c in strcpy ()
#19 0x80d9c2e in strcpy ()
#20 0x80d9ddc in strcpy ()
#21 0x80d9f39 in strcpy ()
#22 0x80da556 in strcpy ()
#23 0x80dacc3 in strcpy ()
#24 0x40134cb3 in __libc_start_main (main=0x80da99c <strcpy+581528>, argc=4,
argv=0xbffffd24, init=0x804b844 <_init>, fini=0x815310c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffd1c)
at ../sysdeps/generic/libc-start.c:78
Now I have to say something... this error at malloc.c... in function
chunk_alloc... i've seen that before... it better not be related to the
famous glibc malloc 'bug'
that occurs under certain circumstances.. see
http://www.undergrad.brandeis.edu/~eddie/cs11/Hw8.html
and you'll see what I
mean... (there are many other places too to read about this 'issue')
*BUT!* I'm hoping this IS a php related problem...
Any suggestions?
Replies - even for me to know where to read replies to eddie@brandeis.edu
(preferred) or alumniweb@brandeis.edu (less preferred but ok)
Thank you all for your time.
Eddie Galvez
Webmaster Alumni Relations
http://www.brandeis.edu/alumni