MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000678XdebugUsage problems (Wrong Results)public2011-04-04 15:032011-08-13 16:18
Reporterkitt 
Assigned Toderick 
PriorityhighSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1.0 
Target VersionFixed in Version 
Summary0000678: XDebug segfault when IDE send "eval NonExistsClass"
DescriptionHere 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 Reproducekitt@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 InformationSegfault 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.
Operating SystemLinux 2.6.35-28-generic #49-Ubuntu 10.10 i686 GNU/Linux
PHP Version5.3.3
Attached Filestxt file icon gdb-bt-full.txt [^] (5,592 bytes) 2011-04-05 15:42 [Show Content]
txt file icon gdb-bt-full2.txt [^] (28,649 bytes) 2011-04-09 01:28 [Show Content]
gz file icon core-kitt-dell-php.612.gz [^] (257,913 bytes) 2011-04-09 01:40
txt file icon gdb-bt-full-php5.3.5.txt [^] (9,668 bytes) 2011-05-04 12:45 [Show Content]

- Relationships

-  Notes
(0001713)
kitt (reporter)
2011-04-04 15:09
edited on: 2011-04-04 15: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

(0001716)
kitt (reporter)
2011-04-09 01:30

i recompile php and xdebug from source and upload second file "gdb-bt-full2.txt", may be it will provide more info.
(0001717)
kitt (reporter)
2011-04-09 01:41

add core file
(0001725)
kitt (reporter)
2011-04-23 20:24

check on windows - error continues
(0001741)
kitt (reporter)
2011-05-04 12:45

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
(0001771)
derick (administrator)
2011-08-05 14:17

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?
(0001776)
derick (administrator)
2011-08-13 16:18

Fixed for 2.1.3 and 2.2dev.

- Issue History
Date Modified Username Field Change
2011-04-04 15:03 kitt New Issue
2011-04-04 15:09 kitt Note Added: 0001713
2011-04-04 15:17 kitt Note Edited: 0001713 View Revisions
2011-04-05 15:14 kitt Note Added: 0001714
2011-04-05 15:30 kitt Note Added: 0001715
2011-04-05 15:41 kitt Note Deleted: 0001715
2011-04-05 15:41 kitt Note Deleted: 0001714
2011-04-05 15:42 kitt File Added: gdb-bt-full.txt
2011-04-09 01:28 kitt File Added: gdb-bt-full2.txt
2011-04-09 01:30 kitt Note Added: 0001716
2011-04-09 01:40 kitt File Added: core-kitt-dell-php.612.gz
2011-04-09 01:41 kitt Note Added: 0001717
2011-04-23 20:24 kitt Note Added: 0001725
2011-05-04 12:45 kitt Note Added: 0001741
2011-05-04 12:45 kitt File Added: gdb-bt-full-php5.3.5.txt
2011-08-05 14:17 derick Note Added: 0001771
2011-08-05 14:17 derick Assigned To => derick
2011-08-05 14:17 derick Status new => feedback
2011-08-13 16:18 derick Note Added: 0001776
2011-08-13 16:18 derick Status feedback => closed
2011-08-13 16:18 derick Resolution open => fixed
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)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker