It’s highly recommended to capture 3 threads dumps in an interval of 10 seconds to uncover any problem in the JVM. If in the 2nd and 3rd thread dump if additional threads start to go into a particular state, then those threads and their stack traces have to be studied in detail. It may or may not be indicative of certain problem in the application, but definitely, a good lead to follow.
This problem surfaced because of a thread leak in Oracle JDBC Driver when ONS feature was turned ON. This problem happened in an old version of Oracle JDBC Driver (almost in 2011). Because of the bug in the driver, under certain scenarios, it started to spawn tonnes of new threads. In every captured thread dump new threads in RUNNABLE stated with below stack trace got added. Around 1700 threads with the same stack trace got created.
Thread-6805 - priority:8 - threadId:0x07768000 - nativeId:10966 - addressSpace:null - state:RUNNABLE stackTrace: java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:155) at java.net.SocketInputStream.read(SocketInputStream.java:121) at oracle.ons.InputBuffer.readMoreData(InputBuffer.java:268) at oracle.ons.InputBuffer.getNextString(InputBuffer.java:223) at oracle.ons.ReceiverThread.run(ReceiverThread.java:266)
Why named as additives?
Additives are defined as ‘a substance added to something in small quantities’. Similarly, this pattern talks above addition of new threads to an existing state.
Leave a Reply