Edit report at https://bugs.php.net/bug.php?id=61030&edit=1

 ID:                 61030
 Updated by:         pierr...@php.net
 Reported by:        avk at keystoneinsights dot com
 Summary:            Memory leak when using ssl_verifPeer true
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            cURL related
 Operating System:   fedora 14
 PHP Version:        5.3.10
 Block user comment: N
 Private report:     N

 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

I tried with Xdebug and my memory increased but not with Xdebug disabled.


Previous Comments:
------------------------------------------------------------------------
[2012-02-09 16:47:44] avk at keystoneinsights dot com

Description:
------------
PHP 5.3.10 (cli) (built: Feb  4 2012 08:56:48) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans


libcurl-7.24.0-1.0.cf.fc14.i686
nss-3.12.10-7.fc14.i686
openssl-1.0.0e-1.fc14.i686

Test script:
---------------
#! /usr/bin/env php
<?php class httpsTest{
    function curlHttps($memLeak=false){
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, 'https://sqs.us-east-1.amazonaws.com');
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $memLeak);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_exec($curl);
        curl_close($curl);
    }
}
gc_enable();
$myPid = getmypid();$i=0;
$test  = new httpsTest();
while ($test){
    $test->curlHttps(true);
    echo $i++ ." PHP Info MemUsage: ".memory_get_usage() ."    Linux Info ";
    system('cat /proc/' .$myPid .'/status|grep '.'"VmSize"');
    sleep(1);
}

Expected result:
----------------
The memory usage for PHP and Linux VMSize should stay level over time, which is 
the case when $test->curlHttps(false); is used

Actual result:
--------------
The php memory usage is level but the Linux process memory usage is growing 
with 
132K bytes per 18 iterations.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61030&edit=1

Reply via email to