username@yosemite ~ % ps wwwaux | grep java
username 48111 0.0 0.0 0 0 ?? ?E 11:54AM 0:00.00 (java)
username 91673 0.0 0.0 2432772 508 s006 R+ 3:19PM 0:00.00 grep java
username 90809 0.0 0.0 0 0 ?? ?E 12:47PM 0:00.00 (java)
Every so often I will get a JVM hung like this. What do the (java)
process listings mean? How do I kill them? kill -9 48111
does nothing, and AFAICT the listings stay there until I reboot.
Best Answer
When in doubt refer to the man page :)
Additionally:
It would appear those are zombie processes, and instead of just returning
<defunct>
as the process name it's returning what was stored in some kind of accounting record.As for killing these processes, rebooting may be the best option. Since they lost their original PPID and become children of PPID 1 (launchd). You can try sending a HUP signal to launchd, but don't try to send a SIGKILL or SIGTERM signal to it, or you'll crash your system.
You can verify the PPID of the zombie processes using
ps -ef
.Note: having a few zombie processes shouldn't hurt anything. The process isn't actually running anymore, it has been terminated and isn't using any system resources, other than an entry in the process table.