This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GC Problems...


On Tuesday 07 September 2004 20:27, Boehm, Hans wrote:
> > Ok - I'll put in a call to do that every so often, and see
> > what that gives.
>
> For recent versions, the GC_DUMP_REGULARLY environment variable
> should also have that effect.  I'm not positive it works in
> your environment.
>
Oh right. I'd already started a test where I called GC_dump for every 100 
iterations of the loop (Creating two Strings each iteration, and doing no 
output, with a maximum heap size of 7Mb). 

I also had to remove the call to System.gc from my 'Helper' thread as if that 
ran during the GC_dump the whole thing hung (probably not that unreasonable).

Here's the last couple of GC_dumps (with the blocks in use section ommitted 
for shortness - Tell me if that would be useful too).


--- gc.log snippet START ----
[...]
***Finalization statistics:
24356 finalization table entries; 0 disappearing links
0 objects are eligible for immediate finalization
***Static roots:
From 0x10000 to 0x11000  (temporary)
From 0x20000 to 0x21000  (temporary)
From 0x22d000 to 0x22d000  (temporary)
From 0x230000 to 0x331000  (temporary)
From 0x5b1000 to 0x613000  (temporary)
From 0x614000 to 0x617000  (temporary)
From 0x618000 to 0x649000  (temporary)
From 0x64a000 to 0x64c000  (temporary)
From 0x64d000 to 0x664000  (temporary)
From 0x709000 to 0x714000  (temporary)
From 0x715000 to 0x71d000  (temporary)
From 0x720000 to 0x722000  (temporary)
From 0x724000 to 0x729000  (temporary)
From 0x14c0000 to 0x14c1000  (temporary)
From 0x14d0000 to 0x14d1000  (temporary)
From 0x16df000 to 0x16df000  (temporary)
From 0x18df000 to 0x18df000  (temporary)
From 0x19e0000 to 0x1d7d000  (temporary)
From 0x1d80000 to 0x1f65000  (temporary)
From 0x1f70000 to 0x217d000  (temporary)
From 0x75025000 to 0x75026000  (temporary)
From 0x75041000 to 0x75042000  (temporary)
From 0x77daa000 to 0x77dab000  (temporary)
From 0x77e01000 to 0x77e03000  (temporary)
From 0x77e68000 to 0x77e69000  (temporary)
From 0x77ede000 to 0x77ee0000  (temporary)
From 0x77f78000 to 0x77f79000  (temporary)
From 0x77fce000 to 0x77fd0000  (temporary)
From 0x7803b000 to 0x7803d000  (temporary)
From 0x7803f000 to 0x78042000  (temporary)
From 0x7ffdc000 to 0x7ffe0000  (temporary)
Total size: 9900032

***Heap sections:
Total heap size: 7307264
Section 0 from 0x257000 to 0x267000 1/16 blacklisted
Section 1 from 0x279000 to 0x289000 1/16 blacklisted
Section 2 from 0x28d000 to 0x29d000 1/16 blacklisted
Section 3 from 0x2af000 to 0x2c0000 1/17 blacklisted
Section 4 from 0x2c5000 to 0x2f0000 4/43 blacklisted
Section 5 from 0x2fd000 to 0x322000 5/37 blacklisted
Section 6 from 0x19e2000 to 0x1a13000 0/49 blacklisted
Section 7 from 0x1a30000 to 0x1a71000 2/65 blacklisted
Section 8 from 0x1ae1000 to 0x1b38000 0/87 blacklisted
Section 9 from 0x1b3a000 to 0x1bae000 4/116 blacklisted
Section 10 from 0x1ce1000 to 0x1d7c000 0/155 blacklisted
Section 11 from 0x1d81000 to 0x1e4f000 5/206 blacklisted
Section 12 from 0x1e51000 to 0x1f64000 5/275 blacklisted
Section 13 from 0x1f71000 to 0x20ff000 8/398 blacklisted
Section 14 from 0x2194000 to 0x21a4000 0/16 blacklisted
Section 15 from 0x21ab000 to 0x21bb000 0/16 blacklisted
Section 16 from 0x21c2000 to 0x21d2000 0/16 blacklisted
Section 17 from 0x21da000 to 0x21ea000 0/16 blacklisted
Section 18 from 0x21f1000 to 0x2201000 1/16 blacklisted
Section 19 from 0x2208000 to 0x2218000 0/16 blacklisted
Section 20 from 0x221f000 to 0x222f000 0/16 blacklisted
Section 21 from 0x2236000 to 0x2246000 0/16 blacklisted
Section 22 from 0x224d000 to 0x225d000 0/16 blacklisted
Section 23 from 0x2264000 to 0x2274000 0/16 blacklisted
Section 24 from 0x227b000 to 0x228b000 0/16 blacklisted
Section 25 from 0x22a3000 to 0x22b3000 0/16 blacklisted
Section 26 from 0x22ba000 to 0x22ca000 1/16 blacklisted
Section 27 from 0x22d1000 to 0x22e1000 0/16 blacklisted
Section 28 from 0x22e8000 to 0x22f8000 0/16 blacklisted
Section 29 from 0x22ff000 to 0x230f000 0/16 blacklisted
Section 30 from 0x2316000 to 0x2326000 0/16 blacklisted
Section 31 from 0x232d000 to 0x233d000 0/16 blacklisted

***Free blocks:
Free list 8 (Total size 32768):
    0x2335000 size 32768 not black listed
Total of 32768 bytes on free list

***Blocks in use:
(kind(0=ptrfree,1=normal,2=unc.,3=stubborn):size_in_bytes, #_marks_set)
[ Blocks in use ]
blocks = 1724, bytes = 7274496

***Finalization statistics:
24456 finalization table entries; 0 disappearing links
0 objects are eligible for immediate finalization
***Static roots:
From 0x10000 to 0x11000  (temporary)
From 0x20000 to 0x21000  (temporary)
From 0x22d000 to 0x22d000  (temporary)
From 0x230000 to 0x331000  (temporary)
From 0x5b1000 to 0x613000  (temporary)
From 0x614000 to 0x617000  (temporary)
From 0x618000 to 0x649000  (temporary)
From 0x64a000 to 0x64c000  (temporary)
From 0x64d000 to 0x664000  (temporary)
From 0x709000 to 0x714000  (temporary)
From 0x715000 to 0x71d000  (temporary)
From 0x720000 to 0x722000  (temporary)
From 0x724000 to 0x729000  (temporary)
From 0x14c0000 to 0x14c1000  (temporary)
From 0x14d0000 to 0x14d1000  (temporary)
From 0x16df000 to 0x16df000  (temporary)
From 0x18df000 to 0x18df000  (temporary)
From 0x19e0000 to 0x1d7d000  (temporary)
From 0x1d80000 to 0x1f65000  (temporary)
From 0x1f70000 to 0x217d000  (temporary)
From 0x75025000 to 0x75026000  (temporary)
From 0x75041000 to 0x75042000  (temporary)
From 0x77daa000 to 0x77dab000  (temporary)
From 0x77e01000 to 0x77e03000  (temporary)
From 0x77e68000 to 0x77e69000  (temporary)
From 0x77ede000 to 0x77ee0000  (temporary)
From 0x77f78000 to 0x77f79000  (temporary)
From 0x77fce000 to 0x77fd0000  (temporary)
From 0x7803b000 to 0x7803d000  (temporary)
From 0x7803f000 to 0x78042000  (temporary)
From 0x7ffdc000 to 0x7ffe0000  (temporary)
Total size: 9900032

***Heap sections:
Total heap size: 7307264
Section 0 from 0x257000 to 0x267000 1/16 blacklisted
Section 1 from 0x279000 to 0x289000 1/16 blacklisted
Section 2 from 0x28d000 to 0x29d000 1/16 blacklisted
Section 3 from 0x2af000 to 0x2c0000 1/17 blacklisted
Section 4 from 0x2c5000 to 0x2f0000 4/43 blacklisted
Section 5 from 0x2fd000 to 0x322000 5/37 blacklisted
Section 6 from 0x19e2000 to 0x1a13000 0/49 blacklisted
Section 7 from 0x1a30000 to 0x1a71000 2/65 blacklisted
Section 8 from 0x1ae1000 to 0x1b38000 0/87 blacklisted
Section 9 from 0x1b3a000 to 0x1bae000 4/116 blacklisted
Section 10 from 0x1ce1000 to 0x1d7c000 0/155 blacklisted
Section 11 from 0x1d81000 to 0x1e4f000 5/206 blacklisted
Section 12 from 0x1e51000 to 0x1f64000 5/275 blacklisted
Section 13 from 0x1f71000 to 0x20ff000 8/398 blacklisted
Section 14 from 0x2194000 to 0x21a4000 0/16 blacklisted
Section 15 from 0x21ab000 to 0x21bb000 0/16 blacklisted
Section 16 from 0x21c2000 to 0x21d2000 0/16 blacklisted
Section 17 from 0x21da000 to 0x21ea000 0/16 blacklisted
Section 18 from 0x21f1000 to 0x2201000 1/16 blacklisted
Section 19 from 0x2208000 to 0x2218000 0/16 blacklisted
Section 20 from 0x221f000 to 0x222f000 0/16 blacklisted
Section 21 from 0x2236000 to 0x2246000 0/16 blacklisted
Section 22 from 0x224d000 to 0x225d000 0/16 blacklisted
Section 23 from 0x2264000 to 0x2274000 0/16 blacklisted
Section 24 from 0x227b000 to 0x228b000 0/16 blacklisted
Section 25 from 0x22a3000 to 0x22b3000 0/16 blacklisted
Section 26 from 0x22ba000 to 0x22ca000 1/16 blacklisted
Section 27 from 0x22d1000 to 0x22e1000 0/16 blacklisted
Section 28 from 0x22e8000 to 0x22f8000 0/16 blacklisted
Section 29 from 0x22ff000 to 0x230f000 0/16 blacklisted
Section 30 from 0x2316000 to 0x2326000 0/16 blacklisted
Section 31 from 0x232d000 to 0x233d000 0/16 blacklisted

***Free blocks:
Free list 1 (Total size 4096):
    0x233c000 size 4096 not black listed
Total of 4096 bytes on free list

***Blocks in use:
(kind(0=ptrfree,1=normal,2=unc.,3=stubborn):size_in_bytes, #_marks_set)
[ Blocks in use ]
blocks = 1731, bytes = 7303168

***Finalization statistics:
24556 finalization table entries; 0 disappearing links
0 objects are eligible for immediate finalization
GC Warning: Out of Memory!  Returning NIL!
--- gc.log snippet END ----

I dunno whether this is relevant, by the number of finalization table entries 
is increasing by the number of iterations of the loop (ie. the number of 
AttachThread calls made). 

Heres the log from the last collection made:

-- gc.log snippet START ---
Initiating full world-stop collection 4 after 3911640 allocd bytes
0 bytes in heap blacklisted for interior pointers
--> Marking for collection 4 after 3911640 allocd bytes + 0 wasted bytes
Found new system malloc AllocationBase at 0x2500000
Collection 3 reclaimed 325080 bytes ---> heapsize = 6127616 bytes
World-stopped marking took 211 msecs
Bytes recovered before sweep - f.l. count = -9336
Immediately reclaimed 609160 bytes in heap of size 6127616 bytes
4567184 (atomic) + 813000 (composite) collectable bytes in use
Finalize + initiate sweep took 20 + 0 msecs
Complete collection took 231 msecs
-- gc.log snippet END ---

This resulted in the reduction of finalization table entries from 22311 in the 
dump before the collection, to 17356 in the one after, and a fairly large 
free list.

Is it significant that it only attempted 4 collections? And not one just as it 
ran out of memory?

> In theory, with a very recent libcj source tree, you should also
> be able to build with --enable-gc-debug and define GC_BACKTRACES
> to get a sampling of what's retained in the heap.  I'm pretty sure
> that has not been tested on Mingw.
>
Ok I might try that - It is however taking absolutely ages to build GCC on the 
box in question.

I'll keep the gc.log (about 3.7Mb, so if there's anything important I've 
missed I can look it up).

Cheers,

Simon.,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]