MantisBT - Xdebug
View Issue Details
0001083XdebugUsage problems (Wrong Results)public2014-10-31 11:072015-01-12 18:28
kuindji 
derick 
normalmajoralways
closedfixed 
LinuxUbuntu Server14.04
2.2.5 
2.2.7 
Ubuntu Server
5.5.5-5.5.9
0001083: xdebug_break() "Segmentation fault (core dumped)" when remote debugging
* phpStorm 8.0.1 remote debugging feature
* ubuntu 14.04 server / vagrant
* xdebug installed via apt-get install php5-xdebug

xdebug.ini:

zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_mode = 'jit'
xdebug.remote_host = "10.0.2.2"
xdebug.remote_port = 10000
xdebug.idekey = "somekey"
xdebug.remote_handler = dbgp
xdebug.show_exception_trace = 1

Whenever I invoke xdebug_break() from an error/exception handler phpStorm opens a debug window with stack trace. When I try switching between frames I get the segfault error (on the server).

When there is no error/exception handler and xdebug reports a problem (without xdebug_break), or when I manually set a breakpoint - switching between frames works normally.
No tags attached.
zip Archive.zip (2,424) 2014-11-12 05:40
https://bugs.xdebug.org/file_download.php?file_id=224&type=bug
log xdebug.log (12,783) 2014-11-12 05:44
https://bugs.xdebug.org/file_download.php?file_id=225&type=bug
Issue History
2014-10-31 11:07kuindjiNew Issue
2014-11-11 19:51derickNote Added: 0002901
2014-11-11 19:51derickAssigned To => derick
2014-11-11 19:51derickStatusnew => feedback
2014-11-12 05:40kuindjiFile Added: Archive.zip
2014-11-12 05:42kuindjiNote Added: 0002909
2014-11-12 05:42kuindjiStatusfeedback => assigned
2014-11-12 05:44kuindjiFile Added: xdebug.log
2015-01-10 17:30derickNote Added: 0002970
2015-01-10 17:30derickStatusassigned => acknowledged
2015-01-12 18:28derickNote Added: 0002971
2015-01-12 18:28derickStatusacknowledged => closed
2015-01-12 18:28derickResolutionopen => fixed
2015-01-12 18:28derickFixed in Version => 2.2.7
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

Notes
(0002901)
derick   
2014-11-11 19:51   
Could you please be so kind to provide a short reproducable script, and an
accompanying remote debugging log (made through
xdebug.remote_log=/tmp/xdebug.log") that illustrates this problem? I can't
seem to reproduce this without that.
(0002909)
kuindji   
2014-11-12 05:42   
In the Archive.zip you'll find a sample project.
Lets call it xdebug-test.

In phpStorm:

PHP->Debug port = 10000
PHP->Servers:
add one called xdebug-test.tld
and set path mappings: project folder to "/vagrant"

Start listening for remote connections

vagrant up
vagrant ssh
cd /vagrant
php test.php
(0002970)
derick   
2015-01-10 17:30   
Thanks for the report - I could reproduce it with that. Just the "test.php" script would have worked too though :-) Working on a fix now.
(0002971)
derick   
2015-01-12 18:28   
Fixed for 2.2.7 and 2.3dev