Status fields:
creation_ts: | 2012-04-27 23:34 |
---|---|
component: | vm |
version: | unspecified |
rep_platform: | All |
op_sys: | Linux |
bug_status: | RESOLVED |
resolution: | WONTFIX |
reporter: | werner-schmidt@schmidt-bachgau.de |
I am currently running some evalution tests for openjdk6 on ARM embedded boards (using a beaglebone for evaluation). For checking the garbage collector I ran the 'GCTest', which can be found at: http://www.herongyang.com/JVM/GC-Garbage-Collection-Test-Program.html with the command line: java -<jvm> -Xms2m -Xmx8m GCTest 16 1 using jamvm or zero does not show any pecularities but when I used cacao I always get output as follows: java -cacao -Xms2m -Xmx8m GCTest 16 1 Time Total Free Free Total Act. Dead Over sec. Mem. Mem. Per. Obj. Obj. Obj. Head 0 2048 1572 76% 0 0 0 476 0 2048 1436 70% 128 128 0 484 1 2048 1304 63% 256 256 0 488 1 2048 1172 57% 384 384 0 492 2 2048 1040 50% 512 512 0 496 2 2048 908 44% 640 640 0 500 3 2048 776 37% 768 768 0 504 3 2048 644 31% 896 896 0 508 4 2048 512 25% 1024 1024 0 512 4 2048 380 18% 1152 1152 0 516 5 2048 248 12% 1280 1280 0 520 5 2048 116 5% 1408 1408 0 524 6 2860 892 31% 1536 1536 0 432 6 2860 760 26% 1664 1664 0 436 7 2860 628 21% 1792 1792 0 440 7 2860 496 17% 1920 1920 0 444 8 2860 364 12% 2048 2048 0 448 8 3944 1316 33% 2176 2176 0 452 9 3944 1316 33% 2176 2048 128 452 9 3944 1184 30% 2304 2176 128 456 10 3944 1184 30% 2304 2048 256 456 10 3944 1052 26% 2432 2176 256 460 11 3944 1052 26% 2432 2048 384 460 11 3944 920 23% 2560 2176 384 464 12 3944 920 23% 2560 2048 512 464 12 3944 788 19% 2688 2176 512 468 13 3944 788 19% 2688 2048 640 468 13 3944 656 16% 2816 2176 640 472 14 3944 656 16% 2816 2048 768 472 14 3944 524 13% 2944 2176 768 476 15 3944 524 13% 2944 2048 896 476 15 3944 388 9% 3072 2176 896 484 16 3944 388 9% 3072 2048 1024 484 16 3944 256 6% 3200 2176 1024 488 17 3944 256 6% 3200 2048 1152 488 17 5388 1568 29% 3328 2176 1152 492 18 5388 1568 29% 2176 2048 128 1644 18 5388 1436 26% 2304 2176 128 1648 19 5388 1436 26% 2304 2048 256 1648 19 5388 1304 24% 2432 2176 256 1652 20 5388 1304 24% 2432 2048 384 1652 20 5388 1172 21% 2560 2176 384 1656 21 5388 1172 21% 2560 2048 512 1656 21 5388 1040 19% 2688 2176 512 1660 22 5388 1040 19% 2688 2048 640 1660 23 5388 908 16% 2816 2176 640 1664 23 5388 908 16% 2816 2048 768 1664 24 5388 776 14% 2944 2176 768 1668 24 5388 776 14% 2944 2048 896 1668 25 5388 644 11% 3072 2176 896 1672 25 5388 644 11% 3072 2048 1024 1672 26 5388 512 9% 3200 2176 1024 1676 26 5388 512 9% 3200 2048 1152 1676 27 5388 380 7% 3328 2176 1152 1680 27 5388 380 7% 3328 2048 1280 1680 28 5388 248 4% 3456 2176 1280 1684 28 5388 248 4% 3456 2048 1408 1684 29 5388 512 9% 3584 2176 1408 1292 29 5388 512 9% 3584 2048 1536 1292 30 5388 380 7% 3712 2176 1536 1296 30 5388 380 7% 3712 2048 1664 1296 31 5388 248 4% 3840 2176 1664 1300 31 5388 248 4% 3840 2048 1792 1300 32 7316 2044 27% 3968 2176 1792 1304 33 7316 1912 26% 4096 2176 1920 1308 33 7316 1912 26% 4096 2048 2048 1308 34 7316 1780 24% 4224 2176 2048 1312 34 7316 1780 24% 4224 2048 2176 1312 35 7316 1648 22% 4352 2176 2176 1316 35 7316 1648 22% 4352 2048 2304 1316 36 7316 1516 20% 4480 2176 2304 1320 36 7316 1516 20% 4480 2048 2432 1320 37 7316 1384 18% 4608 2176 2432 1324 37 7316 1384 18% 4608 2048 2560 1324 38 7316 1252 17% 4736 2176 2560 1328 38 7316 1252 17% 4736 2048 2688 1328 39 7316 1120 15% 4864 2176 2688 1332 39 7316 1120 15% 4864 2048 2816 1332 40 7316 988 13% 4992 2176 2816 1336 40 7316 988 13% 4992 2048 2944 1336 41 7316 856 11% 5120 2176 2944 1340 41 7316 856 11% 5120 2048 3072 1340 42 7316 720 9% 5248 2176 3072 1348 42 7316 720 9% 5248 2048 3200 1348 43 7316 588 8% 5376 2176 3200 1352 43 7316 588 8% 5376 2048 3328 1352 44 7316 456 6% 5504 2176 3328 1356 44 7316 456 6% 5504 2048 3456 1356 45 7580 588 7% 5632 2176 3456 1360 45 7580 588 7% 5632 2048 3584 1360 46 7712 588 7% 5760 2176 3584 1364 46 7712 588 7% 5760 2048 3712 1364 47 7844 588 7% 5888 2176 3712 1368 47 7844 588 7% 5888 2048 3840 1368 48 7976 588 7% 6016 2176 3840 1372 48 7976 588 7% 6016 2048 3968 1372 49 8108 588 7% 6144 2176 3968 1376 49 8108 588 7% 6144 2048 4096 1376 then the app crashes with: Exception in thread "main" java.lang.OutOfMemoryError at GCTest$MyObject.<init>(GCTest.java:54) at GCTest.myTest(GCTest.java:31) at GCTest.main(GCTest.java:21) This behaviour happens both on the Angstrom build and the Ubuntu 11.10 build of the beaglebone java -cacao -version indicates (on Angstrom): java version "1.6.0_24" IcedTea Runtime Environment (IcedTea6 1.12pre) (6b24-1.11.1+1.11.2-devel+hg1+54ceda20a02c) CACAO (build 1.1.0pre2, compiled mode) This crash does not happen on the x86 version (Ubuntu 11.10) of cacao
Hmm, it seems to leak, but it behaves exactly the same as on x86_64. Thanks for the test program!
For some reason, the GC stops invoking finalizers after a few iterations. Then it runs out of memory.
That's almost exactly what is described in http://www.hpl.hp.com/personal/Hans_Boehm/gc/bounds.html as "an embarrassing failure scenario". I don't exactly understand what happens in this case, because to me it looks like a GC-internal variable (GC_mark_stack_top) keeps one of the list nodes alive, which is not how it's supposed to work. But apart from that, it's a fundamental problem, and CACAO cannot really do anything about that.