php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10541 curl leaks fds on failure
Submitted: 2001-04-28 16:56 UTC Modified: 2001-04-28 17:47 UTC
From: stig@php.net Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0.4pl1 OS: RedHat 7.0
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 !
Your email address:
MUST BE VALID
Solve the problem:
24 + 42 = ?
Subscribe to this entry?

 
 [2001-04-28 16:56 UTC] stig@php.net
curl leaks file descriptors when a curl request fails or is aborted.  How to reproduce:

1. Put a file called "blah.txt" with some plain text in docroot.

2. curltest.php:

<?php
header("Content-type: text/plain");

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://$SERVER_NAME/blah.txt");
curl_exec($ch);
curl_close($ch);

?>

3. run httpd -X and find the process id

4. open curltest.php in your browser and hit Escape (it will hang because the Apache process is busy processing the PHP script)

5. (on Linux) ls -l /proc/<httpd-pid>/fs

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-28 17:47 UTC] sterling@php.net
fixed in cvs, thanks for the report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC