[Soot-list] 答复: memory leak when working with Soot

Ding Sun xyz031702 at hotmail.com
Wed Feb 16 13:25:21 EST 2011


Hi, Eric, 
      Thanks for quick reply .I see, I will try it accordingly . 

Ding Sun
-----邮件原件-----
发件人: eric.bodden at googlemail.com [mailto:eric.bodden at googlemail.com] 代表 Eric Bodden
发送时间: 2011年2月17日 0:44
收件人: Ding Sun
抄送: soot-list at sable.mcgill.ca
主题: Re: [Soot-list] memory leak when working with Soot

Hi Ding Sun.

Soot.G() is just a large singleton data structure that holds all "static" fields in Soot. So it's no surprise that things accumulate there over time.

To help you debug those issues I strongly recommend to run Soot not from within eclipse but from a regular command line. This gives you more control and fewer side effects.

Eric

On 16 February 2011 16:50, Ding Sun <xyz031702 at hotmail.com> wrote:
> Hi, all
>
>       Two weeks ago, I met the memory leak problem when using soot 
> (email below described the story).
>
>
>
>       However ,resently I use the program for more test case. The 
> mermory leak problem happened again. The most strange places are :
>
> 1.  When I strat my program, in the windows task manager, I could see 
> a process of javaw.exe and another process of eclipse.exe .  The 
> memory occupied by the two process didn't largely increase but the 
> system free memory was decreased sharply.
>
> 2. Even when I closed my problem, closed the eclipse, the memory is 
> still hold by system. I have to reboot the system to regain those lost 
> memory, which sounds strange.
>
>
>
>       I have carefully checked my program but didn't make any progress.
>
>       Later I download an eclipse plug-in tool called "Memory Leak 
> Analyzor, v1.0" to analyze my heap memory. The tool reported me the 
> biggest suspect is the class Soot.G() is accumulating creating 
> instance. I think that is a lower level soot API which I didn't directly called.
>
>
>
> Here I attached the heap report from  "Memory Leak Analyzor, v1.0" , 
> hope any could give me some kind suggestions. Thanks very much!
>
>
>
> The mainly API I used in Soot are sootClass, sootMethod,  Value 
> ,ValueBox and their sub-interfaces , Stmt ,  all in Jimple format.
>
> Best Regards,
>
> Ding Sun
>
>
>
> 发件人: soot-list-bounces at sable.mcgill.ca 
> [mailto:soot-list-bounces at sable.mcgill.ca] 代表 dingsun
> 发送时间: 2011年1月31日 1:31
> 收件人: Bodden Eric; soot-list at sable.mcgill.ca
> 主题: Re: [Soot-list] memory leak when working with Soot
>
>
>
> Hi, Eric
>
>       I finally solved this problem by updating my eclipse from 3.4 to 
> 3.6.1 . It is possible some system files of the version 3.4 on my PC are damaged.
> Sorry for the trouble.
>
>
>
> Best Regards,
>
> Ding Sun
>
>> From: bodden at st.informatik.tu-darmstadt.de
>> Date: Wed, 26 Jan 2011 14:38:04 +0100
>> Subject: Re: [Soot-list] memory leak when working with Soot
>> To: xyz031702 at hotmail.com
>>
>> Hello Ding Sun.
>>
>> This sounds pretty odd. It's normal that Soot uses lots of memory, 
>> certainly more than 1GB on large programs, but this memory should 
>> always be freed when you close the corresponding virtual machine. Did 
>> you try to assign more than 1GB of RAM or to use a different VM?
>>
>> Eric
>>
>> 2011/1/26 dingsun <xyz031702 at hotmail.com>:
>> > Dear Sir/Madam
>> >       I have used Soot to generate CFG and paths for a long time. 
>> > It works very well until recently I used it for some big test 
>> > systems.(Like apache tomcat). It consumed more than 1G memory and 
>> > later the system hang there.
>> > Even I close my program ,close Eclipse, kill every alive java 
>> > process(windows XP , eclipse 3.5, 4G physical memory),  the memory 
>> > is still occupied.  The only solution is I have to reboot the PC.
>> >     I used tool like Eclipse Memory Analyzer to check the run time 
>> > memory status. The tool told me the classLoader accumulatively 
>> > generate lots of instances. But I still dont know how to solve it.
>> >    & nbsp;Is there any hint and suggestions on this problem? Thanks 
>> > very much!
>> > Best Regards,
>> > Ding Sun
>> > _______________________________________________
>> > Soot-list mailing list
>> > Soot-list at sable.mcgill.ca
>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>> >
>> >
>>
>>
>>
>> --
>> Dr. Eric Bodden, http://bodden.de/
>> Principal Investigator in Secure Services at CASED Coordinator of the 
>> CASED Advisory Board of Study Affairs PostDoc at Software Technology 
>> Group, Technische Universität Darmstadt
>> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410 Mailing Address: S2|02 
>> A209, Hochschulstraße 10, 64289 Darmstadt
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



--
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED Coordinator of the CASED Advisory Board of Study Affairs PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410 Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



More information about the Soot-list mailing list