RE: Hanging on startup?

2012-03-12 Thread Caldarale, Charles R
 From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] 
 Subject: Hanging on startup?

 Startup, and it hangs on app deploy:

Waiting for entropy to build up?  Take a few thread dumps with jstack to see 
who's waiting on what.  If it is entropy, see this discussion:

http://marc.info/?l=tomcat-userm=132769606728228w=2


 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: Hanging on startup?

2012-03-12 Thread Dan Armbrust
On Mon, Mar 12, 2012 at 2:34 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com]
 Subject: Hanging on startup?

 Startup, and it hangs on app deploy:

 Waiting for entropy to build up?  Take a few thread dumps with jstack to see 
 who's waiting on what.  If it is entropy, see this discussion:

 http://marc.info/?l=tomcat-userm=132769606728228w=2


  - Chuck



I think your right.

Here is the stack I just dug out:

pool-2-thread-1 prio=10 tid=0x40c4a800 nid=0x250e runnable
[0x7f3895203000]
   java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:220)
at 
sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:493)
at 
sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:117)
at 
sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:114)
at 
sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:171)
- locked 0x0007d8b0ee08 (a sun.security.provider.SecureRandom)
at java.security.SecureRandom.nextBytes(SecureRandom.java:433)
- locked 0x0007d8b0ee60 (a java.security.SecureRandom)
at java.security.SecureRandom.next(SecureRandom.java:455)
at java.util.Random.nextInt(Random.java:189)
at 
org.apache.catalina.util.SessionIdGenerator.createSecureRandom(SessionIdGenerator.java:246)
at 
org.apache.catalina.util.SessionIdGenerator.getRandomBytes(SessionIdGenerator.java:183)
at 
org.apache.catalina.util.SessionIdGenerator.generateSessionId(SessionIdGenerator.java:153)
at 
org.apache.catalina.session.ManagerBase.startInternal(ManagerBase.java:574)
at 
org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:466)
- locked 0x0007d8a327c8 (a 
org.apache.catalina.session.StandardManager)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
- locked 0x0007d8a327c8 (a 
org.apache.catalina.session.StandardManager)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5282)
- locked 0x0007d89ca578 (a 
org.apache.catalina.core.StandardContext)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
- locked 0x0007d89ca578 (a 
org.apache.catalina.core.StandardContext)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at 
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- 0x0007d89c1290 (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync)

Sigh.

I see Sun/Oracle  was as helpful as ever on this one:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6521844
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6202721

I'll try the workarounds in the thread you pointed out, thanks.

Anything that Tomcat could do to prevent itself from getting stuck like this?

Thanks,

Dan

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



Re: Hanging on startup?

2012-03-12 Thread Dan Armbrust
Yep.

JAVA_OPTS=-Djava.security.egd=file:/dev/./urandom

prevents the hang.

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



RE: Hanging on startup?

2012-03-12 Thread Caldarale, Charles R
 From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] 
 Subject: Re: Hanging on startup?

 I see Sun/Oracle  was as helpful as ever on this one:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6521844
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6202721

Can't comment in public...

 Anything that Tomcat could do to prevent itself from getting 
 stuck like this?

Not sure if it's possible, but I suppose the bootstrap mechanism could check 
for /dev/urandom in the system property and substitute /dev/./urandom.  Might 
even be able to introduce a double secret probation config tag to make 
/dev/./urandom the default unless otherwise specified.  Not sure if that would 
help a lot of people, since they'd likely still have to go through the 
debugging phase to figure out what was taking so long.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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