Details
Description
When configuring the PHP client for persistent connections, a segmentation fault is seen upon the second request for a connection within an Apache MPM environment.
The test script is as follows:
<?php
$iterations = 1;
$time_start = microtime(true);
//$cb = new Couchbase("192.168.1.200:8091"); // uses the default bucket
$cb = new Couchbase("192.168.1.200:8091", "newcachebucket", "password", "newcachebucket", true); // uses the default bucket
for ($i = 1; $i <=$iterations; $i++)
{ $cb->set("a" . $i, 1); //var_dump($cb->get("a" . $i)); $cb->get("a" . $i); }$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did $iterations iterations in $time seconds\n";
If making a request of this script with curl, I see the following:
[root@centosb httpd]# for i in
; do curl http://localhost/;done
Did 1 iterations in 0.009458065032959 seconds
Did 1 iterations in 0.0088930130004883 seconds
Did 1 iterations in 0.0089321136474609 seconds
Did 1 iterations in 0.0089690685272217 seconds
Did 1 iterations in 0.0090639591217041 seconds
Did 1 iterations in 0.0095789432525635 seconds
Did 1 iterations in 0.0090429782867432 seconds
Did 1 iterations in 0.0094709396362305 seconds
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
The error_log shows lots of:
[Sun Jun 17 19:22:32 2012] [notice] child pid 2031 exit signal Segmentation fault (11)
Attachments
For Gerrit Dashboard: PCBC-75 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
17386,2 | PCBC-75: Free persistent structures correctly. | 1.0.x | php-ext-couchbase | Status: MERGED | +2 | +1 |
19942,1 | Merge branch '1.0.x' | master | php-ext-couchbase | Status: MERGED | +2 | +1 |
20591,4 | Fix PCBC-75 fix invalid efree on persistent resources | 1.0.x | php-ext-couchbase | Status: MERGED | +2 | +1 |
20625,1 | Fix PCBC-75 fix invalid efree on persistent resources | master | php-ext-couchbase | Status: ABANDONED | 0 | 0 |
20745,3 | Fix PCBC-75 fix invalid efree on persistent resources | master | php-ext-couchbase | Status: MERGED | +2 | +1 |