FlowDroid icon indicating copy to clipboard operation
FlowDroid copied to clipboard

FlowDroid reports "Running out of memory, solvers terminated" with plenty of memory

Open salmanee opened this issue 6 years ago • 10 comments

Im running Flowdroid on an apk and after 15 min it reports

WARN soot.jimple.infoflow.memory.FlowDroidMemoryWatcher - Running out of memory, solvers terminated

despite the fact that there are still plenty of memory left. Is this memory limit imposed somewhere in FlowDroid?

salmanee avatar Mar 21 '19 05:03 salmanee

FlowDroid can only use the memory allocated to the JVM. Did you specify a sufficient heap size using the -Xmx parameter, e.g., java -Xmx8g FlowDroid.jar ...?

StevenArzt avatar Mar 21 '19 08:03 StevenArzt

I did .. I set the -Xmx to 32g and yet run into the following error message: [main] ERROR soot.jimple.infoflow.android.SetupApplication$InPlaceInfoflow - Could not wait for executor termination java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at soot.jimple.infoflow.Infoflow.runAnalysis(Infoflow.java:509) at soot.jimple.infoflow.Infoflow.runAnalysis(Infoflow.java:240) at soot.jimple.infoflow.android.SetupApplication$InPlaceInfoflow.runAnalysis(SetupApplication.java:1180) at soot.jimple.infoflow.android.SetupApplication.processEntryPoint(SetupApplication.java:1424) at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1359) at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1306) at soot.jimple.infoflow.cmd.MainClass.run(MainClass.java:333) at soot.jimple.infoflow.cmd.MainClass.main(MainClass.java:231) [Service Thread] WARN soot.jimple.infoflow.memory.FlowDroidMemoryWatcher - Running out of memory, solvers terminated

salmanee avatar Mar 25 '19 02:03 salmanee

That error message doesn't look like a big problem. The data flow solvers were aborted, because FlowDroid reached its memory threshold. That can happen, and as long as you get your results, it's nothing to worry about. Did you get any results?

StevenArzt avatar Mar 25 '19 13:03 StevenArzt

I got some results but it's not complete.. some taint propagations seem to be missing

salmanee avatar Mar 25 '19 18:03 salmanee

@StevenArzt I got the very same problem. Can we really ignore this? I can see FlowDroid eating up all the memory of a computer when running.

kneep avatar Mar 26 '19 09:03 kneep

The data flow analysis needs quite a bit of memory. That's why FlowDroid has a check to ensure that it doesn't get stuck when it runs out of memory, but instead terminates gracefully and reports the results it has already found so far. Reducing the memory consumption of FlowDroid is an active area of research.

StevenArzt avatar Mar 26 '19 09:03 StevenArzt

@salmanee Can you be more precise on what is missing in which APK?

StevenArzt avatar Mar 26 '19 09:03 StevenArzt

@StevenArzt Sure! Im running FlowDroid on com.netflix.mediaclient Version(4.8.6). Out of the 50 methods marked as SINK only 8 of them were reported in the results (despite the fact that the rest of the sink methods are reachable and I was expecting them to show up in the results too)

salmanee avatar Mar 27 '19 19:03 salmanee

Has someone been able to solve this ?

mohamedmostafadawood avatar Oct 07 '23 23:10 mohamedmostafadawood

@salmanee Did you solve that issue? I have similar issue. When I am using more like 78 sources and 82 sinks list that time flowdroid is works fine. But if I used lets say 10 source and 20 sinks that time i got Running out of memory, solvers is terminated. From the previous result i intentionally kept the source and sink list that was found but this time i got the solver termination error.

Eshita66 avatar Dec 23 '24 21:12 Eshita66