[xdebug-general] Having segfault problems, not sure where to diagnose.

From: Mark Slade <markandrewslade[@]gmail.com>
Date: Tue, 17 Jul 2012 21:11:48 -0400

Hi all,

I'm new to Xdebug and trying to get started. I it successfully installed
and configured; I'm able to start debugging from my remote IDE and step
through code. But I keep hitting segfaults and I'm not sure why, nor am I
sure the best direction investigate. Guidance would be much appreciated.

xdebug 2.2.0
apache 2.2.15
PHP 5.4.3
NetBeans 7.1.2

The script runs fine if I run it without debugging (by removing xdebug from
php.ini or just not starting a session). It doesn't generate segfaults,
exceptions, errors, warnings, or notices, and it doesn't take abnormally

If I start debugging and step through, it reaches a certain line where
NetBeans disconnects indicating a "Socket Exception", and I see a segfault
in Apache's error_log. This always happens on a line before the line that
produces output. None the less, I do end up seeing output and it's
identical to when this doesn't happen, as if the script is completing after
xdebug dies and then the process is segfaulting. The remote log (
http://pastebin.com/9VUY2AcJ) seems like xdebug is just crashing. That is
the end of the log after the line that causes problems. The conversation
is stopping right after context_get, note the lack of a closing "-->" to
the command, and then the log re-opens.

If I load the Apache coredump into gdb and backtrace (
http://pastebin.com/w21zXnH8) it shows xdebug_var_export_xml_node at the
top of the stack. I'm not a gdb pro so I'm not sure where to go from here.
 I can't provide the code that's triggering this because it's a sizeable
codebase and proprietary.

I tried running the script itself in gdb with debugclient on the other end,
but I'm apparently not doing something right. When I first connect with
debugclient I run "step_over -i XXXX" and it seems to just run the entire
script and produce output. In this case, no segfault / error. The raw
response I get from debugclient includes status="stopping" reason="ok".

Any advice? Can I provide more information that might be useful?

Received on Wed Jul 18 2012 - 02:11:48 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST