MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000566XdebugUsage problems (Wrong Results)public2010-04-19 13:492010-04-19 14:08
Reporterderick 
Assigned To 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1.0RC1 
Target VersionFixed in Version 
Summary0000566: Xdebug crashes when using conditional breakpoints
DescriptionFrom marcel partap:

Hi Derick,
i set up eclipse and xdebug to trace into my drupal installation and it worked fabulous - presumably until i upgraded to php5.3 ... first i tried different debian package, then with pecl installed xdebug-2.1.0RC1. Now there's less crashing, and it seems to be triggered especially by *stepping over* functions - if i trace deep into each function, it didn't seem to happen.
Anyways, i looked at the core file and what i figured out is that the problem is that malloc can not allocate 1gig of memory on my server. See below.

Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal 11, Segmentation fault.
#0 0xb6e99580 in xdebug_add_stack_frame (zdata=0x8b4cbec, op_array=0x862fd24, type=2) at /tmp/pear/temp/xdebug/xdebug_stack.c:897
897 tmp->var[tmp->varc].name = NULL;
(gdb) info line
Line 897 of "/tmp/pear/temp/xdebug/xdebug_stack.c" starts at address 0xb6e9956e <xdebug_add_stack_frame+1263>
   and ends at 0xb6e99586 <xdebug_add_stack_frame+1287>.
(gdb) l
892 arguments_storage = arguments_sent;
893 }
894 tmp->var = xdmalloc(arguments_storage * sizeof (xdebug_var));
895
896 for (i = 0; i < arguments_sent; i++) {
897 tmp->var[tmp->varc].name = NULL;
898 tmp->var[tmp->varc].addr = NULL;
899
900 /* Because it is possible that more parameters are sent, then
901 * actually wanted we can only access the name in case there
...
(gdb) p tmp->varc
$9 = 0
(gdb) p tmp->var
$10 = (xdebug_var *) 0x0
(gdb) p tmp->var[tmp->varc].name
Cannot access memory at address 0x0
=> (boooom !)

(gdb) p arguments_storage * sizeof (xdebug_var)
$11 = 1168534432

(gdb) p *tmp
$12 = {
  function = {
    class = 0x0,
    function = 0x8974940 "module_invoke",
    type = 1,
    internal = 0
  },
  user_defined = 2,
  level = 9,
  filename = 0x8662f18 "/var/www/drupal-hfopi/includes/module.inc",
  lineno = 462,
  include_filename = 0x0,
  arg_done = 0,
  varc = 0,
  var = 0x0,
  return_value = 0x8b8cf10,
  used_vars = 0x0,
  symbol_table = 0x0,
  execute_data = 0x0,
  This = 0x0,
  memory = 1462568,
  prev_memory = 1461376,
  time = 1271630270.2769959,
  profile = {
    time = 2.0371159593266614e-312,
    mark = 1.2021821400170971e-266,
    memory = 144133064,
    call_list = 0x8974968
  },
  refcount = 1,
  prev = 0x84cbb98,
  op_array = 0x862fd24,
  aggr_entry = 0x80
}

(gdb) info locals
arguments_wanted = 0
curpos = 0x0
p = 0x0
arguments_sent = 146066804
arguments_storage = 146066804
edata = 0x8b4cbec
tmp = 0x89c2aa8
cur_opcode = 0xb10358b8
param = 0x82b0b40
i = 0
aggr_key = 0xb7ec43c0 ""
aggr_key_len = -1211672220

(gdb) bt
#0 0xb6e99580 in xdebug_add_stack_frame (zdata=0x8b4cbec, op_array=0x862fd24, type=2) at /tmp/pear/temp/xdebug/xdebug_stack.c:897
#1 0xb6e846f2 in xdebug_execute (op_array=0x862fd24) at /tmp/pear/temp/xdebug/xdebug.c:1217
0000002 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000003 0xb7831bb3 in zend_eval_stringl (str=0x840fe3c "$module == 'views'", str_len=18, retval_ptr=0xbfd40c5c,
    string_name=0xb6ea322b "xdebug conditional breakpoint") at /tmp/buildd/php5-5.3.2/Zend/zend_execute_API.c:1172
0000004 0xb7831e1c in zend_eval_string (str=0x840fe3c "$module == 'views'", retval_ptr=0xbfd40c5c, string_name=0xb6ea322b "xdebug conditional breakpoint")
    at /tmp/buildd/php5-5.3.2/Zend/zend_execute_API.c:1206
0000005 0xb6e85cae in xdebug_statement_call (op_array=0x8b49b98) at /tmp/pear/temp/xdebug/xdebug.c:1765
0000006 0xb7864d48 in zend_extension_statement_handler (extension=0x831b1b8, op_array=0x8b49b98) at /tmp/buildd/php5-5.3.2/Zend/zend_execute.c:739
0000007 0xb7834845 in zend_llist_apply_with_argument (l=0xb7c94da8, func=0xb7864d30 <zend_extension_statement_handler>, arg=0x8b49b98)
    at /tmp/buildd/php5-5.3.2/Zend/zend_llist.c:428
0000008 0xb78685c7 in ZEND_EXT_STMT_SPEC_HANDLER (execute_data=0x8b4cbec) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:527
0000009 0xb7866773 in ZEND_USER_OPCODE_SPEC_HANDLER (execute_data=0x8b4cbec) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:703
0000010 0xb786777e in execute (op_array=0x8b49b98) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000011 0xb6e848cc in xdebug_execute (op_array=0x8b49b98) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000012 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000013 0xb7890706 in zend_do_fcall_common_helper_SPEC (execute_data=0x0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:337
0000014 0xb786777e in execute (op_array=0x84c6998) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000015 0xb6e848cc in xdebug_execute (op_array=0x84c6998) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000016 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000017 0xb783356b in zend_call_function (fci=0xbfd412f0, fci_cache=0xbfd41314) at /tmp/buildd/php5-5.3.2/Zend/zend_execute_API.c:947
0000018 0xb77623d5 in zif_call_user_func_array (ht=2, return_value=0x862e310, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
    at /tmp/buildd/php5-5.3.2/ext/standard/basic_functions.c:4782
0000019 0xb7864ddb in execute_internal (execute_data_ptr=0x8b4c8ac, return_value_used=1) at /tmp/buildd/php5-5.3.2/Zend/zend_execute.c:1260
0000020 0xb6e84c1d in xdebug_execute_internal (current_execute_data=0x8b4c8ac, return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1330
0000021 0xb6357ed3 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000022 0xb7890a18 in zend_do_fcall_common_helper_SPEC (execute_data=0x15) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:315
0000023 0xb786777e in execute (op_array=0x8ed0250) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000024 0xb6e848cc in xdebug_execute (op_array=0x8ed0250) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000025 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000026 0xb7890706 in zend_do_fcall_common_helper_SPEC (execute_data=0x0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:337
0000027 0xb786777e in execute (op_array=0x87b73d0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000028 0xb6e848cc in xdebug_execute (op_array=0x87b73d0) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000029 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000030 0xb7890706 in zend_do_fcall_common_helper_SPEC (execute_data=0x0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:337
0000031 0xb786777e in execute (op_array=0x88f5f28) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000032 0xb6e848cc in xdebug_execute (op_array=0x88f5f28) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000033 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000034 0xb7890706 in zend_do_fcall_common_helper_SPEC (execute_data=0x0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:337
#35 0xb786777e in execute (op_array=0x8b48e58) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000036 0xb6e848cc in xdebug_execute (op_array=0x8b48e58) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000037 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000038 0xb7890706 in zend_do_fcall_common_helper_SPEC (execute_data=0x0) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:337
0000039 0xb786777e in execute (op_array=0x840fcd4) at /tmp/buildd/php5-5.3.2/Zend/zend_vm_execute.h:104
0000040 0xb6e848cc in xdebug_execute (op_array=0x840fcd4) at /tmp/pear/temp/xdebug/xdebug.c:1263
0000041 0xb6358334 in ?? () from /usr/lib/php5/20090626+lfs/suhosin.so
0000042 0xb783d8e6 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /tmp/buildd/php5-5.3.2/Zend/zend.c:1266
0000043 0xb77e1ff4 in php_execute_script (primary_file=0xbfd44414) at /tmp/buildd/php5-5.3.2/main/main.c:2288
0000044 0xb78cfd9b in php_handler (r=0x84712e8) at /tmp/buildd/php5-5.3.2/sapi/apache2handler/sapi_apache2.c:674
0000045 0x0807cb96 in ap_run_handler ()
0000046 0x08080311 in ap_invoke_handler ()
0000047 0x0808e1f4 in ap_internal_redirect ()
0000048 0xb6f1e7ed in handler_redirect (r=0x865f6e8) at /tmp/buildd/apache2-2.2.15/modules/mappers/mod_rewrite.c:4846
#49 0x0807cb96 in ap_run_handler ()
0000050 0x08080311 in ap_invoke_handler ()
#51 0x0808e390 in ap_process_request ()
0000052 0x0808b3a0 in ?? ()
0000053 0x080846e6 in ap_run_process_connection ()
0000054 0x080930f8 in ?? ()
0000055 0x0809344b in ?? ()
0000056 0x0809423c in ap_mpm_run ()
0000057 0x080696a4 in main ()
TagsNo tags attached.
Operating System*
PHP Version5.3.2
Attached Files

- Relationships

-  Notes
(0001450)
derick (administrator)
2010-04-19 14:08

Fixed in revision 3262.

- Issue History
Date Modified Username Field Change
2010-04-19 13:49 derick New Issue
2010-04-19 13:49 derick Operating System => *
2010-04-19 13:49 derick PHP Version => 5.3.2
2010-04-19 13:49 derick Xdebug Version => 2.1.0rc1
2010-04-19 14:08 derick Note Added: 0001450
2010-04-19 14:08 derick Status new => closed
2010-04-19 14:08 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