Exceptions when benchmarking: ERROR NIO1SocketServerGroup
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- backend, networking
Direzione di ricerca
Inizia con la configurazione del benchmark nelle cartelle pure e jmeter del servizio collegato, quindi esamina SelectorLoop.scala e NIO1SocketServerGroup.scala nelle posizioni dello stack trace. Riproduci i malfunzionamenti, se possibile, e traccia l’arresto del selector e la gestione dei canali client. Il lavoro è concluso quando il benchmark non lascia più il servizio in uno stato che produce errori o non risponde dopo queste eccezioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
during benchmarking a http4s service implementation I ran into some issues. Occasionally the service errored producing the following kinds of exceptions in the logs.
First kind
After this exception the service continued to reply but errors kept on ramping up.
ERROR NIO1SocketServerGroup - Error handling client channel. Closing.
java.util.concurrent.RejectedExecutionException: This SelectorLoop is closed.
at org.http4s.blaze.channel.nio1.SelectorLoop.enqueueTask(SelectorLoop.scala:118)
at org.http4s.blaze.channel.nio1.SelectorLoop.initChannel(SelectorLoop.scala:139)
at org.http4s.blaze.channel.nio1.NIO1SocketServerGroup.org$http4s$blaze$channel$nio1$NIO1SocketServerGroup$$handleClientChannel(NIO1SocketServerGroup.scala:290)
at org.http4s.blaze.channel.nio1.NIO1SocketServerGroup$SocketAcceptor.acceptNewConnections(NIO1SocketServerGroup.scala:148)
at org.http4s.blaze.channel.nio1.NIO1SocketServerGroup$SocketAcceptor.opsReady(NIO1SocketServerGroup.scala:119)
at org.http4s.blaze.channel.nio1.SelectorLoop.processKeys(SelectorLoop.scala:200)
at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:171)
at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:68)
at java.base/java.lang.Thread.run(Thread.java:834)
Second kind
After this exception the service stopped responding.
ERROR SelectorLoop - Unhandled exception in selector loop
java.io.IOException: Connection reset by peer
at java.base/sun.nio.ch.FileDispatcherImpl.close0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.close(SocketDispatcher.java:55)
at java.base/sun.nio.ch.SocketChannelImpl.kill(SocketChannelImpl.java:907)
at java.base/sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:267)
at java.base/sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:116)
at java.base/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
at java.base/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(
SelectorLoop.scala:163)
at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:68)
at java.base/java.lang.Thread.run(Thread.java:834)
ERROR NIO1SocketServerGroup - Listening socket(/0.0.0.0:53248) closed forcibly.
java.nio.channels.ShutdownChannelGroupException: null
at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(
SelectorLoop.scala:186)
at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:68)
at java.base/java.lang.Thread.run(Thread.java:834)
ERROR NIO1HeadStage - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(
SelectorLoop.scala:186)
at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:68)
at java.base/java.lang.Thread.run(Thread.java:834)
As mentioned these are hard to reproduce. In general I could observe that once a service started erroring then leaving the JVM running it would continue to produce errors.
System environment
The code for the service can be found in the following repository: https://github.com/jan0sch/pfhais
It is located within the pure folder. The configuration files for the jmeter benchmarks can be found in the jmeter folder.
Service workstation
- CPU : Core i5-9600K, 6 Cores, 3,7 GHz
- RAM : 32 GB
- HDD : 2x Samsung SSD 860 PRO 512GB, SATA
- OS : FreeBSD 12 (HT disabled)
- JDK : 11.0.4+11-2
- DB : PostgreSQL 11.3
Client workstation
- CPU : AMD Ryzen Threadripper 2950X
- RAM : 32 GB
- HDD : 2x Samsung SSD 970 PRO 512GB, M.2
- OS : FreeBSD 12 (HT disabled)
- JDK : 11.0.4+11-2
Apache JMeter 5.1.1 was used to run the benchmark.
- Lingua principale
- Scala
- Stelle
- 371
- Fork
- 63
- Merge medio
- 2g 5h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di http4s/blaze
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
support
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di http4s/blaze
Issue simili
-
Bound wrong-magic P2P diagnostics to parsed header bytesForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ergoplatform/ergo#2736 ·
I maintainer di solito rispondono entro 1 giorno
-
area:shuffle enhancement good first issue performance requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7072 ·
I maintainer di solito rispondono entro 1 giorno
-
bug 🐞 CI/CD ⚒️
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
valkey-io/valkey-glide#7370 ·
I maintainer di solito rispondono entro 1 giorno
-
Improve UI text on confirmation page (at registration)Forse già presa @Arghyann l’ha presa oggi. Apertagood first issue improvement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
lichess-org/lila#22126 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[VL] Remove the unused ShuffleSchema.hForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni