|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-08-06 12:51 UTC] cfc4n at cnxct dot com
Description:
------------
My php.ini config with this:
;apc version 3.1.9
apc.enabled = 1
apc.enable_cli = 1
apc.cache_by_default = on
apc.shm_segments = 1
apc.shm_size = 128M
apc.num_files_hint = 300
apc.user_entries_hint = 4096
apc.write_lock = On
apc.stat = 0
apc.stat_ctime = 0
apc.ttl=0
apc.user_ttl=0
apc.serializer=igbinary ;// igbinary and php
make install with PHP ver 5.3.10 and php-fpm,when I Requst test script,PHP-FPM
shutdown like "WARNING: [pool www] child 9043 exited on signal 11 (SIGSEGV -
core dumped) after 2.097479 seconds from start"
Test script:
---------------
//定义需要cache的目录
$arrCacheDir = array();
array_push($arrCacheDir,PROJECTROOT.'core');
/* 循环读取需要cache的目录*/
foreach ($arrCacheDir as $value)
{
compileDir($value);
}
/* 生成bin文件*/
if (!writeBin())
{
exit('write to '.APCBIN.'xyws_vn.bin failed!!!');
}
function compileDir ($dir)
{
......
//开始缓存文件
if (apc_compile_file($dir.DIRECTORY_SEPARATOR.$file))
{
$arrCacheFile[] = $dir.DIRECTORY_SEPARATOR.$file;
}
......
}
Expected result:
----------------
run ok....
Actual result:
--------------
apc.serializer=php:
#0 apc_swizzle_hashtable (bd=0x2b787542a030, ll=0x7fffe0149c60,
ht=0x2b78754be9c6, swizzle_cb=0x2b787492fa00 <apc_swizzle_zval>, is_ptr=1) at
/root/Redis/APC-3.1.9/apc_bin.c:408
#1 0x00002b787492fa6d in apc_swizzle_zval (bd=0x2b787542a030,
ll=0x7fffe0149c60, zv=0x2b78754bdb80) at /root/Redis/APC-3.1.9/apc_bin.c:463
#2 0x00002b787492fd4f in apc_swizzle_op_array (bd=0x2b787542a030,
ll=0x7fffe0149c60, op_array=0x2b78754bd8ff) at /root/Redis/APC-
3.1.9/apc_bin.c:205
#3 0x00002b787492fe81 in apc_swizzle_function (bd=0x2b787542a030,
ll=0x7fffe0149c60, func=0x2b78754be9c6) at /root/Redis/APC-3.1.9/apc_bin.c:268
#4 0x00002b787492f982 in apc_swizzle_hashtable (bd=0x2b787542a030,
ll=0x7fffe0149c60, ht=0x2b7875431366, swizzle_cb=0x2b787492fe60
<apc_swizzle_function>, is_ptr=0) at /root/Redis/APC-3.1.9/apc_bin.c:411
#5 0x00002b7874930765 in apc_swizzle_class_entry (files=0x5cfcfd8, user_vars=
<value optimized out>) at /root/Redis/APC-3.1.9/apc_bin.c:294
#6 apc_bin_dump (files=0x5cfcfd8, user_vars=<value optimized out>) at
/root/Redis/APC-3.1.9/apc_bin.c:794
#7 0x00002b78749219e1 in zif_apc_bin_dumpfile (ht=<value optimized out>,
return_value=0x5c2a470, return_value_ptr=<value optimized out>, this_ptr=<value
optimized out>, return_value_used=<value optimized out>)
at /root/Redis/APC-3.1.9/php_apc.c:1418
#8 0x0000000000718b98 in zend_do_fcall_common_helper_SPEC
(execute_data=0x2b78753a9fd0) at /root/soft/php-5.3.6/Zend/zend_vm_execute.h:316
#9 0x000000000071819c in execute (op_array=0x5bec870) at /root/soft/php-
5.3.6/Zend/zend_vm_execute.h:107
#10 0x00002b7873644aa6 in zend_oe () from
/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-
20090626/ZendGuardLoader.so
#11 0x00000000007186c2 in zend_do_fcall_common_helper_SPEC
(execute_data=0x2b78753a9050) at /root/soft/php-5.3.6/Zend/zend_vm_execute.h:340
#12 0x000000000071819c in execute (op_array=0x5bd0c48) at /root/soft/php-
5.3.6/Zend/zend_vm_execute.h:107
#13 0x00002b7873644aa6 in zend_oe () from
/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-
20090626/ZendGuardLoader.so
#14 0x00000000006f312d in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/soft/php-5.3.6/Zend/zend.c:1194
#15 0x00000000006a25bd in php_execute_script (primary_file=0x7fffe014e710) at
/root/soft/php-5.3.6/main/main.c:2268
#16 0x000000000077d81f in main (argc=3, argv=<value optimized out>) at
/root/soft/php-5.3.6/sapi/fpm/fpm/fpm_main.c:1917
apc.serializer=igbinary:
#0 zend_hash_get_current_key_ex (ht=0x2aaaab56eb30, str_index=0x7fffe9b2eda8,
str_length=0x7fffe9b2ee00, num_index=0x7fffe9b2eda0, duplicate=0 '\000',
pos=0x7fffe9b2edb8) at /root/soft/php-5.3.6/Zend/zend_hash.c:1119
1119 if (p->nKeyLength) {
(gdb) bt
#0 zend_hash_get_current_key_ex (ht=0x2aaaab56eb30, str_index=0x7fffe9b2eda8,
str_length=0x7fffe9b2ee00, num_index=0x7fffe9b2eda0, duplicate=0 '\000',
pos=0x7fffe9b2edb8) at /root/soft/php-5.3.6/Zend/zend_hash.c:1119
#1 0x00002af4013ddb03 in igbinary_serialize_array (igsd=0x7fffe9b2ee50, z=
<value optimized out>) at /root/soft/igbinary-1.1.1/igbinary.c:862
#2 igbinary_serialize_zval (igsd=0x7fffe9b2ee50, z=<value optimized out>) at
/root/soft/igbinary-1.1.1/igbinary.c:1225
#3 0x00002af4013e3d10 in igbinary_serialize (ret=0x7fffe9b2ef00,
ret_len=0x7fffe9b2ef08, z=0x2aaaab56e938) at /root/soft/igbinary-
1.1.1/igbinary.c:333
#4 0x00002af4013e3e29 in igbinary_apc_serializer (buf=0x2aaaab56eb30,
buf_len=0x7fffe9b2eda8, value=0x0, config=0x7fffe9b2eda0) at
/root/soft/igbinary-1.1.1/igbinary.c:534
#5 0x00002af400d85fbb in my_serialize_object (dst=0x2af401888466,
src=0x2aaaab56e938, ctxt=<value optimized out>) at /root/Redis/APC-
3.1.9/apc_compile.c:244
#6 my_copy_zval (dst=0x2af401888466, src=0x2aaaab56e938, ctxt=<value optimized
out>) at /root/Redis/APC-3.1.9/apc_compile.c:363
#7 0x00002af400d8e1e0 in apc_bin_dump (files=0xbbb0130, user_vars=<value
optimized out>) at /root/Redis/APC-3.1.9/apc_bin.c:726
#8 0x00002af400d7f9e1 in zif_apc_bin_dumpfile (ht=<value optimized out>,
return_value=0xbbf1c48, return_value_ptr=<value optimized out>, this_ptr=<value
optimized out>, return_value_used=<value optimized out>)
at /root/Redis/APC-3.1.9/php_apc.c:1418
#9 0x0000000000718b98 in zend_do_fcall_common_helper_SPEC
(execute_data=0x2af401807050) at /root/soft/php-5.3.6/Zend/zend_vm_execute.h:316
#10 0x000000000071819c in execute (op_array=0xbb2d900) at /root/soft/php-
5.3.6/Zend/zend_vm_execute.h:107
#11 0x00002af3ffaa2aa6 in zend_oe () from
/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-
20090626/ZendGuardLoader.so
#12 0x00000000006f312d in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/soft/php-5.3.6/Zend/zend.c:1194
#13 0x00000000006a25bd in php_execute_script (primary_file=0x7fffe9b339f0) at
/root/soft/php-5.3.6/main/main.c:2268
#14 0x000000000077d81f in main (argc=3, argv=<value optimized out>) at
/root/soft/php-5.3.6/sapi/fpm/fpm/fpm_main.c:1917
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
and ,when I do that,It's return a Error... $arrDrop = array('helpers/post.php'); $arr = array(); foreach ($arrDrop as $key => $value) { apc_compile_file(WWWROOT.$value); $arr[] = WWWROOT.$value; } var_dump(apc_bin_dumpfile($arr,null,'a.bin')); ?> helpers/post.php is here : http://paste.ubuntu.org.cn/138814I find the code of this bug. c.php //// APC_bin_dump函数不支持函数的参数设置为默认数组的语法 //// 类中不支持 空数组属性 /**/ class ApiLib{ //not support 1 private $arr=array(); //not support 2 function test($arr = array()) { return true; } } ?> a.php <?php $str = dirname(__FILE__).DIRECTORY_SEPARATOR.'c.php'; apc_store('aaaa',"xxxxx",1); apc_compile_file($str); apc_bin_dumpfile(array($str), null,'ccc.bin'); ?> Run a.php with http method (nginx + php-fpm),fpm will coredump...