View Issue Details

IDProjectCategoryView StatusLast Update
0000817XdebugUncategorizedpublic2012-04-28 16:23
Reporterngaur Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
OSDebian Gnu/LinuxOS VersionLenny 
Target Version2.2.0 
Summary0000817: Missing arguments in function traces
Description

In my funtion traes, the values of argumetns passed to functions appear as '???'

xdebug config

zend_extension=/usr/lib/php5/20060613/xdebug2.2.so
xdebug.trace_enable_trigger=1
xdebug.trace_output_name=xdebug_trace.%t.%p
xdebug.collect_params=4

Sample output:

0.0008     124584     -> drupal_bootstrap($phase = ???) /var/local/www/xxxxx/htdocs/index.php:15
0.0009     125224       -> _drupal_bootstrap($phase = ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:1109
0.0009     125840         -> drupal_unset_globals() /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:1119
0.0009     125840           -> ini_get(???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:346
0.0009     125840         -> timer_start($name = ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:1121
0.0010     126280           -> microtime() /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:232
0.0010     126352           -> explode(???, ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:232
0.0010     127784         -> conf_init() /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:1123
0.0010     130136           -> strtolower(???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:385
0.0011     136008           -> drupal_valid_http_host($host = ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:386
0.0011     136280             -> preg_match(???, ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:367
0.0011     136280           -> conf_path($require_settings = ???, $reset = ???) /var/local/www/xxxxx/htdocs/includes/bootstrap.inc:398

require statements do show the name of the require'd file.

Steps To Reproduce

I haven't tried it on other systems yet. Every trace I do displays the problem.

I compiled from source.
xdebug 2.2.0RC1.
Compilation exactly as per instructions in README.
issue appears on all traces.

Additional Information

I couldn't see this as an existing issue, but it's not the easiest one to search for.

TagsNo tags attached.
Operating Systemlinux
PHP Version5.2.6

Activities

derick

2012-04-23 10:55

administrator   ~0002078

Can you post your phpinfo() output in an attachment to this bug please?

ngaur

2012-04-23 11:37

reporter   ~0002081

phpinfo uploaded as requested.

derick

2012-04-23 12:02

administrator   ~0002082

Hmm, the only thing I can think of is maybe the suhosin patch, but I've not heard of that doing this before. Could you please try the recently released 2.2.0RC2?

ngaur

2012-04-23 14:37

reporter   ~0002083

Tried RC2. No change.

ngaur

2012-04-24 17:30

reporter   ~0002089

I've just gone through recreating this in a clean virtual machine. The problem still presents itself. The suhosin patch is present - it comes as standard in the debian package for lenny, though it's been removed in later debian distributions.

I kept the test case as simple as I could:

  • Installed a debian lenny virtual machine from http://www.visoracle.com/vm/debian50/ (VMs for lenny are geting hard to find, so not quite as minimal as I would otherwise have chosen).

  • updated to the latest of all packages available at archive.debian.org. (lenny is out of support, so this will never change).

  • Added nginx and php5-{cli,cgi,common,dev}

  • Compiled and installed xdebug 2.2.0RC2. Configured xdebug exactly as per my description inthe original bug report, except for the file name of the xdebug library.

  • added a startup script for php-cgi, which effectively starts php like so:
    USER=www-data PATH=/usr/bin PHP_FCGI_CHILDREN=15 PHP_FCGI_MAX_REQUESTS=60 /usr/bin/php-cgi -b 127.0.0.1:9000

  • configured nginx to send ".php" requests to php. nothing special.

  • wrote a very simple php script which defines a function and calls it.

  • triggered a trace via Cookie XDEBUG_TRACE=1

ngaur

2012-04-24 18:08

reporter   ~0002090

I don't think suhosin is the culprit.

In the virtual machine referred to above, I removed php5-{cgi,cli,common,dev}, and installed a version of php5 without suhosin. It's php-5.2.9, and the packages are in the zipfile linked from http://www.net-tools.org/web/index.php?option=com_content&view=article&id=118:php5-compiled-for-debian-lenny-without-suhosin-patch&catid=20:scripts&Itemid=40.

The bug is still present.

ngaur

2012-04-24 18:45

reporter   ~0002091

Suhosin is definitely not the culprit.

I removed php from my VM again, and installed the version from http://archives.dotdeb.org/dists/lenny/php5/5.3.10/binary-i386/

This is php5.3.10, with the suhosin patch.

I recompiled xdebug, and re-tested.

The bug does not present itself in this test.

This may be a way out of the problem for me in future, but it'll be a bit of a process to upgrade php on the live server.

derick

2012-04-28 16:23

administrator   ~0002116

I've figure out what this is: overzealos optimisations with the lenny compiler. If Xdebug gets compiled with -O2, I get the ??? as well. If I compile with -O0 or -O1 all is well.

The workaround in this case is, after running "phpize" edit the makefile and change CFLAGS=-g -O2 to CFLAGS=-g -O1 before running make.

I'm going to close this as this is not something I can fix in Xdebug.