|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-06-28 23:20 UTC] mmucklo at corp dot oodle dot com
Description:
------------
Just tried to roll out PHP 5.4.4 to production site with APC enabled.
Had Segmentation Faults with APC 3.1.10 (resulted in corruption of APC,
require_once's failing that shouldn't, etc.). Upgraded to trunk version of APC
(3.1.11), still getting Seg. Faults.
NOTES:
- PHP 5.4.4
- APC 3.1.11 - trunk version of APC (as of 6/27/2012), initially tried 3.1.10
- Apache 2.2.22
- handful of other extensions
- Large Site, Lots of Files, Heavy Traffic
- Site currently running fine on 5.3.10
Backtrace:
#0 0xf563dcab in apc_new_interned_string (arKey=0x96801bc "getlanguages",
nKeyLength=13)
at /tmp/pear/temp/APC/apc_string.c:86
#1 0xf563313c in apc_string_pmemcpy (str=0x96801bc "getlanguages", len=13,
pool=0xe072c598)
at /tmp/pear/temp/APC/apc_compile.c:284
#2 0xf5633856 in my_copy_zval (dst=0xe0741f78, src=0x9680a84, ctxt=0xff9c6fe0)
at /tmp/pear/temp/APC/apc_compile.c:340
#3 0xf563471f in apc_copy_op_array (dst=0xe0741e00, src=0x967fe40,
ctxt=0xff9c6fe0)
at /tmp/pear/temp/APC/apc_compile.c:1104
#4 0xf5634cd9 in my_copy_function (dst=0x0, src=0x967fe40, ctxt=0xff9c6fe0) at
/tmp/pear/temp/APC/apc_compile.c:472
#5 0xf56335ab in my_copy_hashtable_ex (dst=0xe072c7c0, src=0x9666580,
copy_fn=0xf5634c3c <my_copy_function>,
holds_ptrs=0, ctxt=0xff9c6fe0, check_fn=0xf5635c00 <my_check_copy_function>)
at /tmp/pear/temp/APC/apc_compile.c:927
#6 0xf5633b6d in my_copy_class_entry (dst=0xe072c7a8, src=0x9666568,
ctxt=0xff9c6fe0)
at /tmp/pear/temp/APC/apc_compile.c:668
#7 0xf563501c in apc_copy_new_classes (op_array=0x962bc30, old_count=551,
ctxt=0xff9c6fe0)
at /tmp/pear/temp/APC/apc_compile.c:1437
#8 0xf5636566 in apc_compile_cache_entry (key=0xff9c8190, h=0xff9c8330, type=8,
t=1340921898, op_array=0xff9c7054,
cache_entry=0x86d3285c) at /tmp/pear/temp/APC/apc_main.c:457
#9 0xf5636b2a in my_compile_file (h=0xff9c8330, type=8) at
/tmp/pear/temp/APC/apc_main.c:610
#10 0xf7724adf in phar_compile_file (file_handle=0xff9c8330, type=8)
at /source/release/kenya2/external/build/php-5.4.4/ext/phar/phar.c:3391
#11 0xf784ce23 in compile_filename (type=8, filename=0x95fd458) at
Zend/zend_language_scanner.l:625
#12 0xf78ecbe2 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xf5973704)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:27378
#13 0xf789ff5e in execute (op_array=0x9761a2c)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:410
#14 0xf78718bb in zend_call_function (fci=0xff9c8560, fci_cache=0xff9c8530)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:958
#15 0xf789031d in zend_call_method (object_pp=0x9764300, obj_ce=0x97615b0,
fn_proxy=0x97642fc,
function_name=0x9764e80
"symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002",
function_name_len=69, retval_ptr_ptr=0xff9c85f0, param_count=1,
arg1=0x95e54cc, arg2=0x0)
at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97
#16 0xf77856d0 in zif_spl_autoload_call (ht=1, return_value=0x95fd4f8,
return_value_ptr=0xff9c8724, this_ptr=0x0,
return_value_used=1) at /source/release/kenya2/external/build/php-
5.4.4/ext/spl/php_spl.c:436
#17 0xf78715ef in zend_call_function (fci=0xff9c8750, fci_cache=0xff9c8730)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:980
#18 0xf7872150 in zend_lookup_class_ex (name=0xdd1a2100
"Symfony\\Component\\HttpFoundation\\Request", name_length=40,
key=0xdfa23388, use_autoload=1, ce=0xff9c87d8)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:1127
#19 0xf7872e23 in zend_fetch_class_by_name (class_name=0xdd1a2100
"Symfony\\Component\\HttpFoundation\\Request",
class_name_len=40, key=0xdfa23388, fetch_type=4)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:1607
#20 0xf78a2295 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0xf597368c)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:1173
#21 0xf789ff5e in execute (op_array=0x962b1bc)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:410
#22 0xf78718bb in zend_call_function (fci=0xff9c8960, fci_cache=0xff9c8930)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:958
#23 0xf789031d in zend_call_method (object_pp=0x9764300, obj_ce=0x97615b0,
fn_proxy=0x97642fc,
function_name=0x9764e80
"symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002",
function_name_len=69, retval_ptr_ptr=0xff9c89f0, param_count=1,
arg1=0x95fd38c, arg2=0x0)
at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97
#24 0xf77856d0 in zif_spl_autoload_call (ht=1, return_value=0x95fd2ec,
return_value_ptr=0xff9c8b24, this_ptr=0x0,
return_value_used=1) at /source/release/kenya2/external/build/php-
5.4.4/ext/spl/php_spl.c:436
---Type <return> to continue, or q <return> to quit---
#25 0xf78715ef in zend_call_function (fci=0xff9c8b50, fci_cache=0xff9c8b30)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:980
#26 0xf7872150 in zend_lookup_class_ex (name=0xdd15d0b0
"Odl\\MarketplaceBundle\\Http\\OdlRequest", name_length=37,
key=0xdd4ac3d8, use_autoload=1, ce=0xff9c8bd8)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:1127
#27 0xf7872e23 in zend_fetch_class_by_name (class_name=0xdd15d0b0
"Odl\\MarketplaceBundle\\Http\\OdlRequest",
class_name_len=37, key=0xdd4ac3d8, fetch_type=0)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_execute_API.c:1607
#28 0xf78a65d8 in ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER
(execute_data=0xf59730e0)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:3415
#29 0xf789ff5e in execute (op_array=0x980ee14)
at /source/release/kenya2/external/build/php-
5.4.4/Zend/zend_vm_execute.h:410
#30 0xf787ed47 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /source/release/kenya2/external/build/php-5.4.4/Zend/zend.c:1279
#31 0xf7829efe in php_execute_script (primary_file=0xff9caee0)
at /source/release/kenya2/external/build/php-5.4.4/main/main.c:2473
#32 0xf7904bcf in php_handler (r=0x9313c10)
at /source/release/kenya2/external/build/php-
5.4.4/sapi/apache2handler/sapi_apache2.c:667
#33 0x0807afc2 in ap_run_handler (r=0x9313c10) at config.c:157
#34 0x0807b397 in ap_invoke_handler (r=0x9313c10) at config.c:376
#35 0x080a46d5 in ap_process_request (r=0x9313c10) at http_request.c:282
#36 0x080a2099 in ap_process_http_connection (c=0x9307b78) at http_core.c:190
#37 0x0808092a in ap_run_process_connection (c=0x9307b78) at connection.c:43
#38 0x080cb42e in child_main (child_num_arg=<value optimized out>) at
prefork.c:667
#39 0x080cb606 in make_child (s=<value optimized out>, slot=8) at prefork.c:768
#40 0x080cc18d in ap_mpm_run (_pconf=0x8f050a8, plog=0x8f4d1c8, s=0x8f0e010) at
prefork.c:903
#41 0x0806ac71 in main (argc=3, argv=0xff9cb454) at main.c:753
Expected result:
----------------
No Segmentation Faults, APC running as it should.
Actual result:
--------------
Segmentation Faults, APC corrupted, require_once() failures, etc.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 08:00:01 2025 UTC |
I think this particular fault happened during symfony2's UniversalClassLoader trying to do a load some class, other failures are elsewhere. I need to note that both APC 3.1.10 and 3.1.11 have worked fine both under our development and QA / staging environments and machines (of similar profiles as provided below), although 3.1.11 was tested less than 3.1.10, but no APC issues on those machines. Our error logs are full of require_once() failures (3.1.10) or UniversalClassLoader + require() failures (3.1.11), depending on where the thing choose to crash. Here's the PHP log error messages we're getting: [Thu Jun 28 15:09:51 2012] [error] [client x.y.z.a] PHP Fatal error: require(): in /service/releases/kenya2- 155383/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClass Loader.php on line 229 [Thu Jun 28 15:09:51 2012] [error] [client a.b.c.d] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfon\xdc\xd1*\xddc/Symfony/Component/HttpFoundatif\ x80\x91\r.' include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2- 155383/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClass Loader.php If you notice, the string '/service/local/git/vendor/symfon\xdc\xd1*\xddc/Symf...' is somewhat corrupted. Line 229 of UniversalClassLoader.php is the 'require' line below: vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php -- 221 /** 222 * Loads the given class or interface. 223 * 224 * @param string $class The name of the class 225 */ 226 public function loadClass($class) 227 { 228 if ($file = $this->findFile($class)) { 229 require $file; 230 } 231 } ---------------- Here's some more 'corrupted' log entries from another machine that failed during our rollout: [Thu Jun 28 15:02:04 2012] [error] [client a.b.c.d] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfony/src/Syp\x05;\xddy/Bundle/DoctrineBundle/Conne ctionFa\xd2\xff%% ' (include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2- 155383/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClass Loader.php on line 229 [Thu Jun 28 15:02:04 2012] [error] [client a.b.c.d] PHP Fatal error: require(): in /service/releases/kenya2- 155383/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClass Loader.php on line 229 ----------------- Let me know if there's anything else I can get for you in terms of logs or whatever. If someone wants to see the issue happening live, let me know - I can't make any promises, but I might be able to swing something.Okay, I just ran a fresh 5.4.4 build in production with APC trunk (3.1.11). Here's a fresh new core + log entries (minus referrer info): Log Entries: [Tue Jul 17 17:49:19 2012] [notice] child pid 31167 exit signal Segmentation fault (11), possible coredump in /tmp [Tue Jul 17 17:49:22 2012] [error] [client 10.1.38.43] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfony/sr\x04\xda*\xdd\x90\xd9*\xddy/Component/Security/Acl/Permission/+q\xf9Yk' (include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2-156328/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php on line 229 [Tue Jul 17 17:49:22 2012] [error] [client 10.1.38.43] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfony/sr\x04\xda*\xdd\x90\xd9*\xddy/Component/Security/Acl/Permission/+q\xf9Yk' (include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2-156328/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php on line 229 [Tue Jul 17 17:49:24 2012] [error] [client 10.1.38.43] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfony/sr\x04\xda*\xdd\x90\xd9*\xddy/Component/Security/Acl/Permission/+q\xf9Yk' (include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2-156328/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php on line 229 [Tue Jul 17 17:49:30 2012] [error] [client 10.1.38.43] PHP Fatal error: require(): Failed opening required '/service/local/git/vendor/symfony/sr\x04\xda*\xdd\x90\xd9*\xddy/Component/Security/Acl/Permission/+q\xf9Yk' (include_path='/service/web:/service/local/apache/lib/php:.') in /service/releases/kenya2-156328/local/git/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php on line 229 Core Dump #1: Program terminated with signal 11, Segmentation fault. #0 0xf548ccab in apc_new_interned_string (arKey=0x9bf9ecc "getForeignTableName", nKeyLength=20) at /tmp/pear/temp/APC/apc_string.c:86 86 /tmp/pear/temp/APC/apc_string.c: No such file or directory. in /tmp/pear/temp/APC/apc_string.c (gdb) bt #0 0xf548ccab in apc_new_interned_string (arKey=0x9bf9ecc "getForeignTableName", nKeyLength=20) at /tmp/pear/temp/APC/apc_string.c:86 #1 0xf548213c in apc_string_pmemcpy (str=0x9bf9ecc "getForeignTableName", len=20, pool=0xe04f0fd8) at /tmp/pear/temp/APC/apc_compile.c:284 #2 0xf5482856 in my_copy_zval (dst=0xe0506ca8, src=0x9bfccb8, ctxt=0xffd30970) at /tmp/pear/temp/APC/apc_compile.c:340 #3 0xf548371f in apc_copy_op_array (dst=0xe05067a8, src=0x9bf96f8, ctxt=0xffd30970) at /tmp/pear/temp/APC/apc_compile.c:1104 #4 0xf5483cd9 in my_copy_function (dst=0x0, src=0x9bf96f8, ctxt=0xffd30970) at /tmp/pear/temp/APC/apc_compile.c:472 #5 0xf54825ab in my_copy_hashtable_ex (dst=0xe04f1200, src=0x9be2840, copy_fn=0xf5483c3c <my_copy_function>, holds_ptrs=0, ctxt=0xffd30970, check_fn=0xf5484c00 <my_check_copy_function>) at /tmp/pear/temp/APC/apc_compile.c:927 #6 0xf5482b6d in my_copy_class_entry (dst=0xe04f11e8, src=0x9be2828, ctxt=0xffd30970) at /tmp/pear/temp/APC/apc_compile.c:668 #7 0xf548401c in apc_copy_new_classes (op_array=0x9be14e0, old_count=909, ctxt=0xffd30970) at /tmp/pear/temp/APC/apc_compile.c:1437 #8 0xf5485566 in apc_compile_cache_entry (key=0xffd31b20, h=0xffd31cc0, type=8, t=1342572540, op_array=0xffd309e4, cache_entry=0xdafa3c58) at /tmp/pear/temp/APC/apc_main.c:457 #9 0xf5485b2a in my_compile_file (h=0xffd31cc0, type=8) at /tmp/pear/temp/APC/apc_main.c:610 #10 0xf75722ef in phar_compile_file (file_handle=0xffd31cc0, type=8) at /source/release/kenya2/external/build/php-5.4.4/ext/phar/phar.c:3391 #11 0xf769a633 in compile_filename (type=8, filename=0x9be14c4) at Zend/zend_language_scanner.l:625 #12 0xf773a3f2 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xf57c56d8) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:27378 #13 0xf76ed76e in execute (op_array=0xdceb037c) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #14 0xf76bf0cb in zend_call_function (fci=0xffd31ef0, fci_cache=0xffd31ec0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #15 0xf76ddb2d in zend_call_method (object_pp=0xdceb2c50, obj_ce=0xdceaff00, fn_proxy=0xdceb2c4c, function_name=0xdceb37d0 "symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002", function_name_len=69, retval_ptr_ptr=0xffd31f80, param_count=1, arg1=0x9bbdd00, arg2=0x0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97 #16 0xf75d2ee0 in zif_spl_autoload_call (ht=1, return_value=0x9be148c, return_value_ptr=0xffd320b4, this_ptr=0x0, return_value_used=1) at /source/release/kenya2/external/build/php-5.4.4/ext/spl/php_spl.c:436 #17 0xf76bedff in zend_call_function (fci=0xffd320e0, fci_cache=0xffd320c0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:980 #18 0xf76bf960 in zend_lookup_class_ex (name=0xdd2a440c "Doctrine\\DBAL\\Platforms\\AbstractPlatform", name_length=40, key=0xe03ec0d8, use_autoload=1, ce=0xffd32168) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1127 #19 0xf76c0633 in zend_fetch_class_by_name (class_name=0xdd2a440c "Doctrine\\DBAL\\Platforms\\AbstractPlatform", class_name_len=40, key=0xe03ec0d8, fetch_type=4) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1607 #20 0xf76efaa5 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0xf57c5660) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:1173 #21 0xf76ed76e in execute (op_array=0x9be1348) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #22 0xf76bf0cb in zend_call_function (fci=0xffd322f0, fci_cache=0xffd322c0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #23 0xf76ddb2d in zend_call_method (object_pp=0xdceb2c50, obj_ce=0xdceaff00, fn_proxy=0xdceb2c4c, function_name=0xdceb37d0 "symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002", function_name_len=69, retval_ptr_ptr=0xffd32380, param_count=1, arg1=0x9bb7860, arg2=0x0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97 #24 0xf75d2ee0 in zif_spl_autoload_call (ht=1, return_value=0x9bdd234, return_value_ptr=0xffd324b4, this_ptr=0x0, return_value_used=1) at /source/release/kenya2/external/build/php-5.4.4/ext/spl/php_spl.c:436 #25 0xf76bedff in zend_call_function (fci=0xffd324e0, fci_cache=0xffd324c0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:980 #26 0xf76bf960 in zend_lookup_class_ex (name=0xdd2a3e4c "Doctrine\\DBAL\\Platforms\\MySqlPlatform", name_length=37, key=0xe03cb538, use_autoload=1, ce=0xffd32568) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1127 #27 0xf76c0633 in zend_fetch_class_by_name (class_name=0xdd2a3e4c "Doctrine\\DBAL\\Platforms\\MySqlPlatform", class_name_len=37, key=0xe03cb538, fetch_type=4) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1607 #28 0xf76efaa5 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0xf57c5540) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:1173 #29 0xf76ed76e in execute (op_array=0x9bb73a8) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #30 0xf76bf0cb in zend_call_function (fci=0xffd326e0, fci_cache=0xffd326c0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #31 0xf7600ede in zif_call_user_func (ht=2, return_value=0x9b9dfc8, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /source/release/kenya2/external/build/php- 5.4.4/ext/standard/basic_functions.c:4726 #32 0xf76ee439 in zend_do_fcall_common_helper_SPEC (execute_data=0xf57c3070) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:642 #33 0xf76ed76e in execute (op_array=0x9b97960) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #34 0xf76cc557 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend.c:1279 #35 0xf767770e in php_execute_script (primary_file=0xffd34a50) at /source/release/kenya2/external/build/php-5.4.4/main/main.c:2473 #36 0xf77523df in php_handler (r=0x9646f78) at /source/release/kenya2/external/build/php-5.4.4/sapi/apache2handler/sapi_apache2.c:667 #37 0x0807afc2 in ap_run_handler (r=0x9646f78) at config.c:157 #38 0x0807b397 in ap_invoke_handler (r=0x9646f78) at config.c:376 #39 0x080a46d5 in ap_process_request (r=0x9646f78) at http_request.c:282 #40 0x080a2099 in ap_process_http_connection (c=0x963a9e0) at http_core.c:190 #41 0x0808092a in ap_run_process_connection (c=0x963a9e0) at connection.c:43 #42 0x080cb42e in child_main (child_num_arg=<value optimized out>) at prefork.c:667 #43 0x080cb606 in make_child (s=<value optimized out>, slot=10) at prefork.c:768 #44 0x080cc18d in ap_mpm_run (_pconf=0x92330a8, plog=0x927b1c8, s=0x923c010) at prefork.c:903 #45 0x0806ac71 in main (argc=3, argv=0xffd34fc4) at main.c:753 Core Dump #2: Program terminated with signal 11, Segmentation fault. #0 0xf548ccab in apc_new_interned_string (arKey=0xdca41bec "getForeignTableName", nKeyLength=20) at /tmp/pear/temp/APC/apc_string.c:86 86 /tmp/pear/temp/APC/apc_string.c: No such file or directory. in /tmp/pear/temp/APC/apc_string.c (gdb) bt #0 0xf548ccab in apc_new_interned_string (arKey=0xdca41bec "getForeignTableName", nKeyLength=20) at /tmp/pear/temp/APC/apc_string.c:86 #1 0xf548213c in apc_string_pmemcpy (str=0xdca41bec "getForeignTableName", len=20, pool=0xe0424aa0) at /tmp/pear/temp/APC/apc_compile.c:284 #2 0xf5482856 in my_copy_zval (dst=0xe043a770, src=0xdca449d8, ctxt=0xffd30960) at /tmp/pear/temp/APC/apc_compile.c:340 #3 0xf548371f in apc_copy_op_array (dst=0xe043a270, src=0xdca41418, ctxt=0xffd30960) at /tmp/pear/temp/APC/apc_compile.c:1104 #4 0xf5483cd9 in my_copy_function (dst=0x0, src=0xdca41418, ctxt=0xffd30960) at /tmp/pear/temp/APC/apc_compile.c:472 #5 0xf54825ab in my_copy_hashtable_ex (dst=0xe0424cc8, src=0xdca2aaf8, copy_fn=0xf5483c3c <my_copy_function>, holds_ptrs=0, ctxt=0xffd30960, check_fn=0xf5484c00 <my_check_copy_function>) at /tmp/pear/temp/APC/apc_compile.c:927 #6 0xf5482b6d in my_copy_class_entry (dst=0xe0424cb0, src=0xdca2aae0, ctxt=0xffd30960) at /tmp/pear/temp/APC/apc_compile.c:668 #7 0xf548401c in apc_copy_new_classes (op_array=0xdca29838, old_count=909, ctxt=0xffd30960) at /tmp/pear/temp/APC/apc_compile.c:1437 #8 0xf5485566 in apc_compile_cache_entry (key=0xffd31b10, h=0xffd31cb0, type=8, t=1342572508, op_array=0xffd309d4, cache_entry=0xdafa3c58) at /tmp/pear/temp/APC/apc_main.c:457 #9 0xf5485b2a in my_compile_file (h=0xffd31cb0, type=8) at /tmp/pear/temp/APC/apc_main.c:610 #10 0xf75722ef in phar_compile_file (file_handle=0xffd31cb0, type=8) at /source/release/kenya2/external/build/php-5.4.4/ext/phar/phar.c:3391 #11 0xf769a633 in compile_filename (type=8, filename=0xdca2981c) at Zend/zend_language_scanner.l:625 #12 0xf773a3f2 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0xf57c56d8) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:27378 #13 0xf76ed76e in execute (op_array=0xdceaed10) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #14 0xf76bf0cb in zend_call_function (fci=0xffd31ee0, fci_cache=0xffd31eb0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #15 0xf76ddb2d in zend_call_method (object_pp=0xdceb15e4, obj_ce=0xdceae894, fn_proxy=0xdceb15e0, function_name=0xdceb2164 "symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002", function_name_len=69, retval_ptr_ptr=0xffd31f70, param_count=1, arg1=0xdca23b90, arg2=0x0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97 #16 0xf75d2ee0 in zif_spl_autoload_call (ht=1, return_value=0xdca297e4, return_value_ptr=0xffd320a4, this_ptr=0x0, return_value_used=1) at /source/release/kenya2/external/build/php-5.4.4/ext/spl/php_spl.c:436 #17 0xf76bedff in zend_call_function (fci=0xffd320d0, fci_cache=0xffd320b0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:980 #18 0xf76bf960 in zend_lookup_class_ex (name=0xdd2a440c "Doctrine\\DBAL\\Platforms\\AbstractPlatform", name_length=40, key=0xe03ec0d8, use_autoload=1, ce=0xffd32158) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1127 #19 0xf76c0633 in zend_fetch_class_by_name (class_name=0xdd2a440c "Doctrine\\DBAL\\Platforms\\AbstractPlatform", class_name_len=40, key=0xe03ec0d8, fetch_type=4) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1607 #20 0xf76efaa5 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0xf57c5660) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:1173 #21 0xf76ed76e in execute (op_array=0xdca296a0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #22 0xf76bf0cb in zend_call_function (fci=0xffd322e0, fci_cache=0xffd322b0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #23 0xf76ddb2d in zend_call_method (object_pp=0xdceb15e4, obj_ce=0xdceae894, fn_proxy=0xdceb15e0, function_name=0xdceb2164 "symfony\\component\\classloader\\apcuniversalclassloader::loadclass\002", function_name_len=69, retval_ptr_ptr=0xffd32370, param_count=1, arg1=0xdca1d70c, arg2=0x0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_interfaces.c:97 #24 0xf75d2ee0 in zif_spl_autoload_call (ht=1, return_value=0xdca2558c, return_value_ptr=0xffd324a4, this_ptr=0x0, return_value_used=1) at /source/release/kenya2/external/build/php-5.4.4/ext/spl/php_spl.c:436 #25 0xf76bedff in zend_call_function (fci=0xffd324d0, fci_cache=0xffd324b0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:980 #26 0xf76bf960 in zend_lookup_class_ex (name=0xdd2a3e4c "Doctrine\\DBAL\\Platforms\\MySqlPlatform", name_length=37, key=0xe03cb538, use_autoload=1, ce=0xffd32558) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1127 #27 0xf76c0633 in zend_fetch_class_by_name (class_name=0xdd2a3e4c "Doctrine\\DBAL\\Platforms\\MySqlPlatform", class_name_len=37, key=0xe03cb538, fetch_type=4) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:1607 #28 0xf76efaa5 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER (execute_data=0xf57c5540) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:1173 #29 0xf76ed76e in execute (op_array=0xdca1d254) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #30 0xf76bf0cb in zend_call_function (fci=0xffd326d0, fci_cache=0xffd326b0) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_execute_API.c:958 #31 0xf7600ede in zif_call_user_func (ht=2, return_value=0xdca7ba1c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /source/release/kenya2/external/build/php-5.4.4/ext/standard/basic_functions.c:4726 #32 0xf76ee439 in zend_do_fcall_common_helper_SPEC (execute_data=0xf57c3070) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:642 #33 0xf76ed76e in execute (op_array=0xdca75438) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend_vm_execute.h:410 #34 0xf76cc557 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /source/release/kenya2/external/build/php-5.4.4/Zend/zend.c:1279 #35 0xf767770e in php_execute_script (primary_file=0xffd34a40) at /source/release/kenya2/external/build/php-5.4.4/main/main.c:2473 #36 0xf77523df in php_handler (r=0x9646f78) at /source/release/kenya2/external/build/php-5.4.4/sapi/apache2handler/sapi_apache2.c:667 #37 0x0807afc2 in ap_run_handler (r=0x9646f78) at config.c:157 #38 0x0807b397 in ap_invoke_handler (r=0x9646f78) at config.c:376 #39 0x080a46d5 in ap_process_request (r=0x9646f78) at http_request.c:282 #40 0x080a2099 in ap_process_http_connection (c=0x963a9e0) at http_core.c:190 #41 0x0808092a in ap_run_process_connection (c=0x963a9e0) at connection.c:43 #42 0x080cb42e in child_main (child_num_arg=<value optimized out>) at prefork.c:667 #43 0x080cb606 in make_child (s=<value optimized out>, slot=0) at prefork.c:768 #44 0x080cb694 in startup_children (number_to_start=5) at prefork.c:786 #45 0x080cbebc in ap_mpm_run (_pconf=0x92330a8, plog=0x927b1c8, s=0x923c010) at prefork.c:1007 #46 0x0806ac71 in main (argc=3, argv=0xffd34fc4) at main.c:753What exactly is that code doing? It looks to me like it is calling call_user_func_array() which calls some user-defined function which in turn does an apc_store('Attribute-YAML_id', ??) with some nasty-looking value there. An object containing an array or is it a nested array? Could you perhaps find that bit of code and see if you could write a simplified version that causes this segfault? If I can reproduce it here I can likely fix it. My best guess is that it is an interned string issue when storing nested arrays in the user cache, but my quick little test of that here worked ok.Sorry for the delay in replay - per Rasmus - we have a lot of APC caching of YAML arrays / strings / keys + values, etc. I saw that some updates on PHP and APC were done, however I had a major crash and burn this time (PHP 5.4.5 plus APC 3.1.12 - trunk #326931) - it core dumped all over the place. I saw some recent APC changes around shutdown so I think maybe there's a new bug? Core was generated by `/service/local/apache/bin/httpd -f /service/conf/httpd.php.conf'. Program terminated with signal 11, Segmentation fault. #0 zend_mm_remove_from_free_list (heap=0x844be80, p=<value optimized out>) at /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c:786 786 /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c: No such file or directory. in /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c (gdb) bt #0 zend_mm_remove_from_free_list (heap=0x844be80, p=<value optimized out>) at /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c:786 #1 _zend_mm_free_int (heap=0x844be80, p=<value optimized out>) at /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c:2106 #2 0xf54a7193 in apc_php_free (p=0xdcd81e50) at /tmp/pear/temp/APC/apc_zend.c:43 #3 0xf54a5ff3 in apc_deactivate () at /tmp/pear/temp/APC/apc_main.c:980 #4 apc_request_shutdown () at /tmp/pear/temp/APC/apc_main.c:1037 #5 0xf549ba55 in zm_deactivate_apc (type=1, module_number=44) at /tmp/pear/temp/APC/php_apc.c:407 #6 0xf76f08b8 in zend_deactivate_modules () at /source/release/latvia/external/build/php-5.4.5/Zend/zend_API.c:2333 #7 0xf7696dbf in php_request_shutdown (dummy=0x0) at /source/release/latvia/external/build/php-5.4.5/main/main.c:1750 #8 0xf7772b4e in php_apache_request_dtor (r=0x87fbc68) at /source/release/latvia/external/build/php- 5.4.5/sapi/apache2handler/sapi_apache2.c:507 #9 php_handler (r=0x87fbc68) at /source/release/latvia/external/build/php- 5.4.5/sapi/apache2handler/sapi_apache2.c:679 #10 0x0807afc2 in ap_run_handler (r=0x87fbc68) at config.c:157 #11 0x0807b397 in ap_invoke_handler (r=0x87fbc68) at config.c:376 #12 0x080a46d5 in ap_process_request (r=0x87fbc68) at http_request.c:282 #13 0x080a2099 in ap_process_http_connection (c=0x87f5de8) at http_core.c:190 #14 0x0808092a in ap_run_process_connection (c=0x87f5de8) at connection.c:43 #15 0x080cb42e in child_main (child_num_arg=<value optimized out>) at prefork.c:667 #16 0x080cb606 in make_child (s=<value optimized out>, slot=2) at prefork.c:768 #17 0x080cb694 in startup_children (number_to_start=3) at prefork.c:786 #18 0x080cbebc in ap_mpm_run (_pconf=0x83f30a8, plog=0x843b1c8, s=0x83fc010) at prefork.c:1007 #19 0x0806ac71 in main (argc=3, argv=0xffa55cc4) at main.c:753I updated our APC with the latest from trunk (3.1.12 v #326996 as of 8/6/2012), and ran things again. Lots of cores again, here's a typical trace: Program terminated with signal 11, Segmentation fault. #0 0xf7744097 in zend_mm_remove_from_free_list (heap=0x87e9e60, p=<value optimized out>) at /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c:833 833 /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c: No such file or directory. in /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c (gdb) bt #0 0xf7744097 in zend_mm_remove_from_free_list (heap=0x87e9e60, p=<value optimized out>) at /source/release/latvia/external/build/php-5.4.5/Zend/zend_alloc.c:833 #1 _zend_mm_free_int (heap=0x87e9e60, p=<value optimized out>) at /source/release/latvia/external/build/php- 5.4.5/Zend/zend_alloc.c:2101 #2 0xf55211a3 in apc_php_free (p=0x8c1a1d8) at /tmp/pear/temp/APC/apc_zend.c:43 #3 0xf551b5e1 in my_free_hashtable (ht=0x8c26504, type=1) at /tmp/pear/temp/APC/apc_compile.c:920 #4 0xf551df8a in apc_free_class_entry_after_execution (src=0x8c264c4) at /tmp/pear/temp/APC/apc_compile.c:2030 #5 0xf551ff1c in apc_deactivate () at /tmp/pear/temp/APC/apc_main.c:949 #6 apc_request_shutdown () at /tmp/pear/temp/APC/apc_main.c:1041 #7 0xf5515a55 in zm_deactivate_apc (type=1, module_number=44) at /tmp/pear/temp/APC/php_apc.c:407 #8 0xf776a8b8 in zend_deactivate_modules () at /source/release/latvia/external/build/php-5.4.5/Zend/zend_API.c:2333 #9 0xf7710dbf in php_request_shutdown (dummy=0x0) at /source/release/latvia/external/build/php-5.4.5/main/main.c:1750 #10 0xf77ecb4e in php_apache_request_dtor (r=0x8b99c50) at /source/release/latvia/external/build/php- 5.4.5/sapi/apache2handler/sapi_apache2.c:507 #11 php_handler (r=0x8b99c50) at /source/release/latvia/external/build/php-5.4.5/sapi/apache2handler/sapi_apache2.c:679 #12 0x0807afc2 in ap_run_handler (r=0x8b99c50) at config.c:157 #13 0x0807b397 in ap_invoke_handler (r=0x8b99c50) at config.c:376 #14 0x080a46d5 in ap_process_request (r=0x8b99c50) at http_request.c:282 #15 0x080a2099 in ap_process_http_connection (c=0x8b93dd0) at http_core.c:190 #16 0x0808092a in ap_run_process_connection (c=0x8b93dd0) at connection.c:43 #17 0x080cb42e in child_main (child_num_arg=<value optimized out>) at prefork.c:667 #18 0x080cb606 in make_child (s=<value optimized out>, slot=15) at prefork.c:768 #19 0x080cc18d in ap_mpm_run (_pconf=0x87910a8, plog=0x87d91c8, s=0x879a010) at prefork.c:903 #20 0x0806ac71 in main (argc=3, argv=0xfffd0a54) at main.c:753Getting something very similar - PHP 5.4.4 - APC 3.1.12 - Apache 2.2.10 - SLES 11 - also a huge site and this happens randomly, but using 3.1.10 or 3.1.11 fixes it completely #0 apc_new_interned_string (arKey=0x7fac7f94a2b0 "load", nKeyLength=5) at /tmp/pear/temp/APC/apc_string.c:86 #1 0x00007fac73180bd7 in apc_string_pmemcpy (str=0x7fac7f94a2b0 "load", len=5, pool=0x7fac6b7a32c8) at /tmp/pear/temp/APC/apc_compile.c:291 #2 0x00007fac731845b3 in my_copy_zval (dst=0x7fac6b7a53e8, src=0x7fac7f94b908, ctxt=0x7fff65dfbbd0) at /tmp/pear/temp/APC/apc_compile.c:348 #3 0x00007fac73181cfb in apc_copy_op_array (dst=0x7fac6b7a41f8, src=0x7fac7f949e80, ctxt=0x7fff65dfbbd0) at /tmp/pear/temp/APC/apc_compile.c:1211 #4 0x00007fac73182576 in my_copy_function (dst=0x7fac6b7a41f8, src=0x7fac7f949e80, ctxt=0x7fff65dfbbd0) at /tmp/pear/temp/APC/apc_compile.c:490 #5 0x00007fac73184292 in my_copy_hashtable_ex (dst=0x7fac6b7a39d0, src=<value optimized out>, copy_fn=0x7fac731824f0 <my_copy_function>, holds_ptrs=0, ctxt=0x7fff65dfbbd0, check_fn=0x7fac73180aa0 <my_check_copy_function>) at /tmp/pear/temp/APC/apc_compile.c:1034 #6 0x00007fac73182900 in my_copy_class_entry (dst=0x7fac6b7a39a8, src=0x7fac7f9490f0, ctxt=0x7fff65dfbbd0) at /tmp/pear/temp/APC/apc_compile.c:687 #7 0x00007fac73183ada in apc_copy_new_classes (op_array=<value optimized out>, old_count=<value optimized out>, ctxt=0x7fff65dfbbd0) at /tmp/pear/temp/APC/apc_compile.c:1544 #8 0x00007fac73185420 in apc_compile_cache_entry (key=0x7fff65dfcdf0, h=0x7fff65dfd070, type=<value optimized out>, t=<value optimized out>, op_array=0x7fff65dfce48, cache_entry=0x7fff65dfce50) at /tmp/pear/temp/APC/apc_main.c:446 #9 0x00007fac73185c5b in my_compile_file (h=0x7fff65dfd070, type=8) at /tmp/pear/temp/APC/apc_main.c:603 #10 0x00007fac7b9c97fa in phar_compile_file (file_handle=0x7fff65dfd070, type=8) at /usr/local/src/php/php-5.4.4/ext/phar/phar.c:3391