Bug #69692 [NEW]: *** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000

From: Date: Fri, 22 May 2015 11:35:22 +0000
Subject: Bug #69692 [NEW]: *** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192824@lists.php.net to get a copy of this message
From:             syl dot fabre at gmail dot com
Operating system: Debian
PHP version:      5.4.41
Package:          FPM related
Bug Type:         Bug
Bug description:*** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000

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]

-- 
Edit bug report at https://bugs.php.net/bug.php?id=69692&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69692&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69692&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69692&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69692&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69692&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69692&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69692&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69692&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69692&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69692&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69692&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69692&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69692&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69692&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69692&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69692&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69692&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69692&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69692&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69692&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#192824) next »