FULL PRODUCT VERSION :
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Method java.lang.Math#random uses the broken double check locking pattern. More information can be found on http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.
Using this pattern may lead to unpredictable results in a contended environment.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is very hard to reproduce, if the bug is triggered in current JVMs at all. Specialized and future JVMs may suffer as the amount of processors and threads per processor grows.
Possibly a duplicate of 6470700.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Not applicable.
ACTUAL -
Not applicable.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Not applicable.
REPRODUCIBILITY :
This bug can be reproduced rarely.
---------- BEGIN SOURCE ----------
Not applicable.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround.
A fix is easy. Either statically initialize field randomNumberGenerator, or make method random synchronized.
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Method java.lang.Math#random uses the broken double check locking pattern. More information can be found on http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.
Using this pattern may lead to unpredictable results in a contended environment.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is very hard to reproduce, if the bug is triggered in current JVMs at all. Specialized and future JVMs may suffer as the amount of processors and threads per processor grows.
Possibly a duplicate of 6470700.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Not applicable.
ACTUAL -
Not applicable.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Not applicable.
REPRODUCIBILITY :
This bug can be reproduced rarely.
---------- BEGIN SOURCE ----------
Not applicable.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround.
A fix is easy. Either statically initialize field randomNumberGenerator, or make method random synchronized.
- duplicates
-
JDK-6470700 Math.random() / Math.initRNG() uses "double checked locking"
-
- Closed
-