[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] [DSF-GDB] Memory leak when running JUnit tests

I also had some out-of-memory error with the JUnit tests.
Thanks for investigating further.
Can you file a bug with your findings?

Thanks

Marc
 

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Andy Jin
> Sent: Wednesday, August 18, 2010 1:19 PM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] [DSF-GDB] Memory leak when running JUnit tests
> 
> I am writing JUnit tests based on the current MI*test from 
> DSF-GDB. When
> I run my JUnit tests (140+ tests) on multiple targets (total is 1000+
> tests) I always run out of heap memory. Some tracing reveals there is
> memory leak in the range of 1M-2M per test.
> 
> Further debugging led me to this:
> 
> In my launch delegate I create the GDB CLI process before running my
> finalLaunchSequence
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=223154), and 
> this creates
> the GDB runtime process allocating around 2M buffer for input/output
> (AbstractCLIProcess). When the launch is terminated this GDB runtime
> process needs to be released and this is done at 
> GDBControl.terminate()
> where it schedules a MIGDBExit().
> 
> However, most of the time (8 out of 10) this MIGDBExit() is not
> completed, thus the future task above it will run after 2 second. This
> task does not kill the GDB process because the state is never
> "State.STARTED" in this case. Not sure if it's related but 
> running this
> task results in a "rejected execution exception" which can be 
> seen from
> the console view.
> 
> I also tried running the DSF/GDB unit tests (e.g. 
> MIRegisterTest) I can
> see the same behavior that the MIGDBExit() is not completed but the
> future task is run.
> 
> Thanks,
> Andy
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>