View Issue Details

IDProjectCategoryView StatusLast Update
0000837XdebugUsage problems (Wrong Results)public2012-06-01 10:21
ReporterspellerAssigned Toderick 
PriorityimmediateSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformx86OSWindowsOS Version7
Product Version2.2.0 
Target Version2.2.1Fixed in Version2.2.1 
Summary0000837: xdebug crashes on some breakpoints
DescriptionI am using PHPStorm to debug scripts. After upgrading to PHP 5.4.3 and XDebug 2.2.0 debugging process become impossible in some random places in code. The project is large. I create a breakpoint, run debugging, PHP stops on this breakpoint and crashes immediately. Entire PHP process is crashed and terminated.

XDebug writes this log:

--- begin of log file ---
Log opened at 2012-05-17 00:48:46
I: Checking remote connect back address.
I: Remote address found, connecting to 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/usr/work/vlru/comments/web/index.php" language="PHP" protocol_version="1.0" appid="2960"><engine version="2.2.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>

<- feature_set -i 0 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>

<- feature_set -i 1 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

<- feature_set -i 2 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>

<- status -i 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="3" status="starting" reason="ok"></response>

<- step_into -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="4" status="break" reason="ok"><xdebug:message filename="file:///C:/usr/work/vlru/comments/web/index.php" lineno="2"></xdebug:message></response>

<- eval -i 5 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="5"><property address="11461980" type="bool"><![CDATA[0]]></property></response>

<- eval -i 6 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="6"><property address="11461980" type="bool"><![CDATA[1]]></property></response>

<- eval -i 7 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="7"><property address="11461980" type="string" size="12" encoding="base64"><![CDATA[Y29tbWVudHMubG9j]]></property></response>

<- eval -i 8 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="8"><property address="11461980" type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property></response>

<- eval -i 9 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="9"><property address="11461980" type="string" size="800" encoding="base64"><![CDATA[L2xvZ2ludmVyaWZ5P3JldHVyblVybD0lMkYmb3BlbmlkLm5zPWh0dHAlM0ElMkYlMkZzcGVjcy5vcGVuaWQubmV0JTJGYXV0aCUyRjIuMCZvcGVuaWQub3BfZW5kcG9pbnQ9aHR0cCUzQSUyRiUyRmJhemEuZmFycG9zdC5ydSUyRmJhY2tlbmQlMkZvcGVuaWQmb3BlbmlkLmNsYWltZWRfaWQ9aHR0cCUzQSUyRiUyRjU5NzklNDBiYXphLmZhcnBvc3QucnUlMkZiYWNrZW5kJTJGb3BlbmlkJm9wZW5pZC5yZXNwb25zZV9ub25jZT0yMDEyLTA1LTE3VDAwJTNBMzElM0ExMVowJm9wZW5pZC5tb2RlPWlkX3JlcyZvcGVuaWQuaWRlbnRpdHk9NTk3OSZvcGVuaWQucmV0dXJuX3RvPWh0dHAlM0ElMkYlMkZjb21tZW50cy5sb2MlMkZsb2dpbnZlcmlmeSUzRnJldHVyblVybCUzRCUyNTJGJm9wZW5pZC5hc3NvY19oYW5kbGU9MTMzNzAzOTA1ODk2OC04Jm9wZW5pZC5zaWduZWQ9b3BfZW5kcG9pbnQlMkNjbGFpbWVkX2lkJTJDaWRlbnRpdHklMkNyZXR1cm5fdG8lMkNyZXNwb25zZV9ub25jZSUyQ2Fzc29jX2hhbmRsZSUyQ2V4dDEubW9kZSUyQ2V4dDEudHlwZS51c2VySWQlMkNleHQxLnZhbHVlLnVzZXJJZCZvcGVuaWQuc2lnPXB0ZlpLeE9KZjhEdFpyQVBmUXZWakNQVXBuWjVKQmpRT0k3blNZcHhuU1ElM0Qmb3BlbmlkLm5zLmV4dDE9aHR0cCUzQSUyRiUyRm9wZW5pZC5uZXQlMkZzcnYlMkZheCUyRjEuMCZvcGVuaWQuZXh0MS5tb2RlPWZldGNoX3Jlc3BvbnNlJm9wZW5pZC5leHQxLnR5cGUudXNlcklkPWh0dHAlM0ElMkYlMkZheHNjaGVtYS5vcmclMkZ1c2VySWQmb3BlbmlkLmV4dDEudmFsdWUudXNlcklkPTU5Nzk=]]></property></response>

<- breakpoint_set -i 10 -t line -f file:///C:/usr/work/vlru/comments/src/Application/Controller/AuthenticationController.php -n 118
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="29600001"></response>

<- stack_get -i 11
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="11"><stack where="{main}" level="0" type="file" filename="file:///C:/usr/work/vlru/comments/web/index.php" lineno="2"></stack></response>

<- run -i 12
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="break" reason="ok"><xdebug:message filename="file:///C:/usr/work/vlru/comments/src/Application/Controller/AuthenticationController.php" lineno="118"></xdebug:message></response>

<- stack_get -i 13
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="13"><stack where="Application\Controller\AuthenticationController->verifyLoginStep2" level="0" type="file" filename="file:///C:/usr/work/vlru/comments/src/Application/Controller/AuthenticationController.php" lineno="118"></stack><stack where="call_user_func_array" level="1" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/ControllerActionInvoker.php" lineno="45"></stack><stack where="FarPost\RequestDispatcher\Controller\ControllerActionInvoker->invokeActionMethod" level="2" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/ControllerActionInvoker.php" lineno="45"></stack><stack where="FarPost\RequestDispatcher\Controller\BaseControllerActionInvoker->invokeActionMethodWithFilters" level="3" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/BaseControllerActionInvoker.php" lineno="120"></stack><stack where="FarPost\RequestDispatcher\Controller\BaseControllerActionInvoker->invokeAction" level="4" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/BaseControllerActionInvoker.php" lineno="77"></stack><stack where="FarPost\RequestDispatcher\Controller\AbstractController->executeCore" level="5" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/AbstractController.php" lineno="68"></stack><stack where="FarPost\RequestDispatcher\Controller\AbstractController->execute" level="6" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Controller/AbstractController.php" lineno="73"></stack><stack where="FarPost\RequestDispatcher\Route\RouteMapRequestDispatcher->executeController" level="7" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Route/RouteMapRequestDispatcher.php" lineno="117"></stack><stack where="FarPost\RequestDispatcher\Route\RouteMapRequestDispatcher->dispatchAction" level="8" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Route/RouteMapRequestDispatcher.php" lineno="102"></stack><stack where="FarPost\RequestDispatcher\Route\RouteMapRequestDispatcher->dispatchRequestCore" level="9" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Route/RouteMapRequestDispatcher.php" lineno="92"></stack><stack where="FarPost\RequestDispatcher\Route\RouteMapRequestDispatcher->dispatchRequest" level="10" type="file" filename="file:///C:/usr/work/vlru/comments/pear/FarPost/RequestDispatcher/Route/RouteMapRequestDispatcher.php" lineno="71"></stack><stack where="Application\Bootstrap->run" level="11" type="file" filename="file:///C:/usr/work/vlru/comments/src/Application/Bootstrap.php" lineno="67"></stack><stack where="{main}" level="12" type="file" filename="file:///C:/usr/work/vlru/comments/web/index.php" lineno="22"></stack></response>

<- context_names -i 14 -d 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="14"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context></response>

<- context_get -i 15 -d 0 -c 0
--- end of log file ---
TagsNo tags attached.
Operating System
PHP Version5.4.3

Activities

speller

2012-05-17 02:06

reporter  

xdebug.log (8,526 bytes)

speller

2012-05-17 02:07

reporter   ~0002164

OS is Windows, PHP runs in FastCGI mode.

derick

2012-05-17 08:36

administrator   ~0002169

Hi!

Thanks for this report, but for it to be really useful, I would also need a short standalone script that reproduces the problem. Could you please help in narrowing down your code base and provide such a script please?

cheers,
Derick

speller

2012-05-18 02:43

reporter  

sample.php (99 bytes)

speller

2012-05-18 02:47

reporter   ~0002180

Hi! I uploaded simple example which reproduces the problem. Download the LightOpenId library, put the 'openid.php' file near the sample, set breakpoint on the '$oid->validate();' line and try to debug this method.

rulatir

2012-05-27 16:20

reporter   ~0002190

Derick, any progress on this? Did you manage to reproduce the crash with the sample submitted by speller on 2012-05-18?

rulatir

2012-05-28 01:18

reporter  

bug837.php (358 bytes)

rulatir

2012-05-28 01:27

reporter   ~0002194

I managed to trim speller's example to one file under 20 lines. This is the smallest version that crashes reliably on my machine, and when I remove further members from the class, it crashes only sometimes. This means that it might not work for you - in this case please paste a few more class members back from openid.php (also attached).

Set a breakpoint at the last line (exit;).

What is your gcc version btw.?

rulatir

2012-05-28 01:28

reporter  

openid.php (34,214 bytes)

derick

2012-05-28 09:16

administrator   ~0002195

Rulatir, I just tried with your script but no luck. Could I see your phpinfo() section on Xdebug and the remote log that belongs to a debugging session that crashes (from the script you posted)?

derick

2012-05-28 09:27

administrator   ~0002205

I think I've just pushed a fix to github for this issue. Could you please try it?

speller

2012-05-30 03:13

reporter   ~0002218

Derick, can you provide compiled version for Windows to test this bug?

derick

2012-05-31 11:04

administrator   ~0002219

Yes: http://xdebug.org/files/xdebug-latest.tgz

speller

2012-06-01 03:17

reporter   ~0002220

Seems issue is fixed in the master version. The example I provided do not crashes. Will check it in work.

derick

2012-06-01 10:21

administrator   ~0002221

Cheers, thanks for checking.

Issue History

Date Modified Username Field Change
2012-05-17 02:01 speller New Issue
2012-05-17 02:06 speller File Added: xdebug.log
2012-05-17 02:07 speller Note Added: 0002164
2012-05-17 08:36 derick Note Added: 0002169
2012-05-17 08:36 derick Assigned To => derick
2012-05-17 08:36 derick Status new => feedback
2012-05-17 08:36 derick Target Version => 2.2.1
2012-05-17 08:36 derick Description Updated View Revisions
2012-05-18 02:43 speller File Added: sample.php
2012-05-18 02:47 speller Note Added: 0002180
2012-05-18 02:47 speller Status feedback => assigned
2012-05-27 16:20 rulatir Note Added: 0002190
2012-05-28 01:18 rulatir File Added: bug837.php
2012-05-28 01:27 rulatir Note Added: 0002194
2012-05-28 01:28 rulatir File Added: openid.php
2012-05-28 09:16 derick Note Added: 0002195
2012-05-28 09:27 derick Note Added: 0002205
2012-05-28 09:27 derick Status assigned => feedback
2012-05-30 03:13 speller Note Added: 0002218
2012-05-30 03:13 speller Status feedback => assigned
2012-05-31 11:04 derick Note Added: 0002219
2012-06-01 03:17 speller Note Added: 0002220
2012-06-01 10:21 derick Note Added: 0002221
2012-06-01 10:21 derick Status assigned => closed
2012-06-01 10:21 derick Resolution open => fixed
2012-06-01 10:21 derick Fixed in Version => 2.2.1
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)