Operating System - HP-UX
1834646 Members
2426 Online
110069 Solutions
New Discussion

Re: how to track down memory leak culprit

 
Brendan Corcoran
Occasional Contributor

how to track down memory leak culprit

Hi, Our HP-UX java process is getting an OutOfMemory error.

A recent glance analysis into the memory region of the process indicates that the Data RSS/VSS size of the java process never levels off, causing the process to crash when it reaches the maxdsiz kernel parameter of 512MB.

The Other RSS/VSS size of the process levels off at around 180MB.

Is it correct in saying that the "Data RSS/VSS" is the size of the native memory being used in the process?

If so, we are using 3 vendors products that have native code...

- What tools can we use to track down which native code vendor is the culprit of the potential memory leak?

thanking you all,
Brendan



We are running:
- HP-UX 11.0
- WebLogic 6.1
- java version "1.3.1.00-release"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.00-release-010607-16:53-PA_RISC1.1)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.00-release-010607-19:35-PA_RISC2.0 PA2.0, mixed mode)
7 REPLIES 7
steven Burgess_2
Honored Contributor

Re: how to track down memory leak culprit

Brendan

Have a look at the following thread

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5e1f8f960573d611abdb0090277a778c,00.html

It may help you

Regards

Steve
take your time and think things through
Chris Wilshaw
Honored Contributor

Re: how to track down memory leak culprit

If you have Glance installed, you could use that.

Otherwise try

export UNI95=XPG4

(this enables the ps command extensions)

ps -efo pid,vsz,comm | sort -n -k 2 | more

(displays the PID, size in KB and command for each process, sorting on the size field)

Repeat the ps command at intervals, and see which value in column2 is increasing.

You may also find this info in top.
Brendan Corcoran
Occasional Contributor

Re: how to track down memory leak culprit

Thanks for those answers.

Does anyone know of any tools that can do a complete memory analysis (of java heap memory and native memory) that a java process on HP-UX uses?

We actually do know that it is the java process that is consuming the memory, and we want a tool that can "drill down" into the native memory segments that this java process is using to try and analyse what native component is consuming all of the memory.

I've heard of a tool like Rational Purify that can do this for C programs in HP-UX, but I don't know if it can do it for java programs in HP-UX.

ta,
Brendan

Re: how to track down memory leak culprit

Try looking inside glance, option (m). Try looking at VSS. VSS should not change when the process has already been loaded. IF the value of VSS continually increases, then you have a memory leak.
Brendan Corcoran
Occasional Contributor

Re: how to track down memory leak culprit

We need a tool that can drill down further that Glance can into the memory region of a process - both java heap memory and native memory.

We did actually run glance using the following options:
- s pid (to select the java process)
- M (to look at the memory region of the process)

and noted that the Data VSS value grew and never levelled off. Whereas the Other VSS value levelled off around 180MB.

-- indicating a possible leak in the native memory region of the java process.

thanks,
Brendan

Bill Hassell
Honored Contributor

Re: how to track down memory leak culprit

Without the source code and development tools to trace and debug the code, there isn't much you can do. You've identified the offending process with Glance but as to which lines of the original program are incorrectly requesting memory and then not returning it, that will require the programmer's help.


Bill Hassell, sysadmin
LAXMAN AARYA V
New Member

Re: how to track down memory leak culprit

Hi Brendan,
I'm having the same problem, hope you will share the solution you found for the same issue.
thanks