Bug
submission_status_cleanup() in src/apps/competitions/tasks.py only filters submissions with status=Running:
submissions = Submission.objects.filter(status=Submission.RUNNING, has_children=False)
Submissions stuck in Submitted, Preparing, or Scoring are never recovered by the periodic cleanup job. They hang indefinitely and permanently consume the participant's quota.
How it happens
A submission can get stuck in a non-Running state when:
The existing cleanup only covers Running with a 24h + execution_time_limit threshold. All other non-terminal states are ignored.
Impact (observed in EEG Foundation Challenge, NeurIPS 2025)
- 8,328 total submissions, 51% never scored
- 3 submissions were still stuck in
Preparing at the time of data export (months later)
- Stuck submissions consume quota (
models.py:342 excludes only Failed, not Cancelled/Scoring/etc.), so participants lose attempts permanently
- The existing
started_when check also crashes with a NoneType comparison for submissions that never reached Running (no started_when value)
Fix
Extend the filter to all non-terminal states (Submitted, Preparing, Running, Scoring) and use created_when as fallback when started_when is null.
Related
Bug
submission_status_cleanup()insrc/apps/competitions/tasks.pyonly filters submissions withstatus=Running:Submissions stuck in
Submitted,Preparing, orScoringare never recovered by the periodic cleanup job. They hang indefinitely and permanently consume the participant's quota.How it happens
A submission can get stuck in a non-
Runningstate when:Scoringbut the Celery task is never publishedThe existing cleanup only covers
Runningwith a 24h +execution_time_limitthreshold. All other non-terminal states are ignored.Impact (observed in EEG Foundation Challenge, NeurIPS 2025)
Preparingat the time of data export (months later)models.py:342excludes onlyFailed, notCancelled/Scoring/etc.), so participants lose attempts permanentlystarted_whencheck also crashes with aNoneTypecomparison for submissions that never reachedRunning(nostarted_whenvalue)Fix
Extend the filter to all non-terminal states (
Submitted,Preparing,Running,Scoring) and usecreated_whenas fallback whenstarted_whenis null.Related