View Issue Details

IDProjectCategoryView StatusLast Update
0000914XdebugUncategorizedpublic2013-06-22 13:39
Reportershumisha Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionunable to reproduce 
Platformx86-64OSWindowsOS Version7
Product Version2.2.1 
Summary0000914: Apache crashes when displaying variables
Description

Hi All,

I have been unable (for quite some time now) to make Xdebug work properly with PHP 5.3+. This seems related to reports such as http://bugs.xdebug.org/view.php?id=658, but maybe not exactly.

The context is as follow:

  • windows 7 64
  • Apache 2.2.4
  • Eclipse 3.8 (though same with 3.7)
  • PHP 5.3.20
    Zend Extension Build API220090626, TS, VC9
    PHP Extension Build API20090626, TS, VC9

note: same behavior with 5.3.17, 5.3.18, 5.4.6 and 5.4.10 (the last two testing done with appropriate version of XDebug)

  • XDebug 2.2.1: php_xdebug-2.2.1-5.3-vc9.dll

note: exact same behavior with XDebug 2.1.4: php_xdebug-2.1.4-5.3-vc9.dll
note: on same Eclipse setup, switching to PHP 5.2, running php_xdebug-2.1.2-5.2-vc6.dll, everything works fine, no crash at all.

Description and hints:

I am debugging Joomla! code and extensions. Breakpoints works fine in any situation, but having the Variables window opened makes apache crash as follow:

  • When stepping through Joomla! 2.5.8 code, XDebug works fine (ie stepping AND displaying variables) until a particular piece of code is reached:
    Line 851 of /libraries/joomla/application/application.php causes the problem:

$router = JRouter::getInstance($name, $options);

This line is part of a method called many times during execution. A possible hint is that I believe this is the first instance of calling a method statically in Joomla! execution stream, though not 100% sure.
I set a breakpoint just above this line, then step over. First and second execution of line 851 work fine. Now stepping over this line a third time makes apache.exe process start eating memory like crazy.
apache.exe, until then, uses up approx. 20MB. Whenever I step over this line for the 3rd time, memory starts increasing in large steps, like 30 or 40MB. This goes on for maybe 20 seconds, until apache.exe reaches a bit less than 2gigs at which point it crashes. The WAMP package I use (EasyPHP) then restarts automatically a new instance of apache.exe, which is back to using about 20MB, and execution resumes normally - ie I can even just press the F6 key to step over code, and variables are displayed in the variable window.

Note that I'm using here a specific version of Joomla! to try provide a common ground for the report. But over the last 12 months, this has happened with several very versions of Joomla. Other issue reports are for similar issues with Drupal and Wordpress, so I'm more inclined to think maybe the fact that I can reproduce the issue systematically on calling a method statically might be a hint.
To put it shortly, I've never been able to use xdebug on php 5.3 and php 5.4, though I've been using for 3 or 4 years now on earlier php versions.
Note also that I worked on the topic on at least 2 machines, as all my setup is on an external drive that I hook up to whatever machine I have. However, both machines I routinely used run windows 7 64 bits.

Thanks for any hint, you've made XDebug so useful that living without it is pretty hard!

Rgds

Additional Information
  • xdebug log is attached

The crash happened at line 416 in that log file, you can see the line is cut off, ie the usual "Log closed at 2013-01-06 14:14:55" is not there, and the line was cut right after the first few characters.

<- context_get -i 1998 -d 0

  • Here is a partial Eclipse log:

!ENTRY org.eclipse.php.debug.core 4 4 2013-01-06 15:09:13.014
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : Unexpected XML or parser failure: null

!ENTRY org.eclipse.php.debug.core 4 150 2013-01-06 15:09:13.016
!MESSAGE Unexpected termination of script, debugging ended.

!ENTRY org.eclipse.php.debug.core 4 4 2013-01-06 15:14:45.477
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : Unexpected XML or parser failure: null

!ENTRY org.eclipse.php.debug.core 4 150 2013-01-06 15:14:45.480
!MESSAGE Unexpected termination of script, debugging ended.

!ENTRY org.eclipse.php.debug.core 4 4 2013-01-06 15:39:11.848
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : Unexpected XML or parser failure: null

!ENTRY org.eclipse.php.debug.core 4 4 2013-01-06 15:39:11.850
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.session.DBGpSession$AsyncResponseHandlerJob : Unexpected exception. Terminating the debug session

  • partial php.ini

zend_extension = "V:\Fichiers\xxxxxx\Cle_dev\EASYPH~1.1\php\php5320x130102122647\php_xdebug-2.2.1-5.3-vc9.dll"
xdebug.default_enable=0
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="V:\Fichiers\xxxxxx\Cle_dev\EASYPH~1.1\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="V:\Fichiers\xxxxx\Cle_dev\EASYPH~1.1\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"

TagsNo tags attached.
Attached Files
xdebug.zip (363,154 bytes)
Operating System
PHP Version5.3.20-5.3.24

Activities

shumisha

2013-01-28 08:11

reporter   ~0002418

No luck so far, still stuck with no debugger.
Worth mentioning also that on the same setup (just switching PHP version on the fly with EasyPHP), I can debug alright with PHP 5.2.17 and php_xdebug-2.1.2-5.2-vc6.dll

derick

2013-03-09 22:13

administrator   ~0002444

First, check whether PHP crashed (by checking your webserver's log file). Then, see if you can reproduce this when you run PHP as a script on the command line, and not through the webserver. If you can do that, then, see if you can get a GDB backtrace with:

gdb --args /full/path/to/php yourscript.php

And then type:
run

When it crashes, type:
bt full

You could also attempt to try the latest version from github (the xdebug_2_2) branch?

derick

2013-05-22 05:49

administrator   ~0002481

Could you please try Xdebug 2.2.3 which has just been released? I am suspecting that release might fix this issue.

derick

2013-06-09 10:21

administrator   ~0002497

Hello - can you please try 2.2.3?

derick

2013-06-22 13:39

administrator   ~0002512

Unable to reproduce, and no feedback provided. Please reopen if this is still an issue for you.

Issue History

Date Modified Username Field Change
2013-01-06 15:23 shumisha New Issue
2013-01-06 15:23 shumisha File Added: xdebug.zip
2013-01-28 08:11 shumisha Note Added: 0002418
2013-03-09 22:13 derick Note Added: 0002444
2013-05-22 05:49 derick Note Added: 0002481
2013-05-22 05:49 derick Assigned To => derick
2013-05-22 05:49 derick Status new => feedback
2013-06-09 10:21 derick Note Added: 0002497
2013-06-22 13:39 derick Note Added: 0002512
2013-06-22 13:39 derick Status feedback => resolved
2013-06-22 13:39 derick Resolution open => unable to reproduce
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