[ 
https://jira.duraspace.org/browse/DS-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26980#comment-26980
 ] 

Ian Boston commented on DS-1396:
--------------------------------

Using rngd wiring bits from /dev/urandom to /dev/random produces bits at a rate 
of 9700 Kbit/s which and passes a FIPS-140 test (rngtest), however it doesn't 
make the startup much quicker, so this might not be related to /dev/random, but 
find / still unblocks the startup.

Output from rngtest with rngd running.

~# cat /dev/random | rngtest -t 5
rngtest 2-unofficial-mt.12
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 44340032
rngtest: FIPS 140-2 successes: 2213
rngtest: FIPS 140-2 failures: 4
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 1
rngtest: FIPS 140-2(2001-10-10) Runs: 1
rngtest: FIPS 140-2(2001-10-10) Long run: 2
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=8.304; avg=9.282; max=9536.743)Mibits/s
rngtest: FIPS tests speed: (min=46.295; avg=94.946; max=96.820)Mibits/s
rngtest: Program run time: 5001671 microseconds
rngtest: bits received from input: 88220032
rngtest: FIPS 140-2 successes: 4404
rngtest: FIPS 140-2 failures: 7
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 1
rngtest: FIPS 140-2(2001-10-10) Runs: 1
rngtest: FIPS 140-2(2001-10-10) Long run: 5
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=962.510; avg=9481.689; 
max=9765625.000)Kibits/s
rngtest: FIPS tests speed: (min=661.628; avg=94153.509; max=99143.401)Kibits/s
rngtest: Program run time: 10002638 microseconds
rngtest: bits received from input: 136380032


Startup stops as follows

INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
23-Nov-2012 01:02:26 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /dspace3/webapps/xmlui

left for 8 minutes, then ran  find / instantly got the line below

root@banshee:/dspace3/log#  INFO [localhost-startStop-1] 
(DSpaceKernelInit.java:52) - Created new kernel: 
DSpaceKernel:org.dspace:name=47fb473a-2840-4244-b8e8-28341e8aac64,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null

<snip>

INFO [localhost-startStop-1] (ConfigurationManager.java:1224) - Using dspace 
provided log configuration (log.init.config)
 INFO [localhost-startStop-1] (ConfigurationManager.java:1224) - Loading: 
/dspace3/config/log4j.properties
Loading catalog: 
file:/usr/local/apache-tomcat-7.0.33/work/Catalina/localhost/xmlui/cocoon_xml_resolver_entities/catalog
23-Nov-2012 01:08:20 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /dspace3/webapps/jspui


waited for 2 minutes, then ran find / again. Instantly got the line below


23-Nov-2012 01:10:36 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
23-Nov-2012 01:10:36 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
 INFO [localhost-startStop-1] (DSpaceKernelInit.java:52) - Created new kernel: 
DSpaceKernel:org.dspace:name=2ed61f13-c661-48a4-9241-3b15ed7eee20,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
 INFO [localhost-startStop-1] (DSpaceConfigurationService.java:553) - Loaded 5 
config properties from resource: class path resour


<snip>

INFO: 
validateJarFile(/usr/local/tomcat7/webapps/solr/WEB-INF/lib/servlet-api-2.4.jar)
 - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
javax/servlet/Servlet.class
23-Nov-2012 01:10:51 org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /dspace3/solr
23-Nov-2012 01:10:51 org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/dspace3/solr/'

waited, ran find /, got the line below.


23-Nov-2012 01:14:19 org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
23-Nov-2012 01:14:19 org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: Using JNDI solr.home: /dspace3/solr
23-Nov-2012 01:14:19 org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: /dspace3/solr/solr.xml

<snip>

23-Nov-2012 01:14:21 org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
23-Nov-2012 01:14:21 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /dspace3/webapps/thumbnail

waited, ran find /, got the line below


root@banshee:/dspace3/log#  INFO [localhost-startStop-1] 
(DSpaceKernelInit.java:52) - Created new kernel: 
DSpaceKernel:org.dspace:name=2392bb91-8870-4516-87b0-d32215e504f1,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
 INFO [localhost-startStop-1] (DSpaceConfigurationService.java:553) - Loaded 5 
config properties from resource: class path resource 
[config/dspace-defaults.cfg]
 INFO [localhost-startStop-1] (DSpaceConfigurationService.java:579) - Loaded2 
config properties from stream
 INFO [localhost-startStop-1] (DSpaceConfigurationService.java:579) - Loaded1 
config properties from stream
 INFO [localhost-startStop-1] (DSpaceConfigurationService.java:579) - Loaded.


<snip>


INFO: Server startup in 793168 ms


On OSX, that takes about 30s.

                
> Very slow startup on Linux Platforms
> ------------------------------------
>
>                 Key: DS-1396
>                 URL: https://jira.duraspace.org/browse/DS-1396
>             Project: DSpace
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Linux version 2.6.32-38-server (buildd@allspice) (gcc 
> version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) 
> /usr/lib/jvm/java-6-sun/bin/java 
> -Djava.util.logging.config.file=/usr/local/tomcat7/conf/logging.properties 
> -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Xms256m 
> -Xmx800m -XX:PermSize=256m -XX:NewSize=64m -server -XX:+UseConcMarkSweepGC 
> -Djava.net.preferIPv4Stack=true 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
> -Djava.endorsed.dirs=/usr/local/tomcat7/endorsed -classpath 
> /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar 
> -Dcatalina.base=/usr/local/tomcat7 -Dcatalina.home=/usr/local/tomcat7 
> -Djava.io.tmpdir=/tmp/tomcat7-tmp org.apache.catalina.startup.Bootstrap start
>            Reporter: Ian Boston
>            Priority: Critical
>
> I am experiencing extremely slow startup times for DS3-rc3 on Linux with the 
> stock sun JVM, and I have experienced total hangs 11:19-15:09 of the JVM with 
> perfect operation after the end of the period (no restart of any form was 
> required). By slow startup I mean just bringing up solr, xmlui and jspui can 
> take 60 minutes.
> I think this is due to /dev/ramdom on the OS not getting sufficient entropy, 
> probably caused by the Bouncy Castle crypto APIs or the new SecureRandom() in 
> Eperson.
> performing a 
> find / 
> as root appears to unstick the JVM on startup, pointing to an entropy issue 
> (find / will cause disk I/O not from cache generating low level device driver 
> entropy)
> Has anyone else seen these issues ?
> Is there a known fix (other than performing a find)
> I have already tried  -Djava.security.egd=file:/dev/./urandom 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to