Bug #65584 [Opn->Fbk]: recv() failed (104: Connection reset by peer) while reading response ...

From: Date: Wed, 22 Jul 2015 13:10:22 +0000
Subject: Bug #65584 [Opn->Fbk]: recv() failed (104: Connection reset by peer) while reading response ...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194626@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65584&edit=1

 ID:                 65584
 Updated by:         mike@php.net
 Reported by:        michael dot heuberger at binarykitchen dot com
 Summary:            recv() failed (104: Connection reset by peer) while
                     reading response ...
-Status:             Open
+Status:             Feedback
 Type:               Bug
-Package:            FPM related
+Package:            Scripting Engine problem
 Operating System:   Ubuntu 13.04
 PHP Version:        5.5.3
 Block user comment: N
 Private report:     N

 New Comment:

Please try a current version.


Previous Comments:
------------------------------------------------------------------------
[2014-04-09 14:33:10] craig_carnell at hotmail dot com

You can forget my previous entries.. this is wall down to opcache module being loaded twice by
duplicate ini files.

------------------------------------------------------------------------
[2014-04-08 11:37:39] craig_carnell at hotmail dot com

I have found the specific line in Varien_Io_File. Sometimes it will crash, sometimes it wont on
chdir. The value of $this->_iwd is a valid path - :

/var/www/vhosts/magento-capistrano-dev/releases/20140408102656

Code below:

public function cd($dir)
    {
        if( is_dir($dir) ) {
            @chdir($this->_iwd);
            $this->_cwd = realpath($dir);
            return true;
        } else {
            throw new Exception('Unable to list current working directory.');
            return false;
        }
    }

------------------------------------------------------------------------
[2014-04-07 12:46:07] craig_carnell at hotmail dot com

And again. The same code seems to throw an error randomly. It doesn't always happen. There is
log anywhere apart from my nginx logs which say:

2014/04/07 12:28:37 [error] 16336#0: *390 readv() failed (104: Connection reset by peer) while
reading upstream, client: 127.0.0.1, server: **.co.uk, request: "GET
/registration/form/success/ HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.**.co.uk", referrer:
"http://www.**.co.uk/registration/form/"
2014/04/07 12:31:05 [error] 16336#0: *429 recv() failed (104: Connection reset by peer) while
reading response header from upstream, client: 127.0.0.1, server: **.co.uk, request: "GET
/registration/form/success/ HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.**.co.uk", referrer:
"http://www.**.co.uk/registration/form/"

GDB output:

#0  _zend_mm_free_int (heap=0x178f300, p=0x3ecd330) at
/build/buildd/php5-5.5.3+dfsg/Zend/zend_alloc.c:2104
2104	/build/buildd/php5-5.5.3+dfsg/Zend/zend_alloc.c: No such file or directory.
(gdb) quit
root@web:/tmp# gdb /usr/sbin/php5-fpm /tmp/core-php5-fpm.10563
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php5-fpm...Reading symbols from
/usr/lib/debug/usr/sbin/php5-fpm...done.
done.
[New LWP 10563]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so"
does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so"
does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so"
does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so"
does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in
"/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match
"/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).


warning: the debug information found in
"/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match
"/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

Core was generated by `php-fpm: pool www                                                      
'.
Program terminated with signal 11, Segmentation fault.
#0  _zval_ptr_dtor (zval_ptr=0x2f7374736f68762f) at
/build/buildd/php5-5.5.3+dfsg/Zend/zend_execute_API.c:426
426	/build/buildd/php5-5.5.3+dfsg/Zend/zend_execute_API.c: No such file or directory.
(gdb)

------------------------------------------------------------------------
[2014-04-07 12:42:05] craig_carnell at hotmail dot com

I've also started encountering this issue. I already have php installed so I downloaded the
5.5.3 source and re-compiled with --enable-debug.

Here is my debug output:

root@web:/tmp# gdb /usr/sbin/php5-fpm /tmp/core-php5-fpm.11309
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php5-fpm...Reading symbols from
/usr/lib/debug/usr/sbin/php5-fpm...done.
done.
[New LWP 11309]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so"
does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so"
does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so"
does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so"
does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in
"/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match
"/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).


warning: the debug information found in
"/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match
"/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

Core was generated by `php-fpm: pool www                                                      
'.
Program terminated with signal 11, Segmentation fault.
#0  _zend_mm_free_int (heap=0x178f300, p=0x3f0f1a8) at
/build/buildd/php5-5.5.3+dfsg/Zend/zend_alloc.c:2104
2104	/build/buildd/php5-5.5.3+dfsg/Zend/zend_alloc.c: No such file or directory.
(gdb)

------------------------------------------------------------------------
[2014-03-30 22:19:43] vlad dot rusu at gmail dot com

I am experience the same problems on Ubuntu Server 12.04 / NGINX 1.4.7 & PHP 5.5.10 FPM
(installed from ppa:ondrej/php5).

More specifically, I have two BIG problems, which made me revert to using PHP 5.4 (which works ok,
btw):
1. A LOT of "recv() failed (104: Connection reset by peer)" in NGINX's error.log
This is when using 127.0.0.1:9000 to listen. If I use sockets, I receive also connect() failed
erros.
2. No matter what options tried, PHP-FPM does not log errors. 
All that is logs is "NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is
successful" lines.

This is in spite having error_log = /var/log/php-fpm/fpm.log, log_level = notice, and
catch_workers_output = yes !!
(Opcache disabled/enabled... no difference).

I tried all the possible settings but to no avail.
Reverting to PHP 5.4.26 fixes this issues.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=65584


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


Thread (24 messages)

« previous php.bugs (#194626) next »