1753971 Members
8653 Online
108811 Solutions
New Discussion юеВ

Process gets hung

 
Subentu
Frequent Advisor

Process gets hung

Hi guys

I have a Rx7620 machine running HP-UX 11.23.v

I have a java process running in this machine. After sometime it just gets hung.

The memory consumption of the process remains normal, but the CPU% gets very low when it gets hung.

Here is the top output at normal time:

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.77 21.4% 0.0% 41.7% 36.9% 0.0% 0.0% 0.0% 0.0%
1 0.68 17.3% 0.0% 37.3% 45.4% 0.0% 0.0% 0.0% 0.0%
2 0.66 16.1% 0.0% 38.5% 45.4% 0.0% 0.0% 0.0% 0.0%
3 0.77 21.0% 0.0% 41.0% 38.0% 0.0% 0.0% 0.0% 0.0%
4 0.77 21.0% 0.0% 42.1% 36.9% 0.0% 0.0% 0.0% 0.0%
5 2.27 94.4% 0.0% 5.6% 0.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.99 31.7% 0.0% 34.3% 33.9% 0.0% 0.0% 0.0% 0.0%

Memory: 6302704K (4466356K) real, 8075784K (5856472K) virtual, 3848128K free Page# 1/9

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
5 pts/3 6928 bscsprod 152 20 1252M 1124M run 8:05 90.88 90.72 java
4 ? 20827 bscsprod 224 20 5060K 1084K run 138:17 14.57 14.54 sh
2 ? 24053 oracle 154 20 2260M 12500K sleep 13:09 11.10 11.08 oracleBSCSPROD
5 pts/3 2908 bscsprod 152 20 772M 207M run 0:46 9.35 9.34 java
0 ? 10 root 152 20 936K 832K run 67:10 7.40 7.38 nfsktcpd
4 ? 25434 bscsprod 158 20 8152K 4424K sleep 63:39 6.54 6.53 sh
3 ? 8195 root 154 20 12500K 2228K sleep 1:16 3.59 3.58 bma


As you can see java process consumes upto 95% of the CPU%. But when it gets hung, it goes as low as 20%.

Can you please give me any idea why this happen or a way to findout more about the problem.

Thanks in advance.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Process gets hung

Shalom,

swlist -l product | grep java

also grep jdk and or jre

Java is pretty volatile, memory hungry and well known for less than prime time releases.

The fastest, easiest fix in many cases is to get another buggy version of java.

Also make sure OS recommended patches listed at http://www.hp.com/go/java are installed. They help.

It might however be bad application code if you have a custom written java application in which case you must kick it back to the developers for more testing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Subentu
Frequent Advisor

Re: Process gets hung

Thanks Steven

This process was running fine for more than 2 years now. It started giving problems on Thursday.

Jeeshan
Honored Contributor

Re: Process gets hung

well this may be sometimes makes problem due to excess session opened.

check with sar

#sar -v 5 5
a warrior never quits
Dennis Handly
Acclaimed Contributor

Re: Process gets hung

>As you can see java process consumes upto 95% of the CPU%. But when it gets hung, it goes as low as 20%.

By definition, hung means 0%. It might be doing garbage collection and having problems with paging.

Have you tried HPjmeter?
http://www.hp.com/go/java