View Issue Details

IDProjectCategoryView StatusLast Update
0000678XdebugUncategorizedpublic2011-08-13 15:18
Reporterkitt Assigned Toderick  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.1.0 
Summary0000678: XDebug segfault when IDE send "eval NonExistsClass"
Description

Here is xdebug.remote_log:

Log opened at 2011-04-04 00:05:18
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/vf/index.php" language="PHP" protocol_version="1.0" appid="11975" idekey="4"><engine version="2.1.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2011 by Derick Rethans]]></copyright></init>

<- feature_get -i 1 -n breakpoint_languages
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="1" feature_name="breakpoint_languages" supported="0"></response>

<- step_into -i 2
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="2" status="break" reason="ok"><xdebug:message filename="file:///var/www/vf/index.php" lineno="2"></xdebug:message></response>

<- eval -i 3 -- bmV3IE5vbkV4aXN0c0NsYXNz
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="3"><property address="-1074250240" type="null"></property></response>

<- stack_get -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="4"><stack where="{main}" level="0" type="file" filename="file:///var/www/vf/xdebug eval" lineno="1"></stack></response>

<- run -i 5

After command "eval NonExistsClass" stack_get always return zero level is "filename="file:///var/www/vf/xdebug eval" lineno="1"" and any continuation command (run\step_into\step_over\step_out) becomes my web server got "500 - Internal Server Error" and write to error.log:
2011-04-05 00:07:37: (mod_fastcgi.c.2582) unexpected end-of-file (perhaps the fastcgi process died): pid: 11971 socket: unix:/tmp/php-fcgi.socket-1
2011-04-05 00:07:37: (mod_fastcgi.c.3367) response not received, request sent: 902 on socket: unix:/tmp/php-fcgi.socket-1 for /vf/index.php?XDEBUG_SESSION_START=4, closing connection
2011-04-05 00:07:37: (mod_fastcgi.c.1492) released proc: pid: 11971 socket: unix:/tmp/php-fcgi.socket-1 load: 0
and break debug session.

In my syslog i got an error:
Apr 5 00:07:38 kitt-dell kernel: [824565.537218] php5-cgi[11975]: segfault at 14 ip 001d0205 sp bff84000 error 4 in xdebug.so[1c6000+2f000]

Steps To Reproduce

kitt@kitt-dell:~/scripts$ debugclient
Xdebug Simple DBGp client (0.10.0)
Copyright 2002-2007 by Derick Rethans.

  • libedit support: enabled

Waiting for debug server to connect.
Connect
<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/vf/index.php" language="PHP" protocol_version="1.0" appid="11975" idekey="4"><engine version="2.1.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2011 by Derick Rethans]]></copyright></init>
(cmd) feature_get -i 1 -n breakpoint_languages
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="1" feature_name="breakpoint_languages" supported="0"></response>
(cmd) step_into -i 2
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="2" status="break" reason="ok"><xdebug:message filename="file:///var/www/vf/index.php" lineno="2"></xdebug:message></response>
(cmd) eval -i 3 -- bmV3IE5vbkV4aXN0c0NsYXNz
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="3"><property address="-1074250240" type="null"></property></response>
(cmd) stack_get -i 4
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="4"><stack where="{main}" level="0" type="file" filename="file:///var/www/vf/xdebug eval" lineno="1"></stack></response>
(cmd) run -i 5
Disconnect

Waiting for debug server to connect.
^C

If last command is step_into\step_over\step_out xdebug either disconnects with segfault.

Additional Information

Segfault repeats on xdebug2.1.0 from Ubuntu repository and xdebug2.1.1 version compiled from source.

Web-server is lighttpd/1.4.26 (ssl) with mod_fcgi+5.3.3-1ubuntu9.3 from official repository

TagsNo tags attached.
Attached Files
gdb-bt-full.txt (5,592 bytes)   
gdb-bt-full2.txt (28,649 bytes)   
core-kitt-dell-php.612.gz (257,913 bytes)
gdb-bt-full-php5.3.5.txt (9,668 bytes)   
Operating SystemLinux 2.6.35-28-generic #49-Ubuntu 10.10 i686 GNU/Linux
PHP Version5.3.3

Activities

kitt

2011-04-04 14:09

reporter   ~0001713

Last edited: 2011-04-04 14:17

XDebug segfault when IDE send "eval new NonExistsClass"
Web-server is lighttpd/1.4.26 (ssl) with mod_fcgi+php5.3.3-1ubuntu9.3 from official repository

kitt

2011-04-09 00:30

reporter   ~0001716

i recompile php and xdebug from source and upload second file "gdb-bt-full2.txt", may be it will provide more info.

kitt

2011-04-09 00:41

reporter   ~0001717

add core file

kitt

2011-04-23 19:24

reporter   ~0001725

check on windows - error continues

kitt

2011-05-04 11:45

reporter   ~0001741

upgrade to xdebug from svn (revision 3440) and php5 5.3.5, error still reproduces in same way. See gdb-bt-full-php5.3.5.txt

derick

2011-08-05 13:17

administrator   ~0001771

I think I have this fixed now, could you try xdebug 2.1.2 + this patch: http://derickrethans.nl/files/dump/xdebug-issue606.diff.txt please?

derick

2011-08-13 15:18

administrator   ~0001776

Fixed for 2.1.3 and 2.2dev.

Issue History

Date Modified Username Field Change
2011-04-04 14:03 kitt New Issue
2011-04-04 14:09 kitt Note Added: 0001713
2011-04-04 14:17 kitt Note Edited: 0001713
2011-04-05 14:42 kitt File Added: gdb-bt-full.txt
2011-04-09 00:28 kitt File Added: gdb-bt-full2.txt
2011-04-09 00:30 kitt Note Added: 0001716
2011-04-09 00:40 kitt File Added: core-kitt-dell-php.612.gz
2011-04-09 00:41 kitt Note Added: 0001717
2011-04-23 19:24 kitt Note Added: 0001725
2011-05-04 11:45 kitt Note Added: 0001741
2011-05-04 11:45 kitt File Added: gdb-bt-full-php5.3.5.txt
2011-08-05 13:17 derick Note Added: 0001771
2011-08-05 13:17 derick Assigned To => derick
2011-08-05 13:17 derick Status new => feedback
2011-08-13 15:18 derick Note Added: 0001776
2011-08-13 15:18 derick Status feedback => closed
2011-08-13 15:18 derick Resolution open => fixed
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)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized