You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/09/23 03:27:46 UTC

[I] TaskResources release loop aborts on the first failing release, leaking the rest [gluten]

LuciferYang opened a new issue, #13106:
URL: https://github.com/apache/gluten/issues/13106

   `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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org