[BZANALYSIS-93] Simulating OpenWorkloads throws OutOfMemoryError Created: 12/Feb/09 Updated: 16/Jan/12 Resolved: 07/Apr/09 Status: Project: Component/s: Affects Version/s: Fix Version/s: Resolved Bugzilla Analysis/Simulation Approaches SimuCom Framework unspezifiziert Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Environment: Bug Heiko Koziolek Won't Fix None Not Specified Attachments: BasicHistoryServer.zip http://sdqweb.ipd.kit.edu/bugzilla/show_bug.cgi?id=434 External issue URL: Severity: Priority: External issue ID: None Assignee: Votes: Anne Martens 0 Not Specified Not Specified Operating System: Windows XP Platform: PC normal P5 434 Description I've updated to the latest Palladio Version yesterday. Simulation of Models with an OpenWorkload in the Usage does not seem to work ("unable to create new native thread"). I've tried it with two different models and get the s error message (see below). I have attached one of the models not working to this report. Here's the stack trace: [INFO] WorkflowRunner - workflow completed in 248ms! 10:53:56,268 [Worker-5] WARN Starting simulation... [de.uka.ipd.sdq.simucomframework.ssj.SSJExperiment] Exception in thread "Thread-24" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Unknown Source) at de.uka.ipd.sdq.simucomframework.ssj.SSJSimProcess.<init>(SSJSimProcess.java:78) at de.uka.ipd.sdq.simucomframework.ssj.SSJSimEngineFactory.createSimProcess(SSJSimEngineFactory.java:2 at de.uka.ipd.sdq.simucomframework.abstractSimEngine.SimProcess.<init>(SimProcess.java:25) at de.uka.ipd.sdq.simucomframework.usage.OpenWorkloadUser.<init>(OpenWorkloadUser.java:17) at de.uka.ipd.sdq.simucomframework.usage.OpenWorkloadUserFactory.createUser(OpenWorkloadUserFactory.ja at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.generateUser(OpenWorkload.java:60) at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.internalLifeCycle(OpenWorkload.java:43) at de.uka.ipd.sdq.simucomframework.abstractSimEngine.SimProcess.lifeCycle(SimProcess.java:35) at de.uka.ipd.sdq.simucomframework.ssj.SSJSimProcess.actions(SSJSimProcess.java:125) at de.uka.ipd.sdq.simucomframework.ssj.SSJSimProcess$1.run(SSJSimProcess.java:73) at java.lang.Thread.run(Unknown Source) Comments Comment by [email protected] [ 12/Feb/09 ] Attachment BasicHistoryServer.zip has been added with description: Simple server example with OpenWorkload crashing the simulation. Comment by [email protected] [ 12/Feb/09 ] This usually happens if the workload is infeasible and my detection of the amount of spawned threads fails to terminate the simulation beforehand. It is unreliable as Java does not report the number of active threads reliable. It might get resolved when using a lightweight thread libary based on continuations. Comment by [email protected] [ 18/Feb/09 ] Ich interpretiere das jetzt mal so, dass die Fehlerbehandlung noch verbessert werden müsste, indem an geeigneter Stelle die java.lang.OutOfMemoryError abgefangen werden (falls das geht) und eine geeignete Fehlermeldung erstellt werden muss, wenn die Anzahl der Threads das Problem waren. Wenn es ein anderes Problem war, kann man immer noch eine aussagekräftigere Fehlermeldung, die nicht so nach internen Details aussieht, für den Benutzer erstellen ("The simulation ran out of memory..."), allerdings natürlich alle Stacktrace Details erhalten. Ein weiteres Enhancement wäre dann die Verwendung einer anderen Thread-Library. Könnte man damit auch "beliebig" viele (zumindest mehr) Benutzer gleichzeitig simulieren? Ansonsten würde nur eine verbesserte Möglichkeit, zuviele Threads zu erkennen, wohl kaum die Umstellung rechtfertigen? Sorry, I forgot to write in English... Comment by [email protected] [ 07/Apr/09 ] I will add a nicer exception handling soon, but not introduce the thread library. As decided in Dagstuhl, we will do that later: http://sdqweb.ipd.uka.de/wiki/Protokoll_2009-03-16#PCM_Releaseplanung Threadunterstützung in SimuCom: Prozesssicht auf das System erfordert u.a. auch Metamodell-Erweiterungen Hängt ab von Threadpools (-->Completions?) Diplomarbeit, daher: Version 5+ Zuständig: Jens Comment by [email protected] [ 07/Apr/09 ] Added a catch clause for OutOfMemoryError which can occur if the detection of the amount of spawned threads fails to terminate the simulation early enough. See revision 6338 Generated at Thu Apr 06 14:16:06 CEST 2017 using JIRA 7.3.3#73014sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.