php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69692 *** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000
Submitted: 2015-05-22 11:35 UTC Modified: 2015-05-31 04:22 UTC
From: syl dot fabre at gmail dot com Assigned:
Status: No Feedback Package: FPM related
PHP Version: 5.4.41 OS: Debian
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-05-22 11:35 UTC] syl dot fabre at gmail dot com
Description:
------------
When PHP-FPM with Apache, using multi_curl with verbose mode and CURLOPT_STDERR sending to a stream (fopen), if you close the stream (fclose) before removing the handle from multi_curl, you will an 500 error


I also have the "Memory map". I can provide it if useful.

Using the same script with a cron job works without any error

Bug was detected on Gandi Simple Hosting
https://www.gandi.net/hebergement/simple?language=php&db=mysql
http://tools.buypacker.com/phpinfo.php

Test script:
---------------
// Initialisation
$mh = curl_multi_init();

// cURL handle
$ch = curl_init();
$fp = fopen(__DIR__ . '/verbose.log', 'a+');
curl_setopt_array($ch, array(
	CURLOPT_URL				=> 'https://www.google.com',
	CURLOPT_SSL_VERIFYPEER	=> true,
	CURLOPT_VERBOSE			=> true,
	CURLOPT_STDERR			=> $fp
));
curl_multi_add_handle($mh, $ch);

// Close stderr handle
fclose($fp);
// Remove handle
curl_multi_remove_handle($mh, $ch);

Expected result:
----------------
Plain PHP: I'm expecting an php error or exception to be thrown instead of working
PHP-FPM: I'm expecting an php error or exception to be thrown instead of an apache error 500

Actual result:
--------------
- apache: (104)Connection reset by peer: [client 92.90.16.5:3482] FastCGI: failed to read from backend server
- php log: no error
- php-fpm log:
*** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000
======= Backtrace: ========="
"/lib/x86_64-linux-gnu/libc.so.6(+0x75be6)[0x305ea201be6]"
"/lib/x86_64-linux-gnu/libc.so.6(+0x7767c)[0x305ea20367c]"
"/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x305ea20698c]"
"/usr/lib/x86_64-linux-gnu/libcurl.so.4(+0x1d986)[0x305e8e80986]"
"/usr/lib/x86_64-linux-gnu/libcurl.so.4(+0x20a4a)[0x305e8e83a4a]"
"/usr/lib/php5/20100525/curl.so(+0xa3f0)[0x305e90d63f0]"
"php-fpm: pool www[0x6b5d2e]"
"php-fpm: pool www(zend_hash_del_key_or_index+0x28d)[0x6b3b4d]"
"php-fpm: pool www(_zend_list_delete+0x61)[0x6b5e41]"
"/usr/lib/php5/20100525/curl.so(+0x3c4d)[0x305e90cfc4d]"
"php-fpm: pool www[0x74e941]"
"php-fpm: pool www(execute+0x207)[0x7082f7]"
"php-fpm: pool www(zend_execute_scripts+0x15c)[0x6a719c]"
"php-fpm: pool www(php_execute_script+0x1d3)[0x646b33]"
"php-fpm: pool www[0x43251a]"
"/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x305ea1aaead]"
"php-fpm: pool www[0x432d99]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-22 14:20 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2015-05-22 14:20 UTC] danack@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

I believe this may be a duplicate of https://bugs.php.net/bug.php?id=69316 which is fixed, as the test script provided for this bug shows an issue on PHP 5.6.2 but not in PHP 5.6.7

However the version you are reporting it on, 5.4.41; that version is only receiving security updates now due to the PHP support lifecycle - http://php.net/supported-versions.php

Please re-open this, or open a new issue, if you can reproduce this issue on a up-to-date version of PHP.
 [2015-05-31 04:22 UTC] php-bugs 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 "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC