On 2011-04-03, Rainer Jung wrote:

> On 02.04.2011 01:20, Konstantin Kolinko wrote:
>> 2011/4/1 Konstantin Kolinko<knst.koli...@gmail.com>:
>> In the recent run:

>>      [junit] Apr 1, 2011 9:53:27 PM
>> org.apache.catalina.util.SessionIdGenerator createSecureRandom
>>      [junit] INFO: Creation of SecureRandom instance fo
>>      [junit] r session ID generation using [SHA1PRNG] took [69,367] 
>> milliseconds.

>> and so on in the next runs.

>> That explains the slowness. It is good that we have this logging now.

> I know there was some related discussion on the users list, but just
> in case it didn't become clear from that.

> There is a bug in the Oracle JVM. Initialization of random number
> generation on Linux can block for a long time, because even if
> configured for using /dev/urandom it will use /dev/random. 1.6.0_24
> even seems to be preconfigured for using /dev/urandom on Linux, but it
> dows not work due to an implementation bug.

vmgump is on 6b20 and I don't think there is anything more recent
available for Ubuntu 10.4 (unless we fiddle with package sources, I
guess).

But you seem to be correct this is a Linux issue.  On FreeBSD[1] I see
140 ms.

> Workaround: You can still use the system property "java.security.egd"
> to switch to /dev/urandom, but you have to use a value that is
> semantically equivalent to /dev/urandom but not stringwise
> identical.

You can set system properties via <sysproperty> inside the Gump
descriptor and if you use

           <sysproperty name="ant.build.clonevm" value="true"/>

Ant will make sure any system property will be passed to a new Java VM
that is forked as well[2] (as long as forking uses Ant's mechanisms,
that is).

Stefan

[1] 
http://gump.zones.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.txt

[2] http://ant.apache.org/manual/clonevm.html

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to