MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000425Xdebug(No Category)public2009-02-03 11:052009-03-28 19:46
Reporterydo 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000425: memory leak (around 40MB for each request) when using xdebug_start_trace
DescriptionWhen running the following code xdebug leaks 40MB of memory.

code start;
xdebug_start_trace(); // 1
    {code to trace }
echo xdebug_peak_memory_usage(); // 2
xdebug_stop_trace(); // 3
code end;
Memory allocated by the above request is never returned to the heap.
As a result first the heap gets full and then the swap file, which results in a auto restart of the machine.

One remedy to this problem is actively monitoring the apache server an restarting when it consumes to much memory which is a temporary solution.

Memory leak doesn't happen when you comments the lines indicated bij 1,2,3.

Additional Informationxdebug configuration via .htaccess

php_flag xdebug.profiler_enable_trigger On
#php_flag xdebug.profiler_enable On
php_flag xdebug.show_mem_delta On
php_value xdebug.profiler_output_dir /home/ydoganc/xdebug/
php_value xdebug.profiler_output_name cachegrind.out.%c
php_value xdebug.dump.SESSION *
php_value xdebug.dump.COOKIE *
php_value xdebug.dump.POST *
php_value xdebug.dump.FILES *
php_flag xdebug.dump_undefined On
#php_value xdebug.dump.ENV *
#php_value xdebug.dump.REQUEST *
#php_value xdebug.dump.SERVER *
php_value xdebug.show_local_vars 1
#php_flag xdebug.show_exception_trace On

# TRACING
php_value xdebug.auto_tracing 1
php_value xdebug.trace_output_dir /home/ydoganc/xdebug/
php_value xdebug.trace_output_name pid
#php_value xdebug.trace_options 1


php_value xdebug.collect_params 1
php_value xdebug.collect_return 1
TagsNo tags attached.
Operating System
PHP Version5.2.6
Attached Files

- Relationships

-  Notes
(0000935)
derick (administrator)
2009-03-28 19:46

Fixed in CVS, thanks for your report!

- Issue History
Date Modified Username Field Change
2009-02-03 11:05 ydo New Issue
2009-02-03 11:05 ydo PHP Version => 5.2.6
2009-02-03 11:05 ydo Xdebug Version => 2.0.4-dev
2009-03-28 19:46 derick Note Added: 0000935
2009-03-28 19:46 derick Status new => closed
2009-03-28 19:46 derick Resolution open => fixed
2016-07-31 13:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 13:35 derick Category debugclient (debugging tool) => (No Category)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker