Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

judge: implement instant aborts #1148

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

judge: implement instant aborts #1148

wants to merge 7 commits into from

Conversation

Xyene
Copy link
Member

@Xyene Xyene commented Dec 25, 2023

The way this works is:

  • Worker creates a tempdir, and sets tempfile.tempdir to this directory.
  • Worker sends back the tempdir. The parent process is responsible for cleaning
    it up when the worker exits.

Abortions are then implemented as sending SIGKILL to the worker.

As a side benefit of this implementation, we also get to drop the hacky
CompiledExecutor cache deletion.

@Xyene Xyene marked this pull request as draft December 25, 2023 23:00
@codecov-commenter
Copy link

codecov-commenter commented Dec 25, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (5eb5f59) 81.26% compared to head (9b8c1a7) 81.23%.

❗ Current head 9b8c1a7 differs from pull request most recent head 781a271. Consider uploading reports for the commit 781a271 to get more accurate results

Files Patch % Lines
dmoj/judge.py 24.24% 25 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1148      +/-   ##
==========================================
- Coverage   81.26%   81.23%   -0.04%     
==========================================
  Files         141      141              
  Lines        5034     5030       -4     
==========================================
- Hits         4091     4086       -5     
- Misses        943      944       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Xyene Xyene changed the title New aborts judge: implement instant aborts Dec 26, 2023
@Xyene Xyene requested a review from quantum5 December 26, 2023 00:00
@Xyene Xyene marked this pull request as ready for review December 26, 2023 00:00
@Xyene Xyene force-pushed the new-aborts branch 2 times, most recently from 041136c to 662a312 Compare December 26, 2023 00:02
Riolku added a commit to Riolku/judge-server that referenced this pull request Dec 27, 2023
This would have caught a failure on DMOJ#1148.
Riolku added a commit to Riolku/judge-server that referenced this pull request Dec 27, 2023
This would have caught a failure on DMOJ#1148.
kiritofeng pushed a commit that referenced this pull request Dec 27, 2023
This would have caught a failure on #1148.
The way this works is:

- Worker creates a tempdir, and sets `tempfile.tempdir` to this directory.
- Worker sends back the tempdir. The parent process is responsible for cleaning
  it up when the worker exits.

Abortions are then implemented as sending `SIGKILL` to the worker.

As a side benefit of this implementation, we also get to drop the hacky
`CompiledExecutor` cache deletion.
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.

2 participants