7.13.4 Checking and measures when the initialization of the Explicit memory block fails

This point describes about the measures to be taken and how to check when the initialization of Explicit memory block fails.

When number of Explicit memory blocks reaches the maximum limit, the Explicit memory block cannot be initialized beyond that limit.

In such cases, reduce the number of Explicit memory blocks.

Here, how to check whether the initialization of Explicit memory block has failed, is described.

Organization of this subsection
(1) Investigating from the event log of the Explicit Memory Management functionality
(2) Investigating from the log file output by the thread dump
(3) Investigating from the API of Java

(1) Investigating from the event log of the Explicit Memory Management functionality

To investigate with the event log of explicit management functionality, you must specify normal in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM in advance. As a result, whenever the garbage collection occurs, the frequency at which the initialization of Explicit memory block fails, will be output to the explicit management heap functionality event log.

An output example is as follows:

[ENS]Thu Oct 21 14:55:50 2007[EH: 12672K->12800K(12800K/65536K)][E/F/D: 200/0/0][cause:GC][CF: 0]

The part in bold indicates the number of times the initialization of Explicit memory block failed between the last and the recent output. In this example, frequency is "0". When there is no failure in the initialization, it is concluded that there is no problem.

Moreover, when verbose is specified in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM, the information about event of failure in the initialization of Explicit memory block will be output.

An output example is as follows:

[EVO]Tue Jul 24 01:23:51 2007[Creation failed][EH: 32760K(0K)/32768K/65536K][E/F/D: 65535/0/0][Thread: 0x00035a60]
[EVO][Thread: 0x00035a60] at ExplicitMemory.registerExplicitMemory(Native Method)
[EVO][Thread: 0x00035a60] at BasicExplicitMemory.<init>(Unknown Source)
[EVO][Thread: 0x00035a60] at AllocTest.test(AllocTest.java:64)
[EVO][Thread: 0x00035a60] at java.lang.Thread.run(Thread.java:2312)

From the part marked in bold, you can confirm that there is a failure in the initialization of Explicit memory block. Moreover, the rows starting with [EVO][Thread: 0x00035a60] indicates the stack trace when event occurs.

Also, when debug is specified in the -XX:HitachiExplicitMemoryLogLevel option of JavaVM, the detailed information about the initialization events of the Explicit memory block other than the event of failure in the initialization will be output. The initialization fails when the number of Explicit memory blocks exceed the constant number. Therefore, the information of initialization event prior to failure in initialization is useful for investigations.

An output example is as follows:

[EVO]Tue Jul 24 01:23:51 2007[Created]["BasicExplicitMemory-2" eid=2(0x1234568​)/B][Thread: 0x00035a60]
[EDO][Thread: 0x00035a60] at ExplicitMemory.registerExplicitMemory(Native Method)
[EDO][Thread: 0x00035a60] at BasicExplicitMemory.<init>(Unknown Source)
[EDO][Thread: 0x00035a60] at AllocTest.test(AllocTest.java:64)
[EVO][Thread: 0x00035a60] at java.lang.Thread.run(Thread.java:2312)

The part marked in bold confirms that there is an Explicit memory block initialization event. Moreover, the rows starting with [EDO][Thread: 0x00035a60] indicates the stack trace when the event has occurred.

(2) Investigating from the log file output by the thread dump

Though you cannot check the direct cause responsible for failure in initialization of the Explicit memory block from the information output by thread dump, you can find out the number of Explicit memory blocks.

An output example is as follows:

Explicit Heap Status
--------------------
max 65536K, total 21888K, used 20992K, garbage 1288K (32.0% used/max, 95.9% used/total, 6.1% garbage/used), 2 spaces exist

Explicit Memories(0x12345678​)

"EJBMgrData" eid=1(0x02f25610)/R, total 21376K, used 20480K, garbage 1234K (95.8% used/total, 6.0% garbage/used, 0 blocks) Enable

"ExplicitMemory-4" eid=4(0x02f45800)/B, total 512K, used 512K, garbage 54K (100.0% used/total, 10.5% garbage/used, 0 blocks) Disable

The part marked in bold indicates the number of Explicit memory blocks.

(3) Investigating from the API of Java

You can investigate the number of Explicit memory blocks using the following methods:

However, you cannot check the direct cause responsible for failure in initialization of the Explicit memory block in this API.