Commit Graph

8 Commits

Author SHA1 Message Date
27d2132bfa [sandbox] Update deps 2023-12-19 16:59:34 -05:00
David Poeschl
17515af25c
Include detailed run result info in DB & show in admin site (#10)
* Send detailed submission run result info to site/database

* Show SubmissionStateReason on site

* Mark Build/TLE errors as graded immediately

* Remove superfluous log
2023-12-19 16:40:31 -05:00
David Poeschl
79fd96e1d3
Sandbox: Ensure runs are serialized, add detailed logging (#9)
Specific fixes to ensure runs are serialized:

- Added missing await when starting clone/run
- The runJava method now has a single exit path that can only execute when the process has guaranteed been 'close'd. The timeout detection previously sent SIGKILL and assumed it worked, but it was not working on my machine and the student code would continue to run indefinitely after returning.
- To get the SIGKILL to kill the submitted app's process, I added end/destroy calls to the process stdin/stdout/stderr streams.

Added lots of logging while diagnosing these issues, and it seems useful to keep. As part of this, the contest/team names are now included in the 'submissions' web api.

Also, I've structured the result data in more detail within the Sandbox, tracking whether a run succeeded or the way in which it failed. I'm collapsing these back down to just a string "output" with the preexisting failure markers (e.g. "[Timeout after 30 seconds]"), but would like to pass this over to the site/DB in a structured form eventually.
2023-12-17 11:30:16 -05:00
97b8f6028a [sandbox] Terminate after 30 seconds 2023-05-09 17:19:19 -04:00
149037cf7d [sandbox] Catch run errors and fetch more often 2023-05-09 16:51:43 -04:00
5280a25d4d [sandbox] Catch failed fetch 2023-05-08 21:21:14 -04:00
51ff743d98 [web] Handle auto grading submissions 2023-05-08 13:58:47 -04:00
008d93704d [sandbox] Initial sandbox 2023-05-07 19:00:55 -04:00