View Issue Details

IDProjectCategoryView StatusLast Update
0001228XdebugUncategorizedpublic2016-12-04 14:53
Reporterroman4e Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Platformx86_64OSLinux mintOS Version17
Product Version2.4.0rc2 
Summary0001228: Crashes under php7 with collect_params option enabled
Description

Compiled for the php7. If not set xdebug.collect_params, all is ok until I set xdebug.collect_params=1 then apache crashes with error:
[mpm_itk:error] [pid 23185] child died with signal 11

Steps To Reproduce

Compile 2.4.0rc2 for php7 and install it
run with option
xdebug.collect_params=1

Additional Information

compilation: ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var --includedir=/usr/local --enable-xdebug --with-php-config=/usr/local/bin/php-config

TagsNo tags attached.
Operating Systemlinux mint 17
PHP Version7.0-dev

Activities

derick

2015-12-08 21:28

administrator   ~0003302

Can you provide a short reproducible script to illustrate this crash?

roman4e

2015-12-08 21:28

reporter   ~0003303

Apache v.2.4.7

roman4e

2015-12-08 21:42

reporter   ~0003304

I'm so sorry. There seems to be a strange error when I try to use register_shutdown_function() but I unable to reproduce it on a simple script.

I write you back here if recognize what's wrong with my code

I have many anonymous calls with deepness 10, but this simple example works ok

<?php
(function()
{
register_shutdown_function(function()
{
var_dump("shutdown");
});
})();
?>

my config:
[xdebug]
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=XDEBUG_IDEKEY
xdebug.collect_params=1

derick

2015-12-08 21:59

administrator   ~0003305

Sorry - I asked for a reproduce script, not for your Apache version. Without a script I can not try to find (and fix) this bug.

derick

2015-12-08 21:59

administrator   ~0003306

Sorry - messages crossed. Let me check that one.

roman4e

2015-12-09 10:07

reporter   ~0003307

Last edited: 2015-12-09 10:27

I found WHEN it happend

I have an array with objects:
var_dump($objects):

array (size=6)
'config' => NFC
'init' => NFC
'bootstrap' => NFC
'finish' => NFC
'fail' => NFC
'route' => NFC

And when I try to var_dump($objects['init']) I get apache process crash.
It occur independent to the value of xdebug.collect_params.

I still can't repeat this issue on simple example.

The code I use is similar to next:
<?php

trait State_T
{
private $something;
public function push()
{
}
}

class Base
{
private $ctrl;
protected function get_smth($name)
{
// mistake here no return
}

protected function __construct(State_ctrl $c)
{
    $this->ctrl = $c;
}

}

class State extends Base
{
Use State_T;
protected $name = "";
private $ctrl;

public function __construct(State_ctrl $c)
{
    parent::__construct($c);
}

public function __toString()
{
    return $this->name;
}

public function __get($what)
{
    return $this->get_smth($name);
}

}

class State_ctrl extends Base
{
protected $states = [];
public function __construct()
{
}

public function add_state($name)
{
    eval('class State_'.$name.' extends State { public function __construct(State_ctrl $c){ $this->name="'.$name.'"; parent::__construct($c);} }');
    $class = "State_{$name}";
    $this->states[$name] = new $class($this);
}

public function traverse()
{
    $keys = array_keys($this->states);

//var_dump($this->states);
$state = $this->states[$keys[0]];
$state_name = (string)$state;
do
{
//var_dump($state,$state_name);
yield $state;
$key = next($keys);
if ( $key === false )
break;
$state = $this->states[$key];
$state_name = (string)$state;
if ( $state === null || $state === false )
break;
}while(1);
}
}

$a = [];
$c = new State_ctrl();
$c->add_state("A");
$c->add_state("B");

var_dump(ini_get("xdebug.collect_params"));

//var_dump($c);
foreach ( $c->traverse() as $s )
var_dump($s);
?>
but there I still have no crash

derick

2016-12-04 14:53

administrator   ~0003895

I still can't reproduce this, and we are several versions later. If this still causes an issue, please reopen this issue.

Issue History

Date Modified Username Field Change
2015-12-08 21:22 roman4e New Issue
2015-12-08 21:28 derick Note Added: 0003302
2015-12-08 21:28 derick Assigned To => derick
2015-12-08 21:28 derick Status new => feedback
2015-12-08 21:28 roman4e Note Added: 0003303
2015-12-08 21:28 roman4e Status feedback => assigned
2015-12-08 21:42 roman4e Note Added: 0003304
2015-12-08 21:59 derick Note Added: 0003305
2015-12-08 21:59 derick Status assigned => feedback
2015-12-08 21:59 derick Note Added: 0003306
2015-12-09 10:07 roman4e Note Added: 0003307
2015-12-09 10:07 roman4e Status feedback => assigned
2015-12-09 10:10 roman4e Note Edited: 0003307
2015-12-09 10:27 roman4e Note Edited: 0003307
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-12-04 14:53 derick Note Added: 0003895
2016-12-04 14:53 derick Status assigned => resolved
2016-12-04 14:53 derick Resolution open => unable to reproduce
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized