Open plawton-umd opened 2 years ago
@plawton-umd per our discussion, this may be an error in the MILabel logic, or a memory leak.
in the meantime, a workaround that may help get this working would be to increase your Java heap by updating the last line of pds-generate
command-line script.
Before:
${JAVA_CMD} -jar ${GENERATE_JAR} "$@"
After:
"${JAVA_CMD}" -Xms2048m -Xmx4096m -jar ${GENERATE_JAR} "$@"
Depending upon how much available memory you have and what you are running on the server you are executing MILabel, you can can continue to multiply each of those numbers x2 until it stops failing. This is a temporary spike in the memory usage while the software runs, but Java garbage collection will clean it all up as soon as (or very very soon as after) the run completes.
let me know how this goes. we will add this to our backlog to investigate the issue further.
@plawton-umd As a heads up, we have not had an opportunity to push the testing of this app to determine the guaranteed issue here, but we just fixed a potential memory leak in the code that may have been a cause for this.
PDS4_SPACECRAFT_1H00_1000.sch.gz PDS4_SPACECRAFT_1H00_1000.xsd.gz Template_NH_Pepssi_data.vm.gz pepssi_example.sh.gz
๐ Describe the bug
When trying to run pds-generate on 1274 PDS3 lbl files that are more than 2 MB each it crashes with the below error output
pds-generate -p data//.lbl -t Template_test.vm Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at org.antlr.runtime.ANTLRReaderStream.load(ANTLRReaderStream.java:78) at org.antlr.runtime.ANTLRInputStream.(ANTLRInputStream.java:68)
at org.antlr.runtime.ANTLRInputStream.(ANTLRInputStream.java:52)
at org.antlr.runtime.ANTLRInputStream.(ANTLRInputStream.java:48)
at org.antlr.runtime.ANTLRInputStream.(ANTLRInputStream.java:40)
at gov.nasa.pds.tools.label.parser.DefaultLabelParser.parseLabel(DefaultLabelParser.java:265)
at gov.nasa.pds.tools.label.parser.DefaultLabelParser.parseLabel(DefaultLabelParser.java:249)
at gov.nasa.pds.tools.label.parser.DefaultLabelParser.parseLabel(DefaultLabelParser.java:154)
at gov.nasa.pds.imaging.generate.readers.ProductToolsLabelReader.parseLabel(ProductToolsLabelReader.java:302)
at gov.nasa.pds.imaging.generate.label.PDS3Label.setMappings(PDS3Label.java:463)
at gov.nasa.pds.imaging.generate.GenerateLauncher.query(GenerateLauncher.java:225)
at gov.nasa.pds.imaging.generate.GenerateLauncher.main(GenerateLauncher.java:293)
It should be noted that no PDS4 xml labels were produced. When test were run using small numbers of products (1, 2, 5, and 10) it was noted that the percentage of memory used from the beginning increased with the number of products included, increased as processing time passed, and was not seen to decrease.
๐ To Reproduce
Steps to reproduce the behavior:
๐ต๏ธ Expected behavior
PDS4 xml labels to be produced for each PDS3 lbl label and the program to not crash.
๐ Version of Software Used
/sbnops/lcltools/bin/pds-generate -V
gov.nasa.pds:mi-label Version 1.2.2 Release Date: 2022-04-14 05:41:49
๐ฉบ Test Data / Additional context
See Reproduce section. Note: that is the latest public version of the dataset we are having issues with. It only has 847 products versus 1274 products in the version in review. The public version can run on the server we are using for the migration work, but will crash on a laptop. The in review version is half again larger and crashes on the server. Specifications of the computer will matter, so it is suggested to not use your best computer for the testing.
๐Screenshots
๐ฅ System Info
๐ฆ Related requirements
โ๏ธ Engineering Details