Citadel

Citadel

83M Downloads

No timeout mechism and cause WebHelper stuck the server bootup forever

Ghost-chu opened this issue ยท 1 comments

commented

My server stucked on booting for really long, so I decide use jstack to check what happen, and it seems Citadel's WebHelper stucked on a web request forever (no timeout setting), The quality of my internet is a little bad, but the lack of a timeout is something that should never happen, it stops the game/server from starting forever.

public static BufferedReader getURLContents(@Nonnull String urlString, @Nonnull String backupFileLoc){

"modloading-worker-0" #26 daemon prio=5 os_prio=0 cpu=4573.41ms elapsed=323.40s tid=0x00007f56a7bd3b90 nid=0x50 runnable  [0x00007f560dfb2000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.SocketDispatcher.read0([email protected]/Native Method)
	- parking to wait for  <0x0000000593bf15e0> (a java.util.concurrent.ForkJoinPool)
	at sun.nio.ch.SocketDispatcher.read([email protected]/SocketDispatcher.java:47)
	at sun.nio.ch.NioSocketImpl.tryRead([email protected]/NioSocketImpl.java:266)
	at sun.nio.ch.NioSocketImpl.implRead([email protected]/NioSocketImpl.java:317)
	at sun.nio.ch.NioSocketImpl.read([email protected]/NioSocketImpl.java:355)
	at sun.nio.ch.NioSocketImpl$1.read([email protected]/NioSocketImpl.java:808)
	at java.net.Socket$SocketInputStream.read([email protected]/Socket.java:966)
	at sun.security.ssl.SSLSocketInputRecord.read([email protected]/SSLSocketInputRecord.java:484)
	at sun.security.ssl.SSLSocketInputRecord.readHeader([email protected]/SSLSocketInputRecord.java:478)
	at sun.security.ssl.SSLSocketInputRecord.decode([email protected]/SSLSocketInputRecord.java:160)
	at sun.security.ssl.SSLTransport.decode([email protected]/SSLTransport.java:111)
	at sun.security.ssl.SSLSocketImpl.decode([email protected]/SSLSocketImpl.java:1510)
	at sun.security.ssl.SSLSocketImpl.readHandshakeRecord([email protected]/SSLSocketImpl.java:1425)
	at sun.security.ssl.SSLSocketImpl.startHandshake([email protected]/SSLSocketImpl.java:455)
	at sun.security.ssl.SSLSocketImpl.startHandshake([email protected]/SSLSocketImpl.java:426)
	at sun.net.www.protocol.https.HttpsClient.afterConnect([email protected]/HttpsClient.java:589)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect([email protected]/AbstractDelegateHttpsURLConnection.java:187)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0([email protected]/HttpURLConnection.java:1665)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream([email protected]/HttpURLConnection.java:1589)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream([email protected]/HttpsURLConnectionImpl.java:224)
	at com.github.alexthe666.citadel.web.WebHelper.getURLContents([email protected]/WebHelper.java:19)
	at com.github.alexthe666.citadel.Citadel.setup([email protected]/Citadel.java:142)
	at com.github.alexthe666.citadel.Citadel$$Lambda$22310/0x00007f56128f6d60.accept([email protected]/Unknown Source)
	at net.minecraftforge.eventbus.EventBus.doCastFilter(net.minecraftforge.eventbus/EventBus.java:260)
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(net.minecraftforge.eventbus/EventBus.java:252)
	at net.minecraftforge.eventbus.EventBus$$Lambda$4443/0x00007f5610c3f178.invoke(net.minecraftforge.eventbus/Unknown Source)
	at net.minecraftforge.eventbus.EventBus$$Lambda$4440/0x00007f5610c3ead0.invoke(net.minecraftforge.eventbus/Unknown Source)
	at net.minecraftforge.eventbus.EventBus.post(net.minecraftforge.eventbus/EventBus.java:315)
	at net.minecraftforge.eventbus.EventBus.post(net.minecraftforge.eventbus/EventBus.java:296)
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent([email protected]/FMLModContainer.java:114)
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10([email protected]/ModContainer.java:122)
	at net.minecraftforge.fml.ModContainer$$Lambda$4413/0x00007f5610c44ba8.run([email protected]/Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncRun.run([email protected]/CompletableFuture.java:1804)
	at java.util.concurrent.CompletableFuture$AsyncRun.exec([email protected]/CompletableFuture.java:1796)
	at java.util.concurrent.ForkJoinTask.doExec([email protected]/ForkJoinTask.java:373)
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec([email protected]/ForkJoinPool.java:1182)
	at java.util.concurrent.ForkJoinPool.scan([email protected]/ForkJoinPool.java:1655)
	at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1622)
	at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:165)

commented

Same