jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Re: Threads blocked in org.apache.jackrabbit.core.id.SeededSecureRandom
Date Thu, 07 Oct 2010 05:52:27 GMT
NativePRNG generation reads at intervals from /dev/random and/or /dev/urandom depending on
the OS.
That is a blocking read.
Some variants of Linux have been reported to be quite slow reading from there, there was discussion
on dev@sling.a.o on this subject about 3 months back, have a search in  the markmail.org archive

You can configure the OS/JVm to limit the frequency of reads to those files or to re-configure
the PRNG.

HTH
Ian
On 7 Oct 2010, at 00:59, Patricio Echag├╝e wrote:

> Hi everyone, has anyone seen this behavior too?
> 
> I ran a couple of jstacks and after running a diff between different ones
> taken at 5 secs interval, we've seen that this stack:
> 
> We have more than 50 threads waiting here.
> 
> "SeededSecureRandom" prio=10 tid=0x0000000008142800 nid=0x566b waiting for
> monitor entry [0x0000000049bbb000]
>   java.lang.Thread.State: BLOCKED (on object monitor)
>    at
> sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:201)
>    - waiting to lock <0x00002aaacddf0940> (a java.lang.Object)
>    at
> sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
>    at
> sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
>    at java.security.SecureRandom.generateSeed(SecureRandom.java:495)
>    at
> org.apache.jackrabbit.core.id.SeededSecureRandom.run(SeededSecureRandom.java:94)
>    at java.lang.Thread.run(Thread.java:619)
> 
> any clue?
> 
> Thanks
> 
> 
> -- 
> Patricio.-


Mime
View raw message