php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62996 pecl-APC-3.1.12 crashes on FreeBSD
Submitted: 2012-09-02 12:10 UTC Modified: 2012-09-04 09:01 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: astatutov at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.4.6 OS: FreeBSD 8.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: astatutov at gmail dot com
New email:
PHP Version: OS:

 

 [2012-09-02 12:10 UTC] astatutov at gmail dot com
Description:
------------
After upgrading PHP to 5.4.6 (from 5.3) pecl-APC crashes Apache workers.

httpd-error.log:
[Sun Sep 02 14:26:55 2012] [error] child died with signal 11
[Sun Sep 02 14:26:56 2012] [error] child died with signal 11
[Sun Sep 02 14:26:56 2012] [error] child died with signal 11
and so on... Connection were reseted. 

The problem does not appear if pecl-APC is disabled.

The module was compiled with the options: mmap, fcntl, spinlocks. Enabling/disabling those options has no positive effect. The module is completely unusable now on this machine. Other server has 32-bit FreeBSD installed and it works fine with the same ports.

Sorry, I have no possibility to make a gdb backtrace because the server is in production. 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-02 13:08 UTC] ab@php.net
Could you please at least post the apc config you're using and phpinfo()? May be 
you could make a dump on your dev environment (if it's reproduceable there)?
 [2012-09-02 13:08 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-09-02 16:09 UTC] astatutov at gmail dot com
-Summary: pecl-APC-3.1.12 crashas on x64 FreeBSD +Summary: pecl-APC-3.1.12 crashes on FreeBSD -Status: Feedback +Status: Open
 [2012-09-02 16:09 UTC] astatutov at gmail dot com
I've just noticed I was wrong thinking that the problem does not affect 32-bit system. It's just not so loaded, because it's a dev server, that's why I haven't noticed the problem earlier. This looks like an unpredictable behavior, I think crash probability may depend on concurrent connections or smth like that. But since it's reproduceable on dev environment I'll try to make a dump tomorrow.

=== php.ini:
apc.cache_by_default = Off
apc.slam_defense = 0
apc.shm_size = 1024M

=== Shortened phpinfo (don't understand how to attach file here), pecl-APC is not installed now:
System => FreeBSD bestyle.ru 8.2-RELEASE-p6 FreeBSD 8.2-RELEASE-p6 #4: Sun Mar 25 17:17:00 MSK 2012     bestyle-root@bestyle.ru:/usr/obj/usr/src/sys/INTEL amd64
Build Date => Sep  2 2012 01:45:23
Configure Command =>  './configure'  '--with-layout=GNU' '--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix=' '--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd8.2'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php-cli.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => /usr/local/etc/php/extensions.ini

PHP API => 20100412
PHP Extension => 20100525
Zend Extension => 220100525
Zend Extension Build => API220100525,NTS
PHP Extension Build => API20100525,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => compress.bzip2, zip, php, file, glob, data, http, ftp, https, ftps, compress.zlib, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => bzip2.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, convert.iconv.*, http.*

Core

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => no value => no value
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/local/lib/php/20100525 => /usr/local/lib/php/20100525
file_uploads => On => On
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/local/share/pear => .:/usr/local/share/pear
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 512M => 512M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i 
serialize_precision => 17 => 17
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => ES => ES
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
 [2012-09-03 16:45 UTC] astatutov at gmail dot com
Ok, I've finally made it. 

==== Here is gdb core backtrace:
#0  0x29ee5b56 in apc_new_interned_string (
    arKey=0x2a41f8d0 "\r\ra:53:{i:0;s:15:\"lib/odb/odb.php\";i:1;s:21:\"lib/odb/path/path.php\";i:2;s:17:\"lib/utils/str.php\";i:3;s:18:\"lib/utils/date.php\";i:4;s:16:\"lib/utils/io.php\";i:5;s:20:\"lib/utils/access.php\";i:6;s:18:\"lib"..., nKeyLength=2050) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_string.c:84
#1  0x29ed483d in apc_string_pmemcpy (
    str=0x2a41f8d0 "\r\ra:53:{i:0;s:15:\"lib/odb/odb.php\";i:1;s:21:\"lib/odb/path/path.php\";i:2;s:17:\"lib/utils/str.php\";i:3;s:18:\"lib/utils/date.php\";i:4;s:16:\"lib/utils/io.php\";i:5;s:20:\"lib/utils/access.php\";i:6;s:18:\"lib"..., len=2050, pool=0x2c205110) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_compile.c:291
#2  0x29ed4ac6 in my_copy_zval (dst=0x2c205198, src=0x2a39d274, ctxt=0xbfbfc3a8) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_compile.c:348
#3  0x29ed651d in apc_copy_zval (dst=0x2c205198, src=0x2a39d274, ctxt=0xbfbfc3a8) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_compile.c:1099
#4  0x29ed2ed2 in apc_cache_store_zval (dst=0x0, src=0x2a39d274, ctxt=0xbfbfc3a8) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_cache.c:1121
#5  0x29ed304a in apc_cache_make_user_entry (info=0x2a107dc4 "lab:devel:/lib/all", info_len=19, val=0x2a39d274, ctxt=0xbfbfc3a8, ttl=0) at /usr/ports/www/pecl-APC/work/APC-3.1.12/apc_cache.c:1161
#6  0x29ecd060 in _apc_store (strkey=0x2a107dc4 "lab:devel:/lib/all", strkey_len=19, val=0x2a39d274, ttl=0, exclusive=0) at /usr/ports/www/pecl-APC/work/APC-3.1.12/php_apc.c:611
#7  0x29ecd346 in apc_store_helper (ht=2, return_value=0x2a41eec0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, exclusive=0) at /usr/ports/www/pecl-APC/work/APC-3.1.12/php_apc.c:670
#8  0x29ecd3c5 in zif_apc_store (ht=2, return_value=0x2a41eec0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /usr/ports/www/pecl-APC/work/APC-3.1.12/php_apc.c:683
#9  0x28ed68ba in zend_do_fcall_common_helper_SPEC (execute_data=0x29424f60) at zend_vm_execute.h:642
#10 0x28edd2df in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x29424f60) at zend_vm_execute.h:2219
#11 0x28ed5371 in execute (op_array=0x2a4148a0) at zend_vm_execute.h:410
#12 0x28e8f4bd in zend_call_function (fci=0xbfbfc8ec, fci_cache=0xbfbfc8d8) at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_execute_API.c:958
#13 0x28d3b6a8 in zif_call_user_func_array (ht=2, return_value=0x2a39cf80, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /usr/ports/lang/php5/work/php-5.4.6/ext/standard/basic_functions.c:4749
#14 0x28ed68ba in zend_do_fcall_common_helper_SPEC (execute_data=0x29424b30) at zend_vm_execute.h:642
#15 0x28edd2df in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x29424b30) at zend_vm_execute.h:2219
#16 0x28ed5371 in execute (op_array=0x2c19ad40) at zend_vm_execute.h:410
#17 0x28e8f4bd in zend_call_function (fci=0xbfbfcdf0, fci_cache=0xbfbfcdc0) at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_execute_API.c:958
#18 0x28ebc876 in zend_call_method (object_pp=0xbfbfceec, obj_ce=0x29447944, fn_proxy=0x29447a10, function_name=0x290955e4 "__call", function_name_len=6, retval_ptr_ptr=0xbfbfce60, param_count=2, arg1=0x2a41e034, arg2=0x2a39cb90)
    at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_interfaces.c:97
#19 0x28ece741 in zend_std_call_user_call (ht=3, return_value=0x2a398454, return_value_ptr=0x0, this_ptr=0x2943e98c, return_value_used=0) at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend_object_handlers.c:870
#20 0x28ed68ba in zend_do_fcall_common_helper_SPEC (execute_data=0x29424604) at zend_vm_execute.h:642
#21 0x28ed796d in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x29424604) at zend_vm_execute.h:752
#22 0x28ed5371 in execute (op_array=0x2945d114) at zend_vm_execute.h:410
#23 0x28ea09b8 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/ports/lang/php5/work/php-5.4.6/Zend/zend.c:1289
#24 0x28e21b20 in php_execute_script (primary_file=0xbfbfe6b4) at /usr/ports/lang/php5/work/php-5.4.6/main/main.c:2473
#25 0x28fc2b13 in php_handler (r=0x2c10d568) at /usr/ports/lang/php5/work/php-5.4.6/sapi/apache2handler/sapi_apache2.c:667
#26 0x0807ca74 in ap_run_handler (r=0x2c10d568) at config.c:157
#27 0x0807d23d in ap_invoke_handler (r=0x2c10d568) at config.c:376
#28 0x0808dd6c in ap_internal_redirect (new_uri=0x2c10d550 "/.handler-www.php", r=0x2c104058) at http_request.c:554
#29 0x28778d6c in handler_redirect (r=0x2c104058) at mod_rewrite.c:4843
#30 0x0807ca74 in ap_run_handler (r=0x2c104058) at config.c:157
#31 0x0807d23d in ap_invoke_handler (r=0x2c104058) at config.c:376
#32 0x0808d3d3 in ap_process_request (r=0x2c104058) at http_request.c:282
#33 0x08089f11 in ap_process_http_connection (c=0x29ffc1f0) at http_core.c:190
#34 0x08085514 in ap_run_process_connection (c=0x29ffc1f0) at connection.c:43
#35 0x08085978 in ap_process_connection (c=0x29ffc1f0, csd=0x29ffc058) at connection.c:190
#36 0x08094357 in child_main (child_num_arg=11) at itk.c:726
#37 0x080946ac in make_child (s=0x28510f58, slot=11) at itk.c:850
#38 0x08094904 in perform_idle_server_maintenance (p=0x2850f018) at itk.c:985
#39 0x08094e28 in ap_mpm_run (_pconf=0x2850f018, plog=0x2853f018, s=0x28510f58) at itk.c:1189
#40 0x08064c8f in main (argc=Cannot access memory at address 0x2f9ca8a3
) at main.c:753
 [2012-09-03 19:17 UTC] pajoye@php.net
Please try with 3.1.13
 [2012-09-04 08:50 UTC] astatutov at gmail dot com
It seems that 3.1.13 fixes the problem. Thank you!
 [2012-09-04 09:01 UTC] pajoye@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2012-09-04 09:01 UTC] pajoye@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pajoye
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 23:01:25 2025 UTC