bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug awt/29420] OutOfMemory in image handling


From: robert dot lougher at mac dot com
Subject: [Bug awt/29420] OutOfMemory in image handling
Date: 13 Nov 2006 04:07:53 -0000


------- Comment #26 from robert dot lougher at mac dot com  2006-11-13 04:07 
-------
Hi,

I've been keeping track of this bug off and on for the last few weeks. 
Unfortunately, I assumed Norman was using JamVM 1.4.3, as I didn't believe
JamVM 1.4.2 would have worked as well as it did.  I therefore assumed it was a
leak in the native code...

The output from -verbose:gc gives an idea what is happening.  This is running
Niffler on JamVM 1.4.4 with 1000+ images (2592x1944 and 1600x1200) and a heap
size of 200MB.

As can be seen, a GC is occurring every couple of images.  There are a lot of
finalizers being ran (on average 100 each GC) and also several references are
being cleared.

It also shows that a compaction run is being done approximately every 26
garbage-collections.  This explains the difference in behaviour betweern JamVM
1.4.2 and JamVM 1.4.3+.  On JamVM 1.4.2 after several hundred images the heap
has fragmented so that a large allocation cannot be satisfied, and the alloc
returns NULL (leading to the SEGV in native code).

On JamVM 1.4.3+ when this situation is reached the compactor is ran which
removes the fragmentation and allows subsequent image allocations to succeed.   

On JamVM 1.4.2 increasing the heap size allows the program to run for longer,
but the heap will always end up fragmented (the allocation pattern must leave
long-lived objects at intervals throughout the heap, making the large image
allocations harder to satisfy).  On JamVM 1.4.3+ the compactor ensures that
sufficent contiguous space is always available.

The story for CACAO is more difficult to explain.  As it fails so quickly it
sounds unlikely that it is a fragmentation issue.  As there are such a large
number of finalized objects being created, I would suspect that CACAO's
finalizer thread is being starved, and the rate of finalization is too slow to
stop the heap completely filling.

Hope this helps,

Rob.

<GC: Allocated objects: 114881>

<GC: Freed 14 object(s) using 576 bytes>

<GC: Moved 5953 objects, largest block is 60364648 total free is 163884784 out
of 209715192 (78%)>

<GC: Mark took 0.015948 seconds, compact took 0.064145 seconds>

-I- getCairoBackedImage: took 85 msecs. for 2592x1944

-I- getCairoBackedImage: took 444 msecs. for 2592x1944

<GC: Alloc attempt for 19660816 bytes failed.>

<GC: Allocated objects: 117142>

<GC: Freed 30916 object(s) using 89090624 bytes, cleared 3 reference(s)>

<GC: Largest block is 20182312 total free is 154226632 out of 209715192 (73%)>

<GC: Mark took 1.435102 seconds, scan took 0.003097 seconds>

<GC: enqueuing 3 references>

<GC: running 168 finalisers>

-I- getCairoBackedImage: took 87 msecs. for 2560x1920

-I- getCairoBackedImage: took 30 msecs. for 1600x1200

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 116188>

<GC: Freed 72642 object(s) using 111679184 bytes, cleared 3 reference(s)>

<GC: Largest block is 20155744 total free is 173463864 out of 209715192 (82%)>

<GC: Mark took 0.024944 seconds, scan took 0.005724 seconds>

<GC: enqueuing 3 references>

<GC: running 112 finalisers>

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 114956>

<GC: Freed 1375 object(s) using 42726784 bytes>

<GC: Largest block is 24431968 total free is 175874136 out of 209715192 (83%)>

<GC: Mark took 0.017537 seconds, scan took 0.002309 seconds>

<GC: running 7 finalisers>

-I- getCairoBackedImage: took 89 msecs. for 2592x1944

-I- getCairoBackedImage: took 95 msecs. for 2560x1920

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 116007>

<GC: Freed 70634 object(s) using 107036712 bytes, cleared 2 reference(s)>

<GC: Largest block is 20156392 total free is 163845152 out of 209715192 (78%)>

<GC: Mark took 0.019563 seconds, scan took 0.008767 seconds>

<GC: enqueuing 2 references>

<GC: running 99 finalisers>

-I- getCairoBackedImage: took 93 msecs. for 2592x1944

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115762>

<GC: Freed 60424 object(s) using 66097072 bytes, cleared 1 reference(s)>

<GC: Largest block is 27835568 total free is 178419000 out of 209715192 (85%)>

<GC: Mark took 0.019869 seconds, scan took 0.004583 seconds>

<GC: enqueuing 1 references>

<GC: running 52 finalisers>

-I- getCairoBackedImage: took 96 msecs. for 2592x1944

<GC: Alloc attempt for 2097168 bytes failed.>

<GC: Allocated objects: 116077>

<GC: Freed 15688 object(s) using 67153312 bytes, cleared 1 reference(s)>

<GC: Largest block is 20176264 total free is 182457432 out of 209715192 (87%)>

<GC: Mark took 0.029573 seconds, scan took 0.003399 seconds>

<GC: enqueuing 1 references>

<GC: running 79 finalisers>

-I- getCairoBackedImage: took 85 msecs. for 2592x1944

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115848>

<GC: Freed 14242 object(s) using 73778744 bytes, cleared 1 reference(s)>

<GC: Largest block is 20157152 total free is 181386400 out of 209715192 (86%)>

<GC: Mark took 0.023036 seconds, scan took 0.002834 seconds>

<GC: enqueuing 1 references>

<GC: running 61 finalisers>

-I- getCairoBackedImage: took 84 msecs. for 2592x1944

<GC: Alloc attempt for 1610104 bytes failed.>

<GC: Allocated objects: 115957>

<GC: Freed 15224 object(s) using 65225696 bytes, cleared 1 reference(s)>

<GC: Largest block is 20901368 total free is 179807672 out of 209715192 (85%)>

<GC: Mark took 0.019542 seconds, scan took 0.003459 seconds>

<GC: enqueuing 1 references>

<GC: running 70 finalisers>

-I- getCairoBackedImage: took 89 msecs. for 2592x1944

<GC: Alloc attempt for 7680016 bytes failed.>

<GC: Allocated objects: 116050>

<GC: Freed 62476 object(s) using 70916896 bytes, cleared 1 reference(s)>

<GC: Largest block is 20157152 total free is 181196040 out of 209715192 (86%)>

<GC: Mark took 0.019086 seconds, scan took 0.005795 seconds>

<GC: enqueuing 1 references>

<GC: running 76 finalisers>

-I- getCairoBackedImage: took 32 msecs. for 1600x1200

-I- getCairoBackedImage: took 96 msecs. for 2592x1944

<GC: Alloc attempt for 1464680 bytes failed.>

<GC: Allocated objects: 116604>

<GC: Freed 121323 object(s) using 95469520 bytes, cleared 2 reference(s)>

<GC: Largest block is 20157336 total free is 173712176 out of 209715192 (82%)>

<GC: Mark took 0.022549 seconds, scan took 0.006228 seconds>

<GC: enqueuing 2 references>

<GC: running 124 finalisers>

-I- getCairoBackedImage: took 93 msecs. for 2592x1944

<GC: Alloc attempt for 2097168 bytes failed.>

<GC: Allocated objects: 115985>

<GC: Freed 15519 object(s) using 74755824 bytes, cleared 1 reference(s)>

<GC: Largest block is 20157152 total free is 182461608 out of 209715192 (87%)>

<GC: Mark took 0.016847 seconds, scan took 0.005171 seconds>

<GC: enqueuing 1 references>

<GC: running 71 finalisers>

-I- getCairoBackedImage: took 88 msecs. for 2560x1920

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115965>

<GC: Freed 17794 object(s) using 100662776 bytes, cleared 1 reference(s)>

<GC: Largest block is 20155552 total free is 163844064 out of 209715192 (78%)>

<GC: Mark took 0.034024 seconds, scan took 0.003198 seconds>

<GC: enqueuing 1 references>

<GC: running 89 finalisers>

-I- getCairoBackedImage: took 90 msecs. for 2592x1944

-I- getCairoBackedImage: took 35 msecs. for 1600x1200

<GC: Alloc attempt for 24 bytes failed.>

<GC: Allocated objects: 115973>

<GC: Freed 67937 object(s) using 61280568 bytes, cleared 2 reference(s)>

<GC: Largest block is 20901368 total free is 175835480 out of 209715192 (83%)>

<GC: Mark took 0.128026 seconds, scan took 0.004682 seconds>

<GC: enqueuing 2 references>

<GC: running 88 finalisers>

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115145>

<GC: Freed 4004 object(s) using 54313848 bytes, cleared 2 reference(s)>

<GC: Largest block is 20176264 total free is 196021216 out of 209715192 (93%)>

<GC: Mark took 0.019317 seconds, scan took 0.003205 seconds>

<GC: enqueuing 2 references>

<GC: running 28 finalisers>

-I- getCairoBackedImage: took 85 msecs. for 2592x1944

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115742>

<GC: Freed 11691 object(s) using 55446928 bytes, cleared 2 reference(s)>

<GC: Largest block is 20156552 total free is 183524800 out of 209715192 (87%)>

<GC: Mark took 0.014645 seconds, scan took 0.005240 seconds>

<GC: enqueuing 2 references>

<GC: running 51 finalisers>

-I- getCairoBackedImage: took 86 msecs. for 2592x1944

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 116080>

<GC: Freed 62232 object(s) using 45432960 bytes, cleared 1 reference(s)>

<GC: Largest block is 20901368 total free is 181008976 out of 209715192 (86%)>

<GC: Mark took 0.013183 seconds, scan took 0.005511 seconds>

<GC: enqueuing 1 references>

<GC: running 73 finalisers>

-I- getCairoBackedImage: took 97 msecs. for 2592x1944

<GC: Alloc attempt for 7680016 bytes failed.>

<GC: Allocated objects: 115768>

<GC: Freed 59612 object(s) using 67479616 bytes, cleared 1 reference(s)>

<GC: Largest block is 20934104 total free is 182228456 out of 209715192 (86%)>

<GC: Mark took 0.018875 seconds, scan took 0.004109 seconds>

<GC: enqueuing 1 references>

<GC: running 52 finalisers>

-I- getCairoBackedImage: took 35 msecs. for 1600x1200

-I- getCairoBackedImage: took 101 msecs. for 2592x1944

<GC: Alloc attempt for 7680016 bytes failed.>

<GC: Allocated objects: 116709>

<GC: Freed 73384 object(s) using 89270504 bytes, cleared 3 reference(s)>

<GC: Largest block is 20156392 total free is 174458376 out of 209715192 (83%)>

<GC: Mark took 0.018745 seconds, scan took 0.005469 seconds>

<GC: enqueuing 3 references>

<GC: running 134 finalisers>

-I- getCairoBackedImage: took 35 msecs. for 1600x1200

-I- getCairoBackedImage: took 96 msecs. for 2592x1944

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 116442>

<GC: Freed 72229 object(s) using 97614280 bytes, cleared 3 reference(s)>

<GC: Largest block is 20156552 total free is 172747128 out of 209715192 (82%)>

<GC: Mark took 0.041852 seconds, scan took 0.005110 seconds>

<GC: enqueuing 3 references>

<GC: running 109 finalisers>

-I- getCairoBackedImage: took 91 msecs. for 2592x1944

<GC: Alloc attempt for 7680016 bytes failed.>

<GC: Allocated objects: 115925>

<GC: Freed 61229 object(s) using 76310448 bytes, cleared 1 reference(s)>

<GC: Largest block is 20901368 total free is 181303016 out of 209715192 (86%)>

<GC: Mark took 0.020063 seconds, scan took 0.004563 seconds>

<GC: enqueuing 1 references>

<GC: running 63 finalisers>

-I- getCairoBackedImage: took 34 msecs. for 1600x1200

-I- getCairoBackedImage: took 33 msecs. for 1600x1200

-I- getCairoBackedImage: took 108 msecs. for 2592x1944

<GC: Alloc attempt for 1273952 bytes failed.>

<GC: Allocated objects: 117222>

<GC: Freed 131663 object(s) using 113385376 bytes, cleared 3 reference(s)>

<GC: Largest block is 20157152 total free is 166011016 out of 209715192 (79%)>

<GC: Mark took 0.021839 seconds, scan took 0.006358 seconds>

<GC: enqueuing 3 references>

<GC: running 172 finalisers>

-I- getCairoBackedImage: took 97 msecs. for 2592x1944

<GC: Alloc attempt for 7680016 bytes failed.>

<GC: Allocated objects: 116064>

<GC: Freed 15921 object(s) using 81547992 bytes, cleared 1 reference(s)>

<GC: Largest block is 20157360 total free is 182035808 out of 209715192 (86%)>

<GC: Mark took 0.018777 seconds, scan took 0.003303 seconds>

<GC: enqueuing 1 references>

<GC: running 72 finalisers>

-I- getCairoBackedImage: took 33 msecs. for 1600x1200

-I- getCairoBackedImage: took 111 msecs. for 2592x1944

<GC: Alloc attempt for 4194320 bytes failed.>

<GC: Allocated objects: 116680>

<GC: Freed 121664 object(s) using 95069096 bytes, cleared 2 reference(s)>

<GC: Largest block is 20157152 total free is 173705104 out of 209715192 (82%)>

<GC: Mark took 0.035105 seconds, scan took 0.007327 seconds>

<GC: running 124 finalisers>

<GC: enqueuing 2 references>

-I- getCairoBackedImage: took 81 msecs. for 2560x1920

<GC: Alloc attempt for 1795224 bytes failed.>

<GC: Allocated objects: 116001>

<GC: Freed 17746 object(s) using 81112504 bytes, cleared 1 reference(s)>

<GC: Largest block is 20155776 total free is 181898928 out of 209715192 (86%)>

<GC: Mark took 0.018072 seconds, scan took 0.003519 seconds>

<GC: enqueuing 1 references>

<GC: running 86 finalisers>

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 114997>

<GC: Freed 1069 object(s) using 25887072 bytes>

<GC: Largest block is 20155408 total free is 184036992 out of 209715192 (87%)>

<GC: Mark took 0.019320 seconds, scan took 0.003003 seconds>

<GC: running 4 finalisers>

<GC: Alloc attempt for 20155408 bytes failed.>

<GC: Allocated objects: 115010>

<GC: Freed 86 object(s) using 2760 bytes>

<GC: Largest block is 19662560 total free is 163880960 out of 209715192 (78%)>

<GC: Mark took 0.010356 seconds, scan took 0.005524 seconds>

<GC: running 1 finalisers>

<GC: Waiting for finalizers to be ran.>

<GC: Allocated objects: 115003>

<GC: Freed 7 object(s) using 288 bytes>

<GC: Moved 5929 objects, largest block is 80332688 total free is 163881232 out
of 209715192 (78%)>

<GC: Mark took 0.018155 seconds, compact took 0.126048 seconds>

-I- getCairoBackedImage: took 87 msecs. for 2592x1944

-I- getCairoBackedImage: took 92 msecs. for 2560x1920


-- 

robert dot lougher at mac dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert dot lougher at mac
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29420





reply via email to

[Prev in Thread] Current Thread [Next in Thread]