php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45680 PHP 5.3a1 repeatedly crashes Apache 2.2.8 and 2.2.9 on OS X
Submitted: 2008-08-01 16:18 UTC Modified: 2010-12-20 12:37 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: stanlemon at mac dot com Assigned: mysql (profile)
Status: No Feedback Package: MySQLi related
PHP Version: 5.3.0alpha1 OS: Mac OS X 10.5.3 (ZTS only!)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stanlemon at mac dot com
New email:
PHP Version: OS:

 

 [2008-08-01 16:18 UTC] stanlemon at mac dot com
Description:
------------
I am posting my CrashReporter for apache.  Basically I startup apache 
with the 5.3alpha1 and then go to a page served up by apache and it 
crashes.  It restarts, but most of my CPU gets chewed up as it's 
bouncing back and forth.  Everything compiled fine out of the tarball, 
so I'm not sure what's going on - but in short, right now 5.3 isn't very 
usable on OS X.  Note: I am NOT using the distributed install of Apache 
2 w/ OS X.

Reproduce code:
---------------
Process:         httpd [52229]
Path:            /usr/local/apache-2.2.9/bin/httpd
Identifier:      httpd
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  httpd [52053]

Date/Time:       2008-08-01 12:16:08.155 -0400
OS Version:      Mac OS X 10.5.4 (9E17)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000000c
Crashed Thread:  0

Application Specific Information:
*** single-threaded process forked ***

Thread 0 Crashed:
0   libphp5.so                    	0x0138e30b _zend_mm_free_int + 139
1   libphp5.so                    	0x0134bb8b _mysqlnd_palloc_free_thd_cache_reference + 139
2   libphp5.so                    	0x0113506d mysqli_common_connect + 2269
3   libphp5.so                    	0x0113522d zif_mysqli_link_construct + 61
4   libphp5.so                    	0x013d46dc zend_do_fcall_common_helper_SPEC + 2844
5   libphp5.so                    	0x013d3375 execute + 485
6   libphp5.so                    	0x013b09f6 zend_execute_scripts + 102
7   libphp5.so                    	0x01358498 php_execute_script + 392
8   libphp5.so                    	0x0145c3fb php_handler + 1675
9   httpd                         	0x000024c5 ap_run_handler + 85
10  httpd                         	0x00002d02 ap_invoke_handler + 323
11  httpd                         	0x0002dcde ap_internal_redirect + 92
12  mod_rewrite.so                	0x002f644e handler_redirect + 215
13  httpd                         	0x000024c5 ap_run_handler + 85
14  httpd                         	0x00002d02 ap_invoke_handler + 323
15  httpd                         	0x0002d403 ap_process_request + 111
16  httpd                         	0x00029678 ap_process_http_connection + 120
17  httpd                         	0x000121b0 ap_run_process_connection + 85
18  httpd                         	0x0001262c ap_process_connection + 81
19  httpd                         	0x00033e9f child_main + 1353
20  httpd                         	0x000340be make_child + 408
21  httpd                         	0x00034378 perform_idle_server_maintenance + 542
22  httpd                         	0x00034973 ap_mpm_run + 1430
23  httpd                         	0x0000a135 main + 3334
24  httpd                         	0x00001a4a start + 54

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00e8436c  ebx: 0x0138e28e  ecx: 0x00000000  edx: 0x00000000
  edi: 0x0074274c  esi: 0x00000000  ebp: 0xbfffebc8  esp: 0xbfffeb90
   ss: 0x0000001f  efl: 0x00000206  eip: 0x0138e30b   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x0000000c

Binary Images:
    0x1000 -    0x49fff +httpd ??? (???) <b03c61ba9180efa2bf3469ecd2f6558c> /usr/local/apache-2.2.9/bin/httpd
   0x68000 -    0x75ff3  libaprutil-1.0.dylib ??? (???) <931e8ac4ce826f08f2abffcac57a63b3> /usr/lib/libaprutil-1.0.dylib
   0x7e000 -    0x9cfe3  libexpat.1.dylib ??? (???) <eff8a63a23a7d07af62b36fdb329e393> /usr/lib/libexpat.1.dylib
   0xa4000 -    0xb9fef  libapr-1.0.dylib ??? (???) <34917fe927e85ef7f60ec1303338e9af> /usr/lib/libapr-1.0.dylib
   0xc7000 -    0xc7ffe +mod_authn_file.so ??? (???) <82a1b54e76678d8c76922918fc42efe3> /usr/local/apache2/modules/mod_authn_file.so
   0xcb000 -    0xcbffe +mod_authn_dbm.so ??? (???) <83e8391d3c058f0a09dded82bedebb42> /usr/local/apache2/modules/mod_authn_dbm.so
   0xcf000 -    0xcfffd +mod_authn_anon.so ??? (???) <208b0a5eddf84876313d5057a45dd17a> /usr/local/apache2/modules/mod_authn_anon.so
   0xd3000 -    0xd3ffd +mod_authn_dbd.so ??? (???) <f01ca1a1fc9fba9d1a105e5a8edb9948> /usr/local/apache2/modules/mod_authn_dbd.so
   0xd7000 -    0xd7ffc +mod_authn_default.so ??? (???) <d2120bbdf3b24165d0edcdc5f6656a02> /usr/local/apache2/modules/mod_authn_default.so
   0xdb000 -    0xdbffc +mod_authz_host.so ??? (???) <a59721a5bfaae2dcf4b4dd5eb3377d38> /usr/local/apache2/modules/mod_authz_host.so
   0xdf000 -    0xdfffe +mod_authz_groupfile.so ??? (???) <5849bf06ff9dcec28dc56401916303d6> /usr/local/apache2/modules/mod_authz_groupfile.so
   0xe3000 -    0xe3ffd +mod_authz_user.so ??? (???) <76cdffe0aabcda96b1848b72ee80468c> /usr/local/apache2/modules/mod_authz_user.so
   0xe7000 -    0xe7ffe +mod_authz_dbm.so ??? (???) <7aabb252992ac1be7f589d88c96a4b1e> /usr/local/apache2/modules/mod_authz_dbm.so
   0xeb000 -    0xebffe +mod_authz_owner.so ??? (???) <060877edfc6bbb970e7b9e28538b681d> /usr/local/apache2/modules/mod_authz_owner.so
   0xef000 -    0xefffd +mod_authz_default.so ??? (???) <5cacbf0b7ceb64808e5a5bb686c4e9f4> /usr/local/apache2/modules/mod_authz_default.so
   0xf3000 -    0xf3ffd +mod_auth_basic.so ??? (???) <5b30b173b14ca5ca3013427195ae690b> /usr/local/apache2/modules/mod_auth_basic.so
   0xf7000 -    0xfcfff +mod_auth_digest.so ??? (???) <5204725ad64446142947468a769b1530> /usr/local/apache2/modules/mod_auth_digest.so
  0x200000 -   0x202ffe +mod_dbd.so ??? (???) <a7cb807c20a4e9d9b65253228a7a1361> /usr/local/apache2/modules/mod_dbd.so
  0x206000 -   0x206ffc +mod_dumpio.so ??? (???) <b34444e5add2bf79486e3a6d263dc6ae> /usr/local/apache2/modules/mod_dumpio.so
  0x20a000 -   0x20cfff +mod_ext_filter.so ??? (???) <78660e028002d6a11490324b17ff5ceb> /usr/local/apache2/modules/mod_ext_filter.so
  0x210000 -   0x219ffc +mod_include.so ??? (???) <649f0ed9ef123de9af31af56e747ad6e> /usr/local/apache2/modules/mod_include.so
  0x21e000 -   0x220ffd +mod_filter.so ??? (???) <45e24528d8ee36df89a5f733457165fe> /usr/local/apache2/modules/mod_filter.so
  0x224000 -   0x225ffd +mod_substitute.so ??? (???) <d60ba207cb7d00c929107bae538c4140> /usr/local/apache2/modules/mod_substitute.so
  0x229000 -   0x22cfff +mod_deflate.so ??? (???) <5455597349e6d1f9ee592cd2127fcd27> /usr/local/apache2/modules/mod_deflate.so
  0x230000 -   0x233ffd +mod_log_config.so ??? (???) <26217fddc61f00dd74713af715c48ca8> /usr/local/apache2/modules/mod_log_config.so
  0x238000 -   0x238fe0 +mod_log_forensic.so ??? (???) <0471534abec204eb5f3f7f7aa24a3162> /usr/local/apache2/modules/mod_log_forensic.so
  0x23c000 -   0x23cfff +mod_logio.so ??? (???) <03db4bed8ec81d1831f0ebed8596b71d> /usr/local/apache2/modules/mod_logio.so
  0x240000 -   0x240fff +mod_env.so ??? (???) <940549f3d66fb6339f0823079d57b527> /usr/local/apache2/modules/mod_env.so
  0x244000 -   0x248ffc +mod_mime_magic.so ??? (???) <be109e2ff11fd77e2d8a4547b0db90f1> /usr/local/apache2/modules/mod_mime_magic.so
  0x24c000 -   0x24cffc +mod_cern_meta.so ??? (???) <61baed1893311c1764e76742f893cdc9> /usr/local/apache2/modules/mod_cern_meta.so
  0x250000 -   0x251fff +mod_expires.so ??? (???) <5d6f3862c7bdea5b2445cb1972f46538> /usr/local/apache2/modules/mod_expires.so
  0x255000 -   0x257ffe +mod_headers.so ??? (???) <cd84c309982e9f069355d6d97d9aa06f> /usr/local/apache2/modules/mod_headers.so
  0x25b000 -   0x25bffc +mod_ident.so ??? (???) <55a839bd21dca3a5b3e717ba7a920ef5> /usr/local/apache2/modules/mod_ident.so
  0x25f000 -   0x260fff +mod_usertrack.so ??? (???) <63606bdfcbf23b4fb44193a3bfcf4946> /usr/local/apache2/modules/mod_usertrack.so
  0x264000 -   0x264fff +mod_unique_id.so ??? (???) <cc4cb849c5ce16f4d9550a67abf65707> /usr/local/apache2/modules/mod_unique_id.so
  0x268000 -   0x269ffc +mod_setenvif.so ??? (???) <dc5387dc819967b21f65e9b30da0293c> /usr/local/apache2/modules/mod_setenvif.so
  0x26d000 -   0x26dffc +mod_version.so ??? (???) <f2f850862f24d3e04765ce2dc92ff036> /usr/local/apache2/modules/mod_version.so
  0x271000 -   0x273ffd +mod_mime.so ??? (???) <43fc0380a5ad073269e63aca6001fd0c> /usr/local/apache2/modules/mod_mime.so
  0x277000 -   0x28bffc +mod_dav.so ??? (???) <db8e01fb613aca5bec252f04d81139c9> /usr/local/apache2/modules/mod_dav.so
  0x291000 -   0x294fff +mod_status.so ??? (???) <fa0568f904d298710257728cdeeac286> /usr/local/apache2/modules/mod_status.so
  0x298000 -   0x29dffe +mod_autoindex.so ??? (???) <aa87001ae3b51879ebd6c25c75cdb5fd> /usr/local/apache2/modules/mod_autoindex.so
  0x2a1000 -   0x2a1ffc +mod_asis.so ??? (???) <4a4ea4e9f53a84853fb1e9c6bff7428c> /usr/local/apache2/modules/mod_asis.so
  0x2a5000 -   0x2a7ffe +mod_info.so ??? (???) <c9537d6a69578a7b3881d90e679b7f07> /usr/local/apache2/modules/mod_info.so
  0x2ab000 -   0x2aeffd +mod_cgi.so ??? (???) <eda62092b982e10233b4621f0254ee46> /usr/local/apache2/modules/mod_cgi.so
  0x2b3000 -   0x2bbfff +mod_dav_fs.so ??? (???) <14b5c2de7b6f9517d30fdbe8f0e60cc7> /usr/local/apache2/modules/mod_dav_fs.so
  0x2c0000 -   0x2c1ffd +mod_vhost_alias.so ??? (???) <642499afcd53741d54d9613eb42831da> /usr/local/apache2/modules/mod_vhost_alias.so
  0x2c5000 -   0x2cafff +mod_negotiation.so ??? (???) <55dd927194db79e1019647ffc6452d04> /usr/local/apache2/modules/mod_negotiation.so
  0x2cf000 -   0x2cffff +mod_dir.so ??? (???) <8da12ff9b69d5b02cd55f2dfbe0c1a26> /usr/local/apache2/modules/mod_dir.so
  0x2d3000 -   0x2d5fff +mod_imagemap.so ??? (???) <d105a4974790507b4e8f97253e9e807d> /usr/local/apache2/modules/mod_imagemap.so
  0x2d9000 -   0x2d9ffe +mod_actions.so ??? (???) <53d8f327510f90c1a508028e40f8f677> /usr/local/apache2/modules/mod_actions.so
  0x2dd000 -   0x2defff +mod_speling.so ??? (???) <8b2c06c4828c6601fc8907e519dfbc38> /usr/local/apache2/modules/mod_speling.so
  0x2e2000 -   0x2e2ffc +mod_userdir.so ??? (???) <4349b4faf593ac36bcb74feed3464a54> /usr/local/apache2/modules/mod_userdir.so
  0x2e6000 -   0x2e7fff +mod_alias.so ??? (???) <bd4fa0c9090d13f7d51946cc64c0e052> /usr/local/apache2/modules/mod_alias.so
  0x2eb000 -   0x2f7fff +mod_rewrite.so ??? (???) <ab2f15aead9d2c7f8640ef5136583130> /usr/local/apache2/modules/mod_rewrite.so
  0x2fc000 -   0x306fff  libexslt.0.dylib ??? (???) <11463660d68f411b084b576037027587> /usr/lib/libexslt.0.dylib
  0x30c000 -   0x321fef +libpq.5.dylib ??? (???) /usr/local/pgsql/lib/libpq.5.dylib
  0x399000 -   0x3feffb +libfreetype.6.dylib ??? (???) <d9b7dd43f6ab37720ca5c26e5188a387> /usr/local/lib/libfreetype.6.dylib
  0x426000 -   0x445fe3 +libpng12.0.dylib ??? (???) <1688914fbf2ed9ca4730e41b74f80169> /usr/local/lib/libpng12.0.dylib
  0x453000 -   0x47effb  libcurl.4.dylib ??? (???) <54ada27deb3b4ff7043d8836264eca0d> /usr/lib/libcurl.4.dylib
 0x1000000 -  0x1846fe7 +libphp5.so ??? (???) <c6169639cc8a7eba4a17fd7d4cc95766> /usr/local/apache2/modules/libphp5.so
0x8fe00000 - 0x8fe2da53  dyld 96.2 (???) <7af47d3b00b2268947563c7fa8c59a07> /usr/lib/dyld
0x910aa000 - 0x910b8ffd  libz.1.dylib ??? (???) <5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib
0x9117e000 - 0x911a9fe7  libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib
0x9213a000 - 0x9221bff7  libxml2.2.dylib ??? (???) <1baef3d4972ee789d8fa6c1fa44da45c> /usr/lib/libxml2.2.dylib
0x922e8000 - 0x92448ff3  libSystem.B.dylib ??? (???) <a12f397abf2285077b89bd726bff5b18> /usr/lib/libSystem.B.dylib
0x92d49000 - 0x92d50fe9  libgcc_s.1.dylib ??? (???) <f53c808e87d1184c0f9df63aef53ce0b> /usr/lib/libgcc_s.1.dylib
0x92e65000 - 0x92e69fff  libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib
0x92f19000 - 0x92f25fff  libbz2.1.0.dylib ??? (???) <9ea4fe135c9e52bd0590eec12c738e82> /usr/lib/libbz2.1.0.dylib
0x93196000 - 0x932ceff7  libicucore.A.dylib ??? (???) <5031226ea28b371d8dfdbb32acfb48b5> /usr/lib/libicucore.A.dylib
0x93365000 - 0x93389fff  libxslt.1.dylib ??? (???) <4933ddc7f6618743197aadc85b33b5ab> /usr/lib/libxslt.1.dylib
0x93638000 - 0x9372cff4  libiconv.2.dylib ??? (???) <c508c60fafca17824c0017b2e4369802> /usr/lib/libiconv.2.dylib
0x949d4000 - 0x949f2fff  libresolv.9.dylib ??? (???) <0629b6dcd71f4aac6a891cbe26253e85> /usr/lib/libresolv.9.dylib
0x94e05000 - 0x94eb7ffb  libcrypto.0.9.7.dylib ??? (???) <01109b36b445b3e8698ef87f814f7fd4> /usr/lib/libcrypto.0.9.7.dylib
0x94f33000 - 0x94fbaff7  libsqlite3.0.dylib ??? (???) <6978bbcca4277d6ae9f042beff643f7d> /usr/lib/libsqlite3.0.dylib
0x9588c000 - 0x9596bfff  libobjc.A.dylib ??? (???) <a53206274b6c2d42691f677863f379ae> /usr/lib/libobjc.A.dylib
0x95da4000 - 0x95ed6fff  com.apple.CoreFoundation 6.5.3 (476.14) <7ef7f5db09ff6dd0135a6165872803cc> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x95f3c000 - 0x95f99ffb  libstdc++.6.dylib ??? (???) <04b812dcec670daa8b7d2852ab14be60> /usr/lib/libstdc++.6.dylib
0x962b0000 - 0x962d4feb  libssl.0.9.7.dylib ??? (???) <3512c4a8198f0e964748bf6acbf359b4> /usr/lib/libssl.0.9.7.dylib
0x96478000 - 0x96528fff  edu.mit.Kerberos 6.0.12 (6.0.12) <1dc515ebe407292db8e603938c72d4e8> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x96831000 - 0x969fffff  com.apple.security 5.0.4 (34102) <f01d6cbd6a0f24f6c13952ed448e77d6> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x97248000 - 0x9727efef  libtidy.A.dylib ??? (???) <f1d1742e06280444baa5637b209fd0af> /usr/lib/libtidy.A.dylib
0xfffe8000 - 0xfffebfff  libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib
0xffff0000 - 0xffff1780  libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-01 21:17 UTC] jani@php.net
And the configure line was..?
 [2008-08-01 21:20 UTC] stanlemon at mac dot com
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386"
./configure \
 --prefix=/usr/local/php-5.3.0alpha1 \
 --sysconfdir=/usr/local/php/conf \
 --with-config-file-path=/usr/local/php/conf/php.ini \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --with-kerberos=/usr \
 --enable-exif \
 --enable-ftp \
 --enable-mbstring \
 --enable-mbregex \
 --enable-sockets \
 --enable-soap \
 --enable-zip \
 --enable-cli \
 --enable-cgi \
 --enable-exif \
 --with-gd \
 --with-curl=/usr \
 --with-zlib-dir=/usr \
 --with-jpeg-dir=/usr/local \
 --with-png-dir=/usr/local \
 --with-freetype-dir=/usr/local \
 --enable-gd-native-ttf \
 --with-pdo-pgsql=/usr/local/pgsql \
 --with-pgsql=/usr/local/psql \
 --with-libxml-dir=shared \
 --with-openssl \
 --with-xmlrpc \
 --with-xsl=/usr \
 --with-mime-magic \
 --with-bz2=/usr \
 --without-pear \
 --with-mysql=mysqlnd \
 --with-mysqli=mysqlnd \
 --with-pdo-mysql=mysqlnd
 [2008-08-01 22:20 UTC] jani@php.net
  --sysconfdir=/usr/local/php/conf 

No idea what that does, and this is wrong:

  --with-config-file-path=/usr/local/php/conf/php.ini

Note the word "path". Unless php.ini is also a directory..?
Also, you should be using the prefork MPM in apache..


 [2008-08-01 22:25 UTC] johannes@php.net
Andrey, I can't reproduce on my linux box, probably a mac issue with the zval cache, can you/we check on a mac?
 [2008-08-01 23:51 UTC] stanlemon at mac dot com
Would the incorrect config-file-path setting have caused the crashes I'm 
seeing?

Why should I be using the prefork mpm for apache?
 [2008-08-02 16:43 UTC] jani@php.net
Using incorrect path would not cause a crash, just that you're not then running what you expect. And prefork because any threaded MPMs are not really supported. Best choice: FastCGI.
 [2008-08-02 21:01 UTC] stanlemon at mac dot com
Wait, I'm not following...  I thought an apache module was always the 
preferred way to compile and run PHP?  Forgive my ignorance here...  I 
guess I'm curious on further explanation?  Also, do you want me to try 
5.3.0alpha1 with recompiling something?
 [2008-08-03 22:07 UTC] jani@php.net
Try with first changing your Apache to prefork MPM. Then configure PHP with only this:

# ./configure --disable-all --with-apxs=/usr/local/apache2/bin/apxs

Then if this still crashes, we have a real problem.
 [2008-08-03 23:21 UTC] stanlemon at mac dot com
That seems to have worked.  I tried first with the line you posted 
(though with apxs2 instead of just apxs like posted) and everything ran 
smoothly, then I tried my original configure line (with the two 
corrections you pointed out) and have been successful working with both.  
Is this something that I should post a bug for with Apache, or is it 
related to PHP?

Side note FWIW... it would be handy if someone wrote up an article on 
the benefits of Apache with mpm prefork in an environment running PHP, 
some further detail and such.  

Let me know if there is anything else you want me to test related to 
this.

Thanks again.
 [2008-08-04 07:19 UTC] andrey@php.net
My Mac is being repaired, will have it in a month.
 [2008-08-04 21:30 UTC] jani@php.net
Can you provide a short reproducing script?

Andrey:
Apparently this is some thread safety issue in mysqlnd. 
I don't think you need Mac to reproduce this, just ZTS build.


 [2008-11-11 10:56 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2008-11-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-08-18 12:40 UTC] andrey@php.net
-Assigned To: andrey +Assigned To: mysql
 [2010-12-20 12:37 UTC] jani@php.net
-Package: Tidy +Package: MySQLi related
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Feb 02 17:03:42 2023 UTC