judge-server
judge-server copied to clipboard
Add a runtime diagnostic tool for debugging selftest failures
We currently use a very ad-hoc method for debugging runtime failures. A diagnostic tool could address this.
This tool should be able to generate a list of syscalls used by a given runtime, via a new security manager acting somewhat like strace. If an error occurs during selftest, the judge should automatically run the diagnostic tool with the same parameters as the selftest, and save the output to a file. (On Travis, we can dump the contents of this file to standard output at the end of the build job.)
The file should contain, at least:
- A list of syscalls used, as well as which syscalls would have been denied under
chroot. Seeminjail's seccomp filter autogeneration script for inspiration.- Possible format:
syscall_name: (allowed|denied) - The latter part might be difficult, since
cptboxis currently set up to kill on a syscall denial — it can be added later, or the kill logic can be brought up into Python and overridden
- Possible format:
- Resource usage, in a
\time-like format.
Of course, this tool should also be runnable standalone, to speed up the adding of new runtimes.