Skip to content
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

SplittableRandomTest.java imtermittently timeout #428

Closed
sendaoYan opened this issue Nov 4, 2022 · 3 comments
Closed

SplittableRandomTest.java imtermittently timeout #428

sendaoYan opened this issue Nov 4, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@sendaoYan
Copy link
Collaborator

Description
jdk/test/java/util/SplittableRandom/SplittableRandomTest.java imtermittently timeout.
When the /dev/random is empty, then this testcase will run timeout

Steps to Reproduce
Steps to reproduce the behavior:

timeout 10 wc -l /dev/random
cat /proc/sys/kernel/random/entropy_avail
jtreg -timeout:0.1 -nr -w tmp -v:fail,error jdk/test/java/util/SplittableRandom/SplittableRandomTest.java

result:

"MainThread" #26 prio=5 os_prio=0 tid=0x0000ffff94402000 nid=0xc7ad8 runnable [0x0000fffe55f3a000]
   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 <0x000000008274c7e8> (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 java.security.SecureRandom.getSeed(SecureRandom.java:520)
        at java.util.concurrent.ThreadLocalRandom.initialSeed(ThreadLocalRandom.java:141)
        at java.util.concurrent.ThreadLocalRandom.<clinit>(ThreadLocalRandom.java:136)
        at java.util.concurrent.ForkJoinPool.externalPush(ForkJoinPool.java:2401)
        at java.util.concurrent.ForkJoinTask.fork(ForkJoinTask.java:702)
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:306)
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
        at java.util.stream.ForEachOps$ForEachOp$OfDouble.evaluateParallel(ForEachOps.java:230)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
        at java.util.stream.DoublePipeline.forEach(DoublePipeline.java:393)
        at java.util.stream.DoublePipeline$Head.forEach(DoublePipeline.java:587)
        at SplittableRandomTest.testBoundedDoubles(SplittableRandomTest.java:488)

Expected behavior
image

JDK version
image

Execution environment

image

@sendaoYan sendaoYan self-assigned this Nov 4, 2022
@sendaoYan sendaoYan added the enhancement New feature or request label Nov 4, 2022
@sendaoYan
Copy link
Collaborator Author

image

sendaoYan added a commit that referenced this issue Nov 4, 2022
Summary: fix jdk/test/java/util/SplittableRandom/SplittableRandomTest.java intermittently fail, use /dev/urandom instead of /dev/random to avoid block for SecureRandom API

Test Plan: CI pipeline

Reviewed-by: lvfei.lv, lei.yul

Issue: #428
@sendaoYan
Copy link
Collaborator Author

image

sendaoYan added a commit that referenced this issue Nov 4, 2022
Summary: fix jdk/test/java/util/SplittableRandom/SplittableRandomTest.java intermittently fail, use /dev/urandom instead of /dev/random to avoid block for SecureRandom API

Test Plan: CI pipeline

Reviewed-by: lvfei.lv, lei.yul

Issue: #428
@sendaoYan
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant