Description:On some machines
TIBCO executables (Administrator/AppManage/Obfuscate/BWEngine) starts in less than two minutes, on others, in 10 – 30 minutes or results in a hung state. This issue is seen if there is any SSL communication involved . e.g Like Domains are based on files and use LDAPS or Domain are configured with HTTPS. The same behavior is observed with AppManage and Obfuscate utilities in TRA. No error or exception is recorded in the log file.
Symptoms:Sometimes TIBCO
executables(Administrator/AppManage/Obfuscate/BWEngine) is too slow or indefinitely hangs.
If you take the thread dump using kill -3 option you will see the process is hanging on SecureRandom.
=========================================
daemon prio=10 tid=0x00007f6f68002800 nid=0x697b in Object.wait() [0x00007f6fa91ae000]
java.lang.Thread.State: RUNNABLE
at sun.security.provider.SecureRandom.engineNextBytes(Unknown Source)
- locked <0x000000077a35f6b8> (a sun.security.provider.SecureRandom)
at java.security.SecureRandom.nextBytes(Unknown Source)
- locked <0x000000077a35f9d0> (a java.security.SecureRandom)
at java.security.SecureRandom.next(Unknown Source)
at java.util.Random.nextInt(Unknown Source)
at org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom(SessionIdGeneratorBase.java:237)
at org.apache.catalina.util.SessionIdGeneratorBase.getRandomBytes(SessionIdGeneratorBase.java:174)
=========================================
Cause:This is environment specific and due to Java's Known issues on Linux, you might be running into known behavior . Where Java applications using SecureRandom on Linux for generating cryptographically strong random number in Java. Unfortunately, SecureRandom can be very slow. If it uses /dev/random on Linux, it can block for a long time.
One can compare the seed response between 2 environment .
[a]. type cat /dev/random.
[b]. type cat /dev/urandom
If you compare above response for [a] will be slow compared [b].
For Java, this is known behavior (see NOTES 2 below). Suggested workaround in Resolution section below.