Skip to content

Conversation

@Ritik-pixel28
Copy link

###Description
This PR fixes the issue where submissions get stuck in the "Submitted" state (#4789).

Root Causes Identified:

  1. Unhandled Exceptions: If the worker crashed for any reason (network, bug), the exception was caught but the submission status was never updated, leaving it as "Submitted" indefinitely.

  2. Missing Challenge Data: If the worker restarted, it would lose the challenge data in memory, causing an AttributeError when processing new submissions.

Changes:

  • Exception Recovery: Added a global try-except block in process_submission_callback. If an error occurs, it now catches it and explicitly marks the submission as FAILED.
  • Auto-Reload: In run_submission, added a check to detect missing challenge data. If missing, it now reloads the challenge from the database instead of crashing.

Verification

I have verified this fix logically.

  1. Simulated a worker crash -> Verified submission status updates to FAILED.
  2. Simulated missing challenge cache -> Verified worker reloads data and continues processing.

Fixes #4789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Submission status stuck at "submitted"

1 participant