You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2019/09/28 16:51:15 UTC
[jmeter] branch master updated: Remove new
SecureRandom().generateSeed(128) as it exhausts entropy
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 259fafa Remove new SecureRandom().generateSeed(128) as it exhausts entropy
259fafa is described below
commit 259fafa4ba1ed5b607d0aca0459e10df221f36da
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Sat Sep 28 19:50:39 2019 +0300
Remove new SecureRandom().generateSeed(128) as it exhausts entropy
Here's a stacktrace:
"main" #1 prio=5 os_prio=0 tid=0x00007f507400c800 nid=0x33d2 runnable [0x00007f507aaa0000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:255)
at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:424)
at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:441)
- locked <0x00000000ffb11238> (a java.lang.Object)
at sun.security.provider.NativePRNG$RandomIO.access$500(NativePRNG.java:331)
at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:226)
at java.security.SecureRandom.generateSeed(SecureRandom.java:533)
at org.apache.jorphan.util.JOrphanUtils.<clinit>(JOrphanUtils.java:52)
at org.apache.jmeter.util.JMeterUtils.loadJMeterProperties(JMeterUtils.java:213)
at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:788)
at org.apache.jmeter.JMeter.start(JMeter.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.jmeter.NewDriver.main(NewDriver.java:253)
---
src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java b/src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java
index d301a2a..ccae263 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java
@@ -40,16 +40,12 @@ import org.apache.commons.text.RandomStringGenerator;
/**
* This class contains frequently-used static utility methods.
- *
*/
-
-// @see TestJorphanUtils for unit tests
-
public final class JOrphanUtils {
private static final int DEFAULT_CHUNK_SIZE = 4096;
- private static final SecureRandom SECURE_RANDOM = new SecureRandom(new SecureRandom().generateSeed(128));
+ private static final SecureRandom SECURE_RANDOM = new SecureRandom();
/**
* Private constructor to prevent instantiation.
*/