[kepler-dev] Different runModelInThread() Result Between Windows and Linux

Daniel Crawl danielcrawl at gmail.com
Fri Dec 19 10:41:56 PST 2014


Hi Jie,

The problem could be a memory leak. There are several tools you can use
to find memory leaks in Java, such as jmap
(http://docs.oracle.com/javase/6/docs/technotes/tools/share/jmap.html)
or the Eclipse Memory Analyzer (https://eclipse.org/mat).

The workflow uses the External Execution actor to run
WaitL3OrderExecuted.jar. Does this application generate a lot of
output? The External Execution actor buffers all the output until the
application finishes, so this could be causing the memory problem.

   --dan


On 12/17/14 8:14 AM, ZhangJie wrote:
> Hi Dan,
>
> Thanks for your letter! I changed my DIY "previous" port instead of the
> "trigger" port. In my project, kepler is intergrated with Tomcat as a part.
> To solve the problem of "java.lang.OutOfMemoryError", I add
> "JAVA_OPTS='-server -Xms10240m -Xmx10240m XX:PermSize=1024M
> -XX:MaxPermSize=2048M'" in catalina.sh. In addition, I use 'daemon.sh run
> -Xmx20g' to run my program. However, I got some exceptions occurred in
> parseMoML() and tomcat runtime. Some error information are as follows. Do
> you have any ideas to solve this problem? Thanks for your attention!
>
> With regards,
>
> Jie Zhang
>
>
>
> Exception in thread "Exec Stderr Gobbler-159"
> ptolemy.kernel.util.InternalErrorException: Exec Stderr Gobbler-159: Failed
> while reading from java.lang.UNIXProcess$ProcessPipeInputStream at 3e0049ca. To
> avoid this, try setting the ignoreIOExceptionReadErrors parameter to
> true.null
>
>    in .L2CP201412160042KWFRuntiome3.L3RN201412160042WaitExecuted
>
> Because:
>
> Stream closed
>
>           at ptolemy.actor.lib.Exec$_StreamReaderThread._read(Exec.java:745)
>
>           at ptolemy.actor.lib.Exec$_StreamReaderThread.run(Exec.java:680)
>
> Caused by: java.io.IOException: Stream closed
>
>           at
> java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
>
>           at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
>
>           at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
>
>           at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
>
>           at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
>
>           at java.io.InputStreamReader.read(InputStreamReader.java:184)
>
>           at ptolemy.actor.lib.Exec$_StreamReaderThread._read(Exec.java:698)
>
>           ... 1 more
>
> Caused by: java.io.IOException: Stream closed
>
>           at
> java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
>
>           at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
>
>           at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
>
>           at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
>
>           at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
>
>           at java.io.InputStreamReader.read(InputStreamReader.java:184)
>
>           at ptolemy.actor.lib.Exec$_StreamReaderThread._read(Exec.java:698)
>
>           at ptolemy.actor.lib.Exec$_StreamReaderThread.run(Exec.java:680)
>
> Running model in current thread: L2CP201412160023KWFRuntiome3
>
> 99 ms. Memory: 2280960K Free: 621899K (27%)
>
> Error running model or finding output file:Executing command "java -jar
> /home/MCA/Software/apache-tomcat-7.0.55/webapps/MultiProcessSysWebService_Th
> read//WEB-INF/lib/WaitL3OrderExecuted.jar 10.3.10.1 3306 mccps mca mca
> L3RN201412160023 Finish" returned a non-zero return value of 1.
>
> The last input was: null.
>
> The standard output was: #
>
> # There is insufficient memory for the Java Runtime Environment to continue.
>
> # Cannot create GC thread. Out of system resources.
>
> # An error report file with more information is saved as:
>
> # /tmp/hs_err_pid17176.log
>
> The error output was:
>
>    in .L2CP201412160023KWFRuntiome3.L3RN201412160023WaitExecuted
>
>
>
> Exception in thread "Thread-513" java.lang.OutOfMemoryError: unable to
> create new native thread
>
>           at java.lang.Thread.start0(Native Method)
>
>           at java.lang.Thread.start(Thread.java:714)
>
>           at org.apache.axis.wsdl.gen.Parser.run(Parser.java:306)
>
>           at
> org.sdm.spa.WSWithComplexTypes._initWSDL(WSWithComplexTypes.java:445)
>
>           at
> org.sdm.spa.WSWithComplexTypes.attributeChanged(WSWithComplexTypes.java:305)
>
>           at
> ptolemy.data.expr.Variable._setTokenAndNotify(Variable.java:2039)
>
>           at ptolemy.data.expr.Variable._evaluate(Variable.java:1688)
>
>           at ptolemy.data.expr.Variable._propagate(Variable.java:1774)
>
>           at ptolemy.data.expr.Variable.validate(Variable.java:1471)
>
>           at ptolemy.moml.MoMLParser.endDocument(MoMLParser.java:802)
>
>           at com.microstar.xml.XmlParser.doParse(XmlParser.java:162)
>
>           at com.microstar.xml.XmlParser.parse(XmlParser.java:132)
>
>           at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1556)
>
>           at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1512)
>
>           at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1655)
>
>           at org.kepler.ExecutionEngine.parseMoML(ExecutionEngine.java:180)
>
>           at org.kepler.ExecutionEngine.parseMoML(ExecutionEngine.java:161)
>
>           at Workflow.Kepler.KeplerWorkFlow.run(KeplerWorkFlow.java:80)
>
> Exception in thread "Thread-472" java.lang.OutOfMemoryError: unable to
> create new native thread
>
>           at java.lang.Thread.start0(Native Method)
>
>           at java.lang.Thread.start(Thread.java:714)
>
>           at sun.net.www.http.KeepAliveCache$1.run(KeepAliveCache.java:112)
>
>           at sun.net.www.http.KeepAliveCache$1.run(KeepAliveCache.java:96)
>
>           at java.security.AccessController.doPrivileged(Native Method)
>
>           at sun.net.www.http.KeepAliveCache.put(KeepAliveCache.java:95)
>
>           at
> sun.net.www.http.HttpClient.putInKeepAliveCache(HttpClient.java:407)
>
>           at sun.net.www.http.HttpClient.finished(HttpClient.java:364)
>
>           at
> sun.net.www.http.ChunkedInputStream.closeUnderlying(ChunkedInputStream.java:
> 219)
>
>           at
> sun.net.www.http.ChunkedInputStream.processRaw(ChunkedInputStream.java:455)
>
>           at
> sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.jav
> a:572)
>
>           at
> sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
>
>           at
> sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
>
>           at java.io.FilterInputStream.read(FilterInputStream.java:133)
>
>           at
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConn
> ection.java:3322)
>
>           at
> org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown
> Source)
>
>           at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
>
>           at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
>
>           at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown
> Source)
>
>           at
> org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
> h(Unknown Source)
>
>           at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>
>           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>
>           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>
>           at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>
>           at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>
>           at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>
>           at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
>
>           at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
>
>           at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
>
>           at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>
> at java.lang.Thread.run(Thread.java:745)
>
>
>
>
>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>



More information about the Kepler-dev mailing list