-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThreadLocalRandom generates always the same numbers #11573
Comments
Seems to be related to oracle/graal#1610 and the fix should be available in GraalVM 20.2.0 |
/cc @galderz wondering if we would want that one backported to Mandrel? |
Bad news: I just tested in 20.2.0 and that doesn't seem to be fixed for |
It looked surprising that a year old fix didn't make it to 20.2 which was recently released. So I had a look and it appears that this feature isn't enabled by default in Graal VM. I am not sure if that was intentional. I have opened oracle/graal#2790 with a proposed fix. |
oracle/graal#1610 is included in both Mandrel 20.1 and 20.2. Hope the improvement fix gets included too. |
Just dropping another issue for you to be aware of: oracle/graal#2993 |
Describe the bug
(Describe the problem clearly and concisely.)
ThreadLocalRandom.current().nextLong() always generates the same numbers on each startup. This only happens when I run a native image.
Expected behavior
(Describe the expected behavior clearly and concisely.)
ThreadLocalRandom.current().nextLong() generates different numbers on each startup.
Actual behavior
(Describe the actual behavior clearly and concisely.)
ThreadLocalRandom.current().nextLong() generates same numbers on each startup.
To Reproduce
Steps to reproduce the behavior:
Configuration
Screenshots
![image](https://user-images.githubusercontent.com/20753996/91062425-f9ac7580-e62c-11ea-9db4-a073f26120de.png)
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of
uname -a
orver
: Linux nb-xxx 5.4.0-42-generic Add proper logging #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxOutput of
java -version
: openjdk version "11.0.8" 2020-07-14GraalVM version (if different from Java): 20.1.0
Quarkus version or git rev: 1.7.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
): Gradle 6.4.1Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: