[Bug] Engine does not exit when graceful stop waits on sessions of a stopped session manager
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- scala, spark
- Ambito
- backend, distributed-systems
Direzione di ricerca
Start with ServiceDiscovery.stopGracefully and trace how SessionManager.stop() affects the active session count and idle-session timeout checker. Reproduce the shutdown path with a stopped engine backend and sessions left by disconnected clients; done means graceful stop can finish and the JVM can exit when those sessions cannot be closed. Pull request #7777 is already open for this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Code of Conduct
- I agree to follow this project's Code of Conduct
Search before asking
- I have searched in the issues and found no similar issues.
Describe the bug
ServiceDiscovery.stopGracefully loops while sessionManager.getActiveUserSessionCount > 0. If the engine backend has already stopped (e.g. SparkSQLEngine stopped after its SparkContext ended), SessionManager.stop() has shut down the idle-session timeout checker. Sessions left by disconnected clients (common with kyuubi.session.close.on.disconnect=false) are then never closed, the count never drops, and the loop never ends.
With etcd, stopGracefully runs on the non-daemon deregister-watcher-thread, so the JVM cannot exit after main returns. On Kubernetes the driver pod stays Running with no SparkContext and no executors until it is deleted by hand.
Observed: an engine lost its etcd lease during a long GC pause. Its SparkContext and backend later stopped, and the driver then logged N connection(s) are active, delay shutdown every 10 seconds for hours. KYUUBI #6790 made the loop re-read the count each iteration, but that does not help when nothing can close the sessions.
Affects Version(s)
1.12.0
Kyuubi Server Log Output
Kyuubi Engine Log Output
Kyuubi Engine Log Output
INFO KyuubiServiceDiscovery: 15 connection(s) are active, delay shutdown
INFO KyuubiServiceDiscovery: 15 connection(s) are active, delay shutdown
... (repeats every 10s indefinitely)
Kyuubi Server Configurations
Kyuubi Engine Configurations
Kyuubi Engine Configurations
kyuubi.ha.client.class=org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClient
kyuubi.session.close.on.disconnect=false
Additional context
No response
Are you willing to submit PR?
- Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- No. I cannot submit a PR at this time.
- Lingua principale
- Scala
- Stelle
- 2.4k
- Fork
- 1k
- Merge medio
- 18h 17m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 apache/kyuubi
-
kind:bug priority:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)Forse già presa @rusackas l’ha presa 23 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
apache/kyuubi#7786 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
isClassLoadable answers false on threads without a context classloaderForse già presa @LuciferYang l’ha presa 58 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
kind:feature priority:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/kyuubi#7454 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug][TEST] JSON event logging suites fail when CI crosses midnightForse già presa @aajisaka l’ha presa oggi. Apertakind:bug priority:major
apache/kyuubi#7853 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/kyuubi
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
apache/datafusion-comet#7559 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
propensive/soundness#2438 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ergoplatform/ergo#2918 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lichess-org/lila#22440 ·
I maintainer di solito rispondono entro 1 giorno