View Issue Details

IDProjectCategoryView StatusLast Update
0000749XdebugUsage problems (Wrong Results)public2016-12-23 21:24
ReporteredorianAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.1.0 
Target VersionFixed in Version 
Summary0000749: Triggered pcntl_alarm callbacks lets to socket error when debugging with netbeans
DescriptionWhen debugging the attached code the debugger fails complaining about a broken pipe.

Steps To ReproduceCreate a netbeans project (I've not tried it with other debugger front ends) with a file containing the following code.

Stepping a breakpoint at line 5 ( echo "."; ) and then:

Debug file: Ctrl+Shift+F5
Continue: Ctrl+F5
Wait some seconds
Step Into: F7

Then a "Socket Error" should appear. The IDE log says: "Broken Pipe"

<?php

class myTest {

    function test() {
        echo ".";
    }

}

function a() {

    $params = array();
    $class = new myTest();
    $invoker = new Invoker();
    $invoker->invoke(array($class, 'test'), $params);
    $invoker->invoke(array($class, 'test'), $params);

}

a();
a();

declare(ticks = 1);
class Invoker
{
    public function invoke($callable, array $arguments)
    {
         pcntl_signal(SIGALRM, array($this, 'callback'), TRUE);
         pcntl_alarm(1);

        $result = call_user_func_array($callable, $arguments);

        pcntl_alarm(0);
    }
    
    public function callback() { }
}
Additional Informationphp 5.3.8 --enable-pcntl, current xdebug from pecl.
TagsNo tags attached.
Operating SystemUbuntu 10.04
PHP Version5.3.8

Activities

derick

2011-11-17 17:51

administrator   ~0001860

Could you please provide the remote debug log of such a session, see http://xdebug.org/docs/all_settings#remote_log on how to make one.

cheers,
Derick

edorian

2011-11-18 08:52

reporter  

xdebug_remote.log (94,978 bytes)

edorian

2011-11-18 08:55

reporter   ~0001862

I've attached the log of one run from start to Socket Exception (broken pipe).

derick

2016-11-28 18:38

administrator   ~0003807

Is this still causing you problems?

derick

2016-12-23 21:24

administrator   ~0004095

Closing this, as the requested feedback whether it's still a problem wasn't answered. Please reopen this issue if necessary.

Issue History

Date Modified Username Field Change
2011-11-17 15:40 edorian New Issue
2011-11-17 17:51 derick Note Added: 0001860
2011-11-17 17:51 derick Assigned To => derick
2011-11-17 17:51 derick Status new => feedback
2011-11-18 08:52 edorian File Added: xdebug_remote.log
2011-11-18 08:55 edorian Note Added: 0001862
2011-11-18 08:55 edorian Status feedback => assigned
2012-03-12 16:47 derick Target Version => 2.2.1
2012-07-14 22:14 derick Target Version 2.2.1 => 2.2.2
2013-03-23 14:50 derick Target Version 2.2.2 => 2.2.3
2013-05-22 03:51 derick Target Version 2.2.3 => 2.2.x
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-11-28 18:38 derick Note Added: 0003807
2016-11-28 18:38 derick Status assigned => feedback
2016-12-23 21:24 derick Note Added: 0004095
2016-12-23 21:24 derick Status feedback => resolved
2016-12-23 21:24 derick Resolution open => no change required