Hi Matt, Is this reproducible on different machines? Have you tried -Xmx3192m? I'm having to push it this far for some JAS3 SiD work. When I was running the conversion at JLAB, the jobs would run for several 10 of thousands of events before dying on the mentioned error. Using -Xmx2048 resolved that problem but there is clearly something that slowly consumes memory. This is somewhat normal and it may not be a leak. Recent code changes may have slightly increased the memory consumption rate. How many events do you succeed in processing before the crash? Cheers, Homer On Fri, 9 Nov 2012, McCormick, Jeremy I. wrote: > Hi, Matt. > > Do you know how to look at memory usage in Java? > > You'll might want to debug with something like this: > > ---- > > Runtime runtime = Runtime.getRuntime(); > > NumberFormat format = NumberFormat.getInstance(); > > StringBuilder sb = new StringBuilder(); > long maxMemory = runtime.maxMemory(); > long allocatedMemory = runtime.totalMemory(); > long freeMemory = runtime.freeMemory(); > > sb.append("free memory: " + format.format(freeMemory / 1024) + "<br/>"); > sb.append("allocated memory: " + format.format(allocatedMemory / 1024) + "<br/>"); > sb.append("max memory: " + format.format(maxMemory / 1024) + "<br/>"); > sb.append("total free memory: " + format.format((freeMemory + (maxMemory - allocatedMemory)) / 1024) + "<br/>"); > > ---- > > I took the above idea from here. > > http://stackoverflow.com/questions/74674/how-to-do-i-check-cpu-and-memory-usage-in-java > > You could make that a static method and call it at various points in TestRunEvioToLcio or within one of your drivers in the .lcsim file you're using. > > If memory is steadily increasing every event then this indicates some systematic memory leak. If it looks fine and then explodes on one event, > that indicates some problem with the data of that event. For instance, there could be a bogus (very large) value that gets into an array size setting > due to corrupted data (e.g. when size of something is read from a data block), which is often what happens to cause these kinds of problems. > > --Jeremy > > -----Original Message----- > From: Graham, Mathew Thomas > Sent: Friday, November 09, 2012 12:38 PM > To: Uemura, Sho; Omar Moreno; Per Hansson > Cc: McCormick, Jeremy I. > Subject: OutOfMemory error in jevio? > > I'm trying to run over data (from a pretty pristine hps-java build) like this: > java -Xmx2048m -cp hps-java/target/hps-java-1.2-SNAPSHOT-bin.jar org.lcsim.hps.evio.TestRunEvioToLcio -x steering/TestRunOfflineRecon.lcsim /nfs/slac/g/hps/mgraham/DarkPhoton/testrun_data/hps_001349.evio.0 -DoutputFile=recon.slcio -d HPS-TestRun-v3 > > > and I get this... > > Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Map failed > at org.lcsim.hps.evio.TestRunEvioToLcio.main(TestRunEvioToLcio.java:188) > Caused by: java.io.IOException: Map failed > at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:748) > at org.jlab.coda.jevio.EvioReader.mapFile(EvioReader.java:323) > at org.jlab.coda.jevio.EvioReader.<init>(EvioReader.java:178) > at org.lcsim.hps.evio.TestRunEvioToLcio.main(TestRunEvioToLcio.java:186) > Caused by: java.lang.OutOfMemoryError: Map failed > at sun.nio.ch.FileChannelImpl.map0(Native Method) > at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:745) > ... 3 more > > > ... > > ######################################################################## > Use REPLY-ALL to reply to list > > To unsubscribe from the HPS-SOFTWARE list, click the following link: > https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1 > ######################################################################## Use REPLY-ALL to reply to list To unsubscribe from the HPS-SOFTWARE list, click the following link: https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1