Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with http4s nio1 #544

Closed
yanns opened this issue May 26, 2021 · 3 comments
Closed

issue with http4s nio1 #544

yanns opened this issue May 26, 2021 · 3 comments

Comments

@yanns
Copy link
Collaborator

yanns commented May 26, 2021

Opening an issue here for tracking purpose.

Since https://github.com/agourlay/cornichon/releases/tag/v0.19.7, we are having the following error:

[blaze-selector-1] ERROR org.http4s.blaze.util.Execution - Error encountered in Direct EC
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
[blaze-selector-1] ERROR org.http4s.server.blaze.Http1ServerStage$$anon$1 - Fatal Error: Error in requestLoop()
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
[blaze-selector-1] ERROR org.http4s.blaze.channel.nio1.NIO1HeadStage - Abnormal NIO1HeadStage termination
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
[blaze-selector-0] ERROR org.http4s.blaze.util.Execution - Error encountered in Direct EC
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
[blaze-selector-0] ERROR org.http4s.server.blaze.Http1ServerStage$$anon$1 - Fatal Error: Error in requestLoop()
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
[blaze-selector-0] ERROR org.http4s.blaze.channel.nio1.NIO1HeadStage - Abnormal NIO1HeadStage termination
java.lang.RuntimeException: TickWheelExecutor is shutdown
  at scala.sys.package$.error(package.scala:27)
  at org.http4s.blaze.util.TickWheelExecutor.schedule(TickWheelExecutor.scala:130)
  at org.http4s.blazecore.IdleTimeoutStage.org$http4s$blazecore$IdleTimeoutStage$$resetTimeout(IdleTimeoutStage.scala:81)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at org.http4s.blazecore.IdleTimeoutStage$$anonfun$readRequest$1.applyOrElse(IdleTimeoutStage.scala:52)
  at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:500)
  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
  at org.http4s.blaze.util.Execution$$anon$3.execute(Execution.scala:80)
  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
  at scala.concurrent.Promise.tryFailure(Promise.scala:117)
  at scala.concurrent.Promise.tryFailure$(Promise.scala:117)
  at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:104)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.org$http4s$blaze$channel$nio1$NIO1HeadStage$$doClose$1(NIO1HeadStage.scala:314)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage$$anon$3.run(NIO1HeadStage.scala:344)
  at org.http4s.blaze.channel.nio1.SelectorLoop.executeTask(SelectorLoop.scala:85)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.doClosePipeline(NIO1HeadStage.scala:332)
  at org.http4s.blaze.channel.nio1.NIO1HeadStage.close(NIO1HeadStage.scala:301)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1(SelectorLoop.scala:228)
  at org.http4s.blaze.channel.nio1.SelectorLoop.$anonfun$killSelector$1$adapted(SelectorLoop.scala:224)
  at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
  at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
  at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
  at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:224)
  at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:182)
  at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:59)
  at java.base/java.lang.Thread.run(Unknown Source)
@agourlay
Copy link
Owner

Thanks for the report 👍
Looks like there is already a PR up for this on http4s http4s/http4s#4880

@agourlay
Copy link
Owner

Fix available in https://github.com/http4s/http4s/releases/tag/v0.21.24
I will cut a release in a few days.

@agourlay
Copy link
Owner

Fixed in 0.19.8 which has been updated to http4s 0.21.25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants