Thursday, May 6, 2010

thread dump for OC4J JVM

To get a thread trace on a JVM, make sure your opmn java-options in your start-options does not include -Xrs. (If you had to remove it, be sure to restart your AS (maybe the OC4J restart would be enough...)) This -Xrs option reduces signaling capability. Then (in UNIX) you get the JVM process id to kill. One way is through Enterprise manager. In EM, in your topological list of oc4j's, you should have a link showing how many JVM's you have for each oc4j you have in you iAS. If you click on this, the resulting page will show you your process id. If you then type
kill -3 <theprocessidyoujustlookedup>
and hit enter, your opmn log (you know: the one in $ORACLE_HOME/opmn/logs that has your oc4j's name in the middle of it, with tilde's in the name...*THAT* log) should display a lovely thread dump.

I wanted a thread dump because such a thing seems to be how Oracle characterizes their bugs against their iAS. So for example they might say, if a thread dump shows the following...then you have this problem...and here's how to fix it.

Thanks to Mike Lehmann for his helpful article, which you can see, is just a click away; I basically took what he did, distilled it and added the things I had to go look up.

No comments: