TaskResources release loop aborts on the first failing release, leaking the rest

Aperta
#13,106 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
scala

Direzione di ricerca

Start at TaskResourceRegistry.releaseAll and trace the completion listener that calls RESOURCE_REGISTRIES.remove(context). Inspect how priorityToResourcesMapping, resources, ColumnarBatch release(), jniWrapper.stop, and Runtime cleanup behave when release() throws. Done means every resource is attempted, registry state is cleared, and cleanup continues after an exception without leaking lower-priority resources.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

TaskResourceRegistry.releaseAll releases task resources highest-priority first (100 → 50 → 30), in reverse registration order. If one resource's release() throws, the foreach aborts: every remaining lower-priority resource is skipped, and priorityToResourcesMapping / resources are never cleared. The completion listener also then skips RESOURCE_REGISTRIES.remove(context).

A throwing release() is reachable on task failure/teardown. Priority-100 recyclers close native ColumnarBatch payloads and priority-50 shuffle readers call jniWrapper.stop, both of which surface JNI errors as exceptions. When one of those throws, the priority-30 Runtime (which owns the native memory manager and native threads) never releases, so its off-heap memory leaks. Across repeatedly-failing tasks on a long-lived executor this compounds into an OOM or container kill.

Lingua principale
Scala
Stelle
1.6k
Fork
685
Merge medio
4g 16h
PR unite (30g)
84

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/gluten

Tutte le issue di apache/gluten

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.