$ java -Demma.verbosity.level=all -verbose:gc -Xmx128M emma report -r html -in coverage.em,coverage.ec
[GC 509K->139K(1984K), 0.0210380 secs]
[GC 651K->197K(1984K), 0.0164570 secs]
EMMA: [emma.Processor::run] complete tool properties:
coverage.out.file: [coverage.ec]
coverage.out.merge: [true]
instr.do_suid_compensation: [true]
instr.exclude_bridge_methods: [true]
instr.exclude_synthetic_methods: [true]
metadata.out.file: [coverage.em]
metadata.out.merge: [true]
report.columns: [name,class,method,block,line]
report.depth: [method]
report.html.out.encoding: [ISO-8859-1]
report.html.out.file: [coverage/index.html]
report.metrics: [method:70,block:80,line:80,class:100]
report.out.dir: [/var/scratch]
report.out.encoding: [ISO-8859-15]
report.sort: [+block,+name,+method,+class]
report.txt.columns: [class,method,block,line,name]
report.txt.depth: [all]
report.txt.out.file: [coverage.txt]
report.units: [instr]
report.xml.out.encoding: [UTF-8]
report.xml.out.file: [coverage.xml]
session.out.file: [coverage.es]
session.out.merge: [true]
verbosity.level: [all]
EMMA: [EMMA v2.0, build 4217 (2004/07/17 12:19:29)]
EMMA: input data path:
EMMA: {
EMMA: /var/scratch/coverage.em
EMMA: /var/scratch/coverage.ec
EMMA: }
EMMA: source path not set
EMMA: processing input file [/var/scratch/coverage.em] ...
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: file length = 369628
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 24
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 179793 and type 0
[GC 709K->389K(1984K), 0.0190900 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 107 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 179826
[GC 901K->720K(1984K), 0.0291560 secs]
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 9991 and type 0
EMMA: [emma.data.DataFactory::mergeload] entry read in 4 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 189826
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 179793 and type 0
[GC 1232K->1069K(1984K), 0.0176940 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 57 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 369628
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: file processed in 333 ms
EMMA: loaded 183 metadata entries
EMMA: processing input file [/var/scratch/coverage.ec] ...
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: file length = 67056
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 24
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2290 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 5 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 2323
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 4 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 4497
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 0 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 7218
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
[GC 1581K->1292K(1984K), 0.0171510 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 30 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 9939
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2488 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 12436
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 4335 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 16780
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 4335 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 21124
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 3 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 23298
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2290 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 25597
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 28318
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 0 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 30492
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 0
[EMMA v2.0, build 4217]
emma report: unexpected failure:
Exception in thread "main" [GC 1804K->1270K(1984K), 0.0034110 secs]
com.vladium.emma.EMMARuntimeException: unexpected failure:
at com.vladium.emma.Command.exit(Command.java:237)
at com.vladium.emma.report.reportCommand.run(reportCommand.java:145)
at emma.main(emma.java:40)
Caused by: java.lang.OutOfMemoryError
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting an OutOfMemoryError when processing a moderately sized
coverage report:
| $ ls -sh1 coverage.*
| 65k coverage.ec
| 361k coverage.em
Has anyone seen this before?
Here's what I get:
$ java -Demma.verbosity.level=all -verbose:gc -Xmx128M emma report -r html -in coverage.em,coverage.ec
[GC 509K->139K(1984K), 0.0210380 secs]
[GC 651K->197K(1984K), 0.0164570 secs]
EMMA: [emma.Processor::run] complete tool properties:
coverage.out.file: [coverage.ec]
coverage.out.merge: [true]
instr.do_suid_compensation: [true]
instr.exclude_bridge_methods: [true]
instr.exclude_synthetic_methods: [true]
metadata.out.file: [coverage.em]
metadata.out.merge: [true]
report.columns: [name,class,method,block,line]
report.depth: [method]
report.html.out.encoding: [ISO-8859-1]
report.html.out.file: [coverage/index.html]
report.metrics: [method:70,block:80,line:80,class:100]
report.out.dir: [/var/scratch]
report.out.encoding: [ISO-8859-15]
report.sort: [+block,+name,+method,+class]
report.txt.columns: [class,method,block,line,name]
report.txt.depth: [all]
report.txt.out.file: [coverage.txt]
report.units: [instr]
report.xml.out.encoding: [UTF-8]
report.xml.out.file: [coverage.xml]
session.out.file: [coverage.es]
session.out.merge: [true]
verbosity.level: [all]
EMMA: [EMMA v2.0, build 4217 (2004/07/17 12:19:29)]
EMMA: input data path:
EMMA: {
EMMA: /var/scratch/coverage.em
EMMA: /var/scratch/coverage.ec
EMMA: }
EMMA: source path not set
EMMA: processing input file [/var/scratch/coverage.em] ...
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: file length = 369628
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 24
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 179793 and type 0
[GC 709K->389K(1984K), 0.0190900 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 107 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 179826
[GC 901K->720K(1984K), 0.0291560 secs]
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 9991 and type 0
EMMA: [emma.data.DataFactory::mergeload] entry read in 4 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 189826
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: found valid entry of size 179793 and type 0
[GC 1232K->1069K(1984K), 0.0176940 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 57 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: position 369628
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.em]: file processed in 333 ms
EMMA: loaded 183 metadata entries
EMMA: processing input file [/var/scratch/coverage.ec] ...
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: file length = 67056
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 24
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2290 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 5 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 2323
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 4 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 4497
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 0 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 7218
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
[GC 1581K->1292K(1984K), 0.0171510 secs]
EMMA: [emma.data.DataFactory::mergeload] entry read in 30 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 9939
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2488 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 12436
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 4335 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 16780
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 4335 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 21124
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 3 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 23298
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2290 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 25597
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 1 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 28318
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2165 and type 1
EMMA: [emma.data.DataFactory::mergeload] entry read in 0 ms
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: position 30492
EMMA: [emma.data.DataFactory::mergeload] [/var/scratch/coverage.ec]: found valid entry of size 2712 and type 0
[EMMA v2.0, build 4217]
emma report: unexpected failure:
Exception in thread "main" [GC 1804K->1270K(1984K), 0.0034110 secs]
com.vladium.emma.EMMARuntimeException: unexpected failure:
at com.vladium.emma.Command.exit(Command.java:237)
at com.vladium.emma.report.reportCommand.run(reportCommand.java:145)
at emma.main(emma.java:40)
Caused by: java.lang.OutOfMemoryError
Never mind, I think this was a random fluke.
I tracked it down to this line of code in MetaData#readExternal:
Logger.getLogger().info("size=" + size);
final HashMap classMap = new HashMap (size);
It was constructing a map of size 963605095, causing
an immediate OOM error. Must've been a corrupted coverage
file.
Yes, this is a known issue (RFE: http://sourceforge.net/tracker/index.php?func=detail&aid=974340&group_id=108932&atid=651900\). It is caused by file corruption which can happen when multiple JVMs concurrently write to the same *.ec file.