php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62731 apache ab deadlock
Submitted: 2012-08-03 02:44 UTC Modified: 2013-02-18 00:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: asamaru at asamaru dot net Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.4.5 OS: linux CentOS 5.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
22 - 20 = ?
Subscribe to this entry?

 
 [2012-08-03 02:44 UTC] asamaru at asamaru dot net
Description:
------------
OS : Linux CentOS 5.5
APC : APC-3.1.9, APC-3.1.10, APC-3.1.11
PHP 5.3.14, 5.4.4, 5.4.5
Apache httpd-2.2.15, httpd-2.4.2

a.php

<?php
echo "1";
?>

# /www/bin/ab -c 10 -n 10 http://127.0.0.1/a.php
...
OK

# /www/bin/ab -c 10 -n 1000 http://127.0.0.1/a.php
...
apr_pollset_poll: The timeout specified has expired (70007)
Total of 82 requests completed

Long time stop.
and, apache freeze.

Test script:
---------------
<?php
echo "1";
?>

# /www/bin/ab -c 10 -n 1000 http://127.0.0.1/a.php

Expected result:
----------------
...
apr_pollset_poll: The timeout specified has expired (70007)
Total of 82 requests completed

Actual result:
--------------
              min  mean[+/-sd] median   max
Connect:        1    3   0.5      3       4
Processing:     2    4   0.5      4       5
Waiting:        2    3   0.5      3       5
Total:          4    6   0.7      6       8

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      7
  75%      7
  80%      7
  90%      7
  95%      7
  98%      8
  99%      8
 100%      8 (longest request)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-03 03:24 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-08-03 03:24 UTC] rasmus@php.net
Which type of locking did you choose?

I suggest --enable-apc-pthreadrwlocks
 [2012-08-03 06:47 UTC] asamaru at asamaru dot net
-Status: Feedback +Status: Open
 [2012-08-03 06:47 UTC] asamaru at asamaru dot net
my ./configure

./configure --enable-apc-mmap --with-apxs=/www/bin/apxs --with-php-
config=/usr/bin/php-config  --enable-apc

my APC info

APC Version	3.1.11
PHP Version	5.4.5
APC Host	qrm.manager.yyj.corez.kr (d.scanmon.net) (192.168.12.111)
Server Software	Apache/2.4.2 (Unix) PHP/5.4.5 Phusion_Passenger/3.0.15
Shared Memory	1 Segment(s) with 32.0 MBytes 
(mmap memory, pthread mutex Locks locking)
Start Time	2012/08/03 15:46:21
Uptime	 0 minutes
File Upload Support	1


Runtime Settings
apc.cache_by_default	1
apc.canonicalize	1
apc.coredump_unmap	0
apc.enable_cli	0
apc.enabled	1
apc.file_md5	0
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.include_once_override	0
apc.lazy_classes	0
apc.lazy_functions	0
apc.max_file_size	1M
apc.mmap_file_mask	
apc.num_files_hint	1000
apc.preload_path	
apc.report_autofilter	0
apc.rfc1867	0
apc.rfc1867_freq	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_
apc.rfc1867_ttl	3600
apc.serializer	default
apc.shm_segments	1
apc.shm_size	32M
apc.shm_strings_buffer	4M
apc.slam_defense	1
apc.stat	1
apc.stat_ctime	0
apc.ttl	0
apc.use_request_time	1
apc.user_entries_hint	4096
apc.user_ttl	0
apc.write_lock	1
 [2012-08-03 06:50 UTC] asamaru at asamaru dot net
and i use apache worker. not prefork.
 [2012-08-03 06:56 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-08-03 06:56 UTC] rasmus@php.net
Ah, then all bets are off. We do very little testing against Worker. Try one of 
the other locking mechanisms and see if your results are different.
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 05:03:12 2021 UTC