Closed st-h closed 10 months ago
This was intentional as the 2 methos have distinct objectives. The seeding part (which can block) is running inside a execute blocking call. The exception can still be thrown, but means that your system is out of introphy. I suggest you to install the rng-tools
package in your linux distro that provides the daemon rngd
.
https://manpages.debian.org/unstable/rng-tools-debian/rngd.8.en.html
@st-h you the Vert.x blocked thread checker does not check only event loops threads, but worker pool threads as well. So this warning is not an indication of blocked event loops
Ah, thanks a lot for the explanation. I'll look into the rngd daemon.
I have been noticing issues with blocked threads for a while on running vertx instances. I have been finally looking into this and came across this article: https://tersesystems.com/blog/2015/12/17/the-right-way-to-use-securerandom/
Turns out that are two resources for getting random numbers on OS level:
/dev/urandom
(which might block) and/dev/urandom
(which shall not block).I am seeing the following Stacktrace:
Please note, there is no reference to my own code here.
The article explains that
generateSeed
uses the blocking way, whereas the non blocking alternative would be thenextBytes
method.Similar information can be found in the oracle docs https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SUNProvider :
NativePRNG (nextBytes() uses /dev/urandom, generateSeed() uses /dev/random)
I am wondering, if
generateSeed
has been used intentionally and if there is a different cause for my blocking issue, or if this indeed is a bug?