-
Enhancement
-
Resolution: Unresolved
-
P3
-
None
SecureRandom has a blocking and a non-blocking mode.
It should be possible to create a JFR rule detecting if the application is blocked for too long when calling SecureRandom
The rule would use the Method Profiling Sample Native event and detect if events with a stacktrace similar to the below appear in the recording during an extended timeframe:
int java.io.FileInputStream.readBytes(byte[], int, int)
int java.io.FileInputStream.read(byte[], int, int)
int java.io.FilterInputStream.read(byte[], int, int)
void sun.security.provider.NativePRNG$RandomIO.readFully(InputStream, byte[])
SecureRandom sun.security.provider.NativePRNG$RandomIO.getMixRandom()
void sun.security.provider.NativePRNG$RandomIO.implNextBytes(byte[])
void sun.security.provider.NativePRNG$Blocking.engineNextBytes(byte[])
void java.security.SecureRandom.nextBytes(byte[])
- is blocked by
-
JMC-6442 Transform sampledThread attribute to eventThread attribute for NativeMethodSample events
- Resolved