We are seeing a particularly interesting behaviour on AIX 5.1 with
Java 1.3.1
(32-bit) and WAS 4.0.6.
stdout.txt indicates DB2 driver failed allocating memory:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0120E Memory
allocation
failure. SQLSTATE=HY001
stderr.txt indicates that Java heap is not yet exhausted which led me
to believe that the native heap might be the culprit:
<AF[182]: Allocation Failure. need 32 bytes, 158788 ms since last AF>
<AF[182]: managing allocation failure, action=1 (0/587659776)
(3145728/3145728)>
<GC(182): mark stack overflow[3]>
<GC(182): GC cycle started Fri Mar 5 14:20:02 2004
<GC(182): freed 177628592 bytes, 30% free (180774320/590805504), in
4968
ms>
<GC(182): mark: 4796 ms, sweep: 172 ms, compact: 0 ms>
<GC(182): refs: soft 0 (age >= 6), weak 5, final 1161, phantom 0>
<AF[182]: completed in 4970 ms>
java.lang.OutOfMemoryError
But then svmon output shows there is plenty memory avilable to most
segments
except 3
and 4:
-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit
Mthrd LPage
30132 java 354768 2274 12142 353631 N
Y N
Vsid Esid Type Description LPage Inuse Pin
Pgsp
Virtual
28baa 4 work shmat/mmap - 65492 0
59 65536
548f5 3 work shmat/mmap - 65170 0
90 65259
302cc 8 work shmat/mmap - 49933 0
5137 54590
24b69 7 work shmat/mmap - 49215 0
1996 50890
348ad 5 work shmat/mmap - 39205 0
3 39205
7bb9c 9 work shmat/mmap - 32464 0
2972 35024
7c33f a work shmat/mmap - 27327 0
951 28111
64019 d work shared library text - 8764 0
7 9540
0 0 work kernel seg - 4826 2169
916 4926
108a4 2 work process private - 107 2
3 110
5bf94 f work shared library data - 105 0
6 112
688ba 1 pers code,large file - 9 0
- -
47fd3 6 work shmat/mmap - 1 0
0 1
MAXDATA is 8, meaning there is 2GB of heap (Java + Native) and -Xmx is
1024m,
and there is 512MB of shared memory with Java heap being allocated
from native
heap.
Could it be that native heap is being restricted to segements 3 and 4
only? It
was not clear to me how the 2G total heap is partitioned among Java
and native
heap. I am not sure how I can see exactly where native heap is being
allocated.
Any help would be greatly appreciated