php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35815 Segmentation fault when the first page is be looked up
Submitted: 2005-12-27 09:04 UTC Modified: 2005-12-28 05:28 UTC
From: nyama152 at yahoo dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.1 OS: Solaris 9
Private report: No CVE-ID: None
 [2005-12-27 09:04 UTC] nyama152 at yahoo dot com
Description:
------------
When we include php5 module in httpd.conf, httpd crashes as

[Tue Dec 27 16:17:40 2005] [notice] Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.
9.8a PHP/5.1.1 configured -- resuming normal operations
[Tue Dec 27 16:18:00 2005] [notice] child pid 6203 exit signal Segmentation faul
t (11) 

when the first page is looked up (even if it is not php page). php was compiled by

./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--enable-trans-sid \
--enable-zend-multibyte --enable-mbstring --enable-mbstr-enc-trans \
--enable-track-vars --enable-force-cgi-redirect --with-iconv=/usr/local --enable-debug?@--without-pdo-sqlite


Actual result:
--------------
# gdb httpd ../core
GNU gdb 6.4
Copyright 2005 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-pc-solaris2.9"...
Core was generated by `/usr/local/apache2/bin/httpd -k restart'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/ssl/lib/libssl.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libssl.so.0.9.8
Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/local/apr/lib/libaprutil-1.so.0...done.
Loaded symbols for /usr/local/apr/lib/libaprutil-1.so.0
Reading symbols from /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so...done.
Loaded symbols for /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so
Reading symbols from /usr/local/apache2/lib/libexpat.so.0...done.
Loaded symbols for /usr/local/apache2/lib/libexpat.so.0
Reading symbols from /usr/local/lib/libiconv.so.2...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/local/apr/lib/libapr-1.so.0...done.
Loaded symbols for /usr/local/apr/lib/libapr-1.so.0
Reading symbols from /usr/lib/libsendfile.so.1...done.
Loaded symbols for /usr/lib/libsendfile.so.1
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libmd5.so.1...done.
Loaded symbols for /usr/lib/libmd5.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/local/apache2/modules/libphp5.so...done.
Loaded symbols for /usr/local/apache2/modules/libphp5.so
Reading symbols from /usr/local/lib/libz.so...done.
Loaded symbols for /usr/local/lib/libz.so
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /usr/lib/locale/ja/ja.so.2...done.
Loaded symbols for /usr/lib/locale/ja/ja.so.2
Reading symbols from /usr/lib/locale/ja_JP.eucJP/methods_ja_JP.eucJP.so.2...done.
Loaded symbols for /usr/lib/locale/ja_JP.eucJP/methods_ja_JP.eucJP.so.2
#0  0xd06ec097 in ucs_i_jis_table ()
   from /usr/local/apache2/modules/libphp5.so
(gdb) bt
#0  0xd06ec097 in ucs_i_jis_table ()
   from /usr/local/apache2/modules/libphp5.so
#1  0x08047cb4 in ?? ()
#2  0x08047c08 in ?? ()
#3  0xd0fb5215 in apr_pool_destroy (pool=0x80e1438)
    at memory/unix/apr_pools.c:724
#4  0xd0fb522d in apr_pool_destroy (pool=0x80e1438)
    at memory/unix/apr_pools.c:727
#5  0xd0fb5215 in apr_pool_destroy (pool=0x80df430)
    at memory/unix/apr_pools.c:724
#6  0x080665f4 in destroy_and_exit_process (process=0x7b2275a,
    process_exit_value=1744830663) at main.c:254
#7  0x08066fd9 in main (argc=3, argv=0x8047cf8) at main.c:719

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-27 10:32 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-12-27 10:48 UTC] nyama152 at yahoo dot com
Things don't change with the CVS snapshot.
 [2005-12-27 10:52 UTC] tony2001@php.net
Did you really try it?
And fix your configure line, please:
--enable-debug?@--without-pdo-sqlite
 [2005-12-27 11:05 UTC] nyama152 at yahoo dot com
Yes I did try it actually after your request.

--enable-debug?@--without-pdo-sqlite is
acutally the same line stuff with the previous line.
I pasted from othter place. So it won't be the problem ?
 [2005-12-27 11:12 UTC] tony2001@php.net
No, it won't, but there are some funny characters between "debug" and the next "--" and that looks definitely wrong to me.
Try with ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug, plz.
 [2005-12-27 11:13 UTC] tony2001@php.net
And if you still able reprduce it - paste the new backtrace.
 [2005-12-27 11:59 UTC] nyama152 at yahoo dot com
Thank you for the reply. There was a multi-byte character as you said. I tried again ater the fix.

5.1.1 or the snapshot,
and
	./configure --with-apxs2=/usr/local/apache2/bin/apxs \
	--enable-trans-sid \
	--enable-zend-multibyte --enable-mbstring --enable-mbstr-enc-trans \
	--enable-track-vars --enable-force-cgi-redirect --with-iconv=/usr/local --enable-debug --without-pdo-sqlite

give almost the same backtrace results.

The snapshot with
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug --without-pdo-sqlite

(--without-pdo-sqlite was used to circumvent the following error:
/hoge/php5.1200512270930/ext/pdo_sqlite/sqlite/src/os_unix.c:834: undefined reference to `fdatasync'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1)

gives rise to

# !172
gdb httpd ../core5
GNU gdb 6.4
Copyright 2005 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-pc-solaris2.9"...
Core was generated by `/usr/local/apache2/bin/httpd -k restart'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/ssl/lib/libssl.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libssl.so.0.9.8
Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/local/apr/lib/libaprutil-1.so.0...done.
Loaded symbols for /usr/local/apr/lib/libaprutil-1.so.0
Reading symbols from /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so...done.
Loaded symbols for /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so
Reading symbols from /usr/local/apache2/lib/libexpat.so.0...done.
Loaded symbols for /usr/local/apache2/lib/libexpat.so.0
Reading symbols from /usr/local/lib/libiconv.so.2...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/local/apr/lib/libapr-1.so.0...done.
Loaded symbols for /usr/local/apr/lib/libapr-1.so.0
Reading symbols from /usr/lib/libsendfile.so.1...done.
Loaded symbols for /usr/lib/libsendfile.so.1
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libmd5.so.1...done.
Loaded symbols for /usr/lib/libmd5.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/local/apache2/modules/libphp5.so...done.
Loaded symbols for /usr/local/apache2/modules/libphp5.so
Reading symbols from /usr/local/lib/libz.so...done.
Loaded symbols for /usr/local/lib/libz.so
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /usr/lib/locale/ja/ja.so.2...done.
Loaded symbols for /usr/lib/locale/ja/ja.so.2
Reading symbols from /usr/lib/locale/ja_JP.eucJP/methods_ja_JP.eucJP.so.2...done.
Loaded symbols for /usr/lib/locale/ja_JP.eucJP/methods_ja_JP.eucJP.so.2
#0  0xd07163fe in yy_chk () from /usr/local/apache2/modules/libphp5.so
(gdb) bt
#0  0xd07163fe in yy_chk () from /usr/local/apache2/modules/libphp5.so
#1  0xd0fb5423 in apr_pool_clear (pool=0xd0fb4801)
    at memory/unix/apr_pools.c:689
#2  0x00000000 in ?? ()
 [2005-12-27 12:16 UTC] tony2001@php.net
Are you sure you're using recently compiled module?
Since you're configuring it with --enable-debug, I'd expect to see some more information, not just "yy_chk()".
And please don't paste these "Reading symbols" lines, they are useless.
Does PHP CLI work for you? Are you able to reproduce with something more stable than Apache 2.2, like Apache 1.3 or 2.0?
 [2005-12-27 14:53 UTC] nyama152 at yahoo dot com
I should apologize for something wrong in our compiling and/or executing surroundings. Please tag this bug report to bogus. When we go back to PHP 5.1.0, we have crashes which we did not have. We did routine works, e.g., applying patches including kernel patches and updating libraries including apache httpd. One of the suspect is the manual upgrading of apr and apr-libraries at upgrading to httpd 2.2.0, I think, and the upgrading of apache http seems not to be backward compatible. I will check it and if I come up with any idea, I will report it. Anyway sorry for the bogus bug report.
 [2005-12-27 14:59 UTC] sniper@php.net
User error -> bogus.
 [2005-12-28 03:20 UTC] nyama152 at yahoo dot com
I re-opened it, because it may include useful information.
Please make this to bogus again after you read it.

apr and apr-util libs and include go to /usr/local/apache2/
in older httpd and /usr/local/apr in the current httpd. If both are present, php configure script looks /usr/local/apr for include and /usr/local/apache2 for libs.
 [2005-12-28 05:28 UTC] nyama152 at yahoo dot com
I sent it to bogus again.
Thnak you for your help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 05:01:31 2024 UTC