Edit report at https://bugs.php.net/bug.php?id=68453&edit=1
ID: 68453
Comment by: pegasus at vaultwiki dot org
Reported by: pegasus at vaultwiki dot org
Summary: FPM Process hangs in no-debug only
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Centos 6 64-bit
PHP Version: master-Git-2014-11-19 (Git)
Block user comment: N
Private report: N
New Comment:
This issue still persists as of March 11, 2015.
Just did a test and the hang only occurs when using php-fpm.
When processing the script directly using the command line, it completes as expected.
Previous Comments:
------------------------------------------------------------------------
[2015-01-27 18:29:26] pegasus at vaultwiki dot org
As noted, I cannot reproduce this problem using this test script. However, this test script is
lifted almost completely (with classes and methods renamed) from the script that hangs indefinitely.
I am hoping that it at least gives you some idea as to the problem I am encountering. In the
original script, the var_dump() line never occurs. However, as soon as the preceding $arr line is
commented out, the var_dump() occurs. In the original script, it actually does not matter what the
preceding line is: as long as the preceding line uses $item in some way, the script hangs.
### main script ###
require_once('./hello.php');
$test = new Test();
$props = new Test_prop();
$test->set_info($props);
$test->execute();
echo 'done';
exit;
#### hello.php ####
class Test_prop
{
public $id = 0;
public $title = '';
}
class Test
{
protected $stack = array();
function set_info($props)
{
$this->stack = array();
$item = $this->get_item();
if (!$item)
{
$item = array(
'id' => $props->id,
'title' => $props->title,
'key' => 'Error'
);
$this->stack[] = $item;
return;
}
}
function get_item()
{
return false;
}
function execute($do_output = true)
{
reset($this->stack);
$key = key($this->stack);
$first =& $this->stack["$key"];
if ($first['key'] != 'Error')
{
return;
}
foreach ($this->stack AS &$item)
{
$arr = array($item);
var_dump($item);
}
}
}
------------------------------------------------------------------------
[2015-01-23 18:46:16] pegasus at vaultwiki dot org
Here is my configure line. Is there anything that stands out extension-wise that may need to be
updated? What are the minimum version requirements of the various dependencies?
./configure --without-pear --enable-bcmath --enable-libxml --enable-mbstring --enable-sockets
--enable-fpm --prefix=/home/php --with-curl --with-gd --with-jpeg-dir=/usr --with-libdir=/lib64
--with-libxml-dir=/usr/lib64/ --with-mcrypt --with-mysql --with-mysqli --with-openssl=/usr
--with-pic --with-png-dir=/usr --with-xpm-dir=/usr --with-xsl --with-zlib --with-zlib-dir=/usr
--with-fpm-user --with-fpm-group
------------------------------------------------------------------------
[2014-12-30 15:25:40] pegasus at vaultwiki dot org
I have provided feedback several times since opening this bug. The last time was only a few days
ago. No one has responded to me with any suggestions with getting to the bottom of it for some time.
There is a difference. Please make a real response before auto-closing it next time.
------------------------------------------------------------------------
[2014-12-30 10:42:52] 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.
------------------------------------------------------------------------
[2014-12-25 16:59:50] pegasus at vaultwiki dot org
Now over 1 month later I tried the newest update with no change. Since it seems like an infinite
loop occurs, I reworked a recursive class so it no longer accesses itself recursively. This seems to
have eliminated the infinite loop in PHP master, although the recursion worked without issue in PHP
5.6.x and lower.
With this change, the script now actually shows an error message (whether it was the core issue
originally or it is a new issue, I cannot be sure). However, the script still will not complete
execution because of the following error:
Fatal error: Cannot redeclare class [class_already_declared] in
[file_that_doesnt_declare_that_class_at_all] on line 0
This new error makes absolutely no sense. It always happens when using require_once on a specific
file and always claims the same class is trying to redeclare, but that file does not so much as
mention the name of the class. And the "on line 0" is no help either.
------------------------------------------------------------------------
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=68453
--
Edit this bug report at https://bugs.php.net/bug.php?id=68453&edit=1