|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-08 05:36 UTC] oh at ez dot no
Description: ------------ After running APC for a while Apache stalls (using 99% cpu) and I get a lot of these in my error_log: [apc-error] apc_fcntl_lock failed errno:4 After restarting apache everything is fine for a short while. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
I'm running PHP 5.0.4 from Fedora Core4 on x86_64 Dual CPU box and I'm able to repeatedly repeat this error in the log file which leads to stall or sometimes stall happens without this error at all. To repeat it I run stress test for my application which performs search random queries, 10 concurrent connections. The application uses cache a lot... each page generation may cause 50-100 cache lookups. I tried using both fcntl locks and --enable-apc-sem and I get deadlocks in the same place for both of them. The effect however is a bit different - I have all httpd processes deadlocked - so all apache children are getting busy and box load falls to zero. Here is sample backtrace: (gdb) #0 0x00002aaaabc2eb77 in semop () from /lib64/libc.so.6 #1 0x00002aaab132e8e8 in apc_sem_lock (semid=14188550) at /tmp/APC-3.0.8/apc_sem.c:121 #2 0x00002aaab1328c76 in apc_cache_user_find (cache=0x5555559a2000, strkey=0x555555b092f8 "a:2:{i:0;s:13:\"sphinx_search\";i:1;a:9:{i:0;s:6:\"malaga\";i:1;s:4:\"db01\";i:2;i:3312;i:3;i:0;i:4;i:20;i:5;i:0;i:6;a:2:{i:0;i:2;i:1;i:1;}i:7;a:0:{}i:8;i:3;}}", keylen=153, t=1128976730) at /tmp/APC-3.0.8/apc_cache.c:505 #3 0x00002aaab1328108 in zif_apc_fetch (ht=Variable "ht" is not available. ) at /tmp/APC-3.0.8/php_apc.c:488 #4 0x00002aaaafd13bdd in zend_do_fcall_common_helper () from /etc/httpd/modules/libphp5.so #5 0x00002aaaafd238a9 in zend_do_fcall_handler () from /etc/httpd/modules/libphp5.so #6 0x00002aaaafd11255 in execute () from /etc/httpd/modules/libphp5.so #7 0x00002aaaafd135ef in zend_do_fcall_common_helper () from /etc/httpd/modules/libphp5.so #8 0x00002aaaafd11255 in execute () from /etc/httpd/modules/libphp5.so #9 0x00002aaaafd135ef in zend_do_fcall_common_helper () from /etc/httpd/modules/libphp5.so #10 0x00002aaaafd11255 in execute () from /etc/httpd/modules/libphp5.so #11 0x00002aaaafd135ef in zend_do_fcall_common_helper () from /etc/httpd/modules/libphp5.so #12 0x00002aaaafd11255 in execute () from /etc/httpd/modules/libphp5.so #13 0x00002aaaafd135ef in zend_do_fcall_common_helper () from /etc/httpd/modules/libphp5.so #14 0x00002aaaafd11255 in execute () from /etc/httpd/modules/libphp5.so #15 0x00002aaaafcf1fed in zend_execute_scripts () from /etc/httpd/modules/libphp5.so #16 0x00002aaaafcbcf47 in php_execute_script () from /etc/httpd/modules/libphp5.so #17 0x00002aaaafd2a596 in php_ap2_register_hook () from /etc/httpd/modules/libphp5.so #18 0x0000555555571253 in ap_run_handler () from /usr/sbin/httpd #19 0x00005555555715a7 in ap_invoke_handler () from /usr/sbin/httpd #20 0x000055555556e981 in ap_process_request () from /usr/sbin/httpd #21 0x000055555556a04f in _start () from /usr/sbin/httpd #22 0x000055555557aa79 in ap_run_process_connection () from /usr/sbin/httpd #23 0x000055555556f6fe in ap_graceful_stop_signalled () from /usr/sbin/httpd #24 0x000055555556f939 in ap_graceful_stop_signalled () from /usr/sbin/httpd #25 0x00005555555703a0 in ap_mpm_run () from /usr/sbin/httpd #26 0x000055555557612d in main () from /usr/sbin/httpd (gdb) bt full #0 0x00002aaaabc2eb77 in semop () from /lib64/libc.so.6 No symbol table info available. #1 0x00002aaab132e8e8 in apc_sem_lock (semid=14188550) at /tmp/APC-3.0.8/apc_sem.c:121 op = {sem_num = 0, sem_op = -1, sem_flg = 4096} #2 0x00002aaab1328c76 in apc_cache_user_find (cache=0x5555559a2000, strkey=0x555555b092f8 "a:2:{i:0;s:13:\"sphinx_search\";i:1;a:9:{i:0;s:6:\"malaga\";i:1;s:4:\"db01\";i:2;i:3312;i:3;i:0;i:4;i:20;i:5;i:0;i:6;a:2:{i:0;i:2;i:1;i:1;}i:7;a:0:{}i:8;i:3;}}", keylen=153, t=1128976730) at /tmp/APC-3.0.8/apc_cache.c:505 slot = Variable "slot" is not available.