GiganticMinecraft / SeichiAssist

ギガンティック☆整地鯖の独自要素を司るプラグイン / A Minecraft(Spigot) Plugin used for Gigantic Seichi Server. Address -> play.seichi.click
https://discord.gg/gigantic-minecraft
GNU General Public License v3.0
95 stars 36 forks source link

fs2.Streamのreopenに失敗している #1107

Open kory33 opened 3 years ago

kory33 commented 3 years ago
[18:06:46] [pool-5-thread-97/ERROR]: [SeichiAssist] fs2.Stream が予期せぬエラーで終了しました。再起動します。
java.lang.IllegalStateException: cannot re-open root scope
        at fs2.internal.CompileScope.$anonfun$open$4(CompileScope.scala:158) ~[?:?]
        at flatMap @ fs2.internal.CompileScope.$anonfun$open$2(CompileScope.scala:146) ~[?:?]
        at flatMap @ fs2.internal.CompileScope.open(CompileScope.scala:141) ~[?:?]
        at flatMap @ fs2.internal.CompileScope.$anonfun$open$4(CompileScope.scala:153) ~[?:?]
        at flatMap @ fs2.internal.CompileScope.$anonfun$open$2(CompileScope.scala:146) ~[?:?]
        at flatMap @ fs2.internal.CompileScope.open(CompileScope.scala:141) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.$anonfun$compile$15(Algebra.scala:533) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.$anonfun$compile$14(Algebra.scala:531) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.interruptGuard$1(Algebra.scala:436) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.interruptGuard$1(Algebra.scala:436) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.interruptGuard$1(Algebra.scala:436) ~[?:?]
        at map @ fs2.internal.CompileScope.interruptibleEval(CompileScope.scala:413) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.go$1(Algebra.scala:503) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.$anonfun$compile$7(Algebra.scala:463) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.go$1(Algebra.scala:460) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.$anonfun$compile$7(Algebra.scala:463) ~[?:?]
        at flatMap @ fs2.internal.FreeC$.go$1(Algebra.scala:460) ~[?:?]
kory33 commented 3 years ago

恐らく #1103 によるデグレ

kory33 commented 3 years ago

930b7cd で多分直った

kory33 commented 3 years ago

直ってなさそう

java.lang.IllegalStateException: cannot re-open root scope
        at fs2.internal.CompileScope.$anonfun$open$4(CompileScope.scala:158) ~[SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:187) ~[SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:463) ~[SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:484) ~[SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:422) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Callback$AsyncIdempotentCallback.run(Callback.scala:131) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Trampoline.cats$effect$internals$Trampoline$$immediateLoop(Trampoline.scala:67) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Trampoline.startLoop(Trampoline.scala:35) ~[SeichiAssist.jar:10]
        at cats.effect.internals.TrampolineEC$JVMTrampoline.super$startLoop(TrampolineEC.scala:90) ~[SeichiAssist.jar:10]
        at cats.effect.internals.TrampolineEC$JVMTrampoline.$anonfun$startLoop$1(TrampolineEC.scala:90) ~[SeichiAssist.jar:10]
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) ~[SeichiAssist.jar:10]
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94) ~[SeichiAssist.jar:10]
        at cats.effect.internals.TrampolineEC$JVMTrampoline.startLoop(TrampolineEC.scala:90) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Trampoline.execute(Trampoline.scala:43) ~[SeichiAssist.jar:10]
        at cats.effect.internals.TrampolineEC.execute(TrampolineEC.scala:42) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:137) ~[SeichiAssist.jar:10]
        at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:126) ~[SeichiAssist.jar:10]
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$unsafeRegister$1(Deferred.scala:202) ~[SeichiAssist.jar:10]
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$unsafeRegister$1$adapted(Deferred.scala:202) ~[SeichiAssist.jar:10]
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$notifyReadersLoop$1(Deferred.scala:242) ~[SeichiAssist.jar:10]
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) [SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:104) [SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:463) [SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:484) [SeichiAssist.jar:10]
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:422) [SeichiAssist.jar:10]
        at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36) [SeichiAssist.jar:10]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
kory33 commented 3 years ago

どうやらプレーヤー退出時に compile.drain が走る Fiber.cancel した瞬間に起きていることが多そう .cancel してroot scopeが閉じられたにもかかわらず Stream のrun-loopが続行されて例外が吐かれている可能性がある

kory33 commented 3 years ago

実害はあまりなさそうなので、fs2 3.x系で同様の問題が起こるかどうか調べるまで着手しないで良さそう