CDV ❯ server hangs at startup (linux)
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
DSO:L2
-
-
hhuynh
-
Reporter: teck
-
March 17, 2008
-
0
-
Watchers: 0
-
November 04, 2008
-
March 18, 2008
Description
I’m pretty sure this issue is new with the updated version of jetty, but it could also be some of the new stuff we’re doing with jetty (as opposed to the jetty version)
On linux, SecureRandom looks like it reads /dev/random which can block if there is not enough entropy in the system. The server can be stuck here (see stack below) for quite a while (ie. more than 10 seconds). If we can avoid this code path, we probably should (maybe this means disabling sessions somehow?)
“main” prio=10 tid=0x09b9d400 nid=0x63a4 runnable [0xb7f42000..0xb7f43208] java.lang.Thread.State: RUNNABLE at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:199) at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) - locked <0xa7ed7af8> (a java.io.BufferedInputStream) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) - locked <0xa7ed76f0> (a java.io.BufferedInputStream) at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedByte(SeedGenerator.java:453) at sun.security.provider.SeedGenerator.getSeedBytes(SeedGenerator.java:123) at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:118) at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:114) at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:171) - locked <0xa898ecd8> (a sun.security.provider.SecureRandom) at java.security.SecureRandom.nextBytes(SecureRandom.java:433) - locked <0xa898ef58> (a java.security.SecureRandom) at java.security.SecureRandom.next(SecureRandom.java:455) at java.util.Random.nextLong(Random.java:284) at org.mortbay.jetty.servlet.HashSessionIdManager.doStart(HashSessionIdManager.java:135) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.AbstractSessionManager.doStart(AbstractSessionManager.java:168) at org.mortbay.jetty.servlet.HashSessionManager.doStart(HashSessionManager.java:67) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.SessionHandler.doStart(SessionHandler.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:529) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.tc.server.TCServerImpl.startHTTPServer(TCServerImpl.java:433) at com.tc.server.TCServerImpl.access$400(TCServerImpl.java:64) at com.tc.server.TCServerImpl$StartAction.execute(TCServerImpl.java:309) at com.tc.lang.StartupHelper.startUp(StartupHelper.java:39) at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:341) at com.tc.server.TCServerImpl.start(TCServerImpl.java:164) - locked <0xa7a4d0e8> (a java.lang.Object) at com.tc.server.TCServerMain.main(TCServerMain.java:28)
Comments
Geert Bevin 2008-03-18
Hung Huynh 2008-11-04
not sure how to reproduce this.
Hung Huynh 2008-11-04
running 2.7.1 server multiple times on su10qa8 without any problem
I committed some changes that should fix this. I can’t however verify since I couldn’t see this behavior on my linux installation.