Closed ceefour closed 7 years ago
It does not for me. Are you running on MacOS? If so check https://thoeni.io/post/macos-sierra-java/
If you aren't, provide more details about your environment.
Windows 10 64bit, run from IDEA Oracle JDK 8u131 64bit
@ceefour I already told you I can't reproduce. You'll have to provide more details or try on your side on the command-line to see if that changes anything. Trying to get thread dump once it's paused during the 20 sec should help as well.
@snicoll here's thread report:
"main@1" prio=5 tid=0x1 nid=NA runnable
java.lang.Thread.State: RUNNABLE
at java.net.NetworkInterface.getAll(NetworkInterface.java:-1)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:343)
at sun.security.provider.SeedGenerator.addNetworkAdapterInfo(SeedGenerator.java:233)
at sun.security.provider.SeedGenerator.access$000(SeedGenerator.java:80)
at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:183)
at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:168)
at java.security.AccessController.doPrivileged(AccessController.java:-1)
at sun.security.provider.SeedGenerator.getSystemEntropy(SeedGenerator.java:168)
at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:201)
at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:221)
- locked <0xd44> (a sun.security.provider.SecureRandom)
at java.security.SecureRandom.nextBytes(SecureRandom.java:468)
at java.security.SecureRandom.next(SecureRandom.java:491)
at java.util.Random.nextLong(Random.java:424)
at java.io.File$TempDirectory.generateFile(File.java:1905)
at java.io.File.createTempFile(File.java:2010)
at java.io.File.createTempFile(File.java:2070)
at org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory.createTempDir(AbstractEmbeddedServletContainerFactory.java:245)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:167)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
- locked <0xd4b> (a java.lang.Object)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at com.hendyirawan.jws1032.Jws1032Application.main(Jws1032Application.java:12)
"Finalizer@336" daemon prio=8 tid=0x3 nid=NA waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler@337" daemon prio=10 tid=0x2 nid=NA waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
"Attach Listener@334" daemon prio=5 tid=0x5 nid=NA runnable
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher@335" daemon prio=9 tid=0x4 nid=NA runnable
java.lang.Thread.State: RUNNABLE
It does seem the 20 seconds pause happen during java.net.NetworkInterface.getAll(NetworkInterface.java:-1)
. I tried unpausing and re-pausing and it's still there...
Sorry but that clearly looks like a network problem on your side, this stackoverflow thread might be related.
Spring Boot: 1.5.7 Test case: https://github.com/ceefour/java-web-services-training -> jws103-2
Log: