Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disarm timer in runguard after child has exited. (#2157)
If we would not disarm the timer, there is a possibility that the timer sends us a SIGALRM while we are still busy with cleaning the sandbox up. What you observe in these cases is a judging with wall time well below the time limit is judged as TLE, e.g. ``` Timelimit exceeded. runtime: 0.288s cpu, 0.302s wall memory used: 26066944 bytes ********** runguard stderr follows ********** /opt/domjudge/bin/runguard: warning: timelimit exceeded (hard wall time): aborting command ``` In practice, we saw the behavior happening when running many judgedaemons and domserver on a single machine while rejudging the whole contest (i.e. under quite high load). In that case, the call `cgroup_delete_cgroup_ext` did sometimes hang for multiple seconds. For easy reproducibility, you can also add an artificial delay in the clean up code, e.g. by adding something like: ``` const struct timespec artificial_delay = { 10, 0 }; nanosleep(&artificial_delay, NULL); ```
- Loading branch information