forked from lei.chen/myxce
fix: skip GC in sched_end_session when live_jobs allocation fails (OOM safety)
This commit is contained in:
parent
5267d36a84
commit
fb5127ad66
1 changed files with 6 additions and 0 deletions
|
|
@ -822,6 +822,12 @@ void sched_end_session(xce_scheduler_t* sched)
|
|||
}
|
||||
}
|
||||
|
||||
if (live_jobs == NULL) {
|
||||
/* OOM: cannot safely GC — skip to avoid sweeping nodes still in use */
|
||||
atomic_store_explicit(&sched->staging_merge_complete, 1, memory_order_release);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Mark phase */
|
||||
gc_clear_marks();
|
||||
for (int i = 0; i < njobs; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue