DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
32 stars 40 forks source link

Dockerized judgehost can't judge #11

Closed SolalPirelli closed 6 years ago

SolalPirelli commented 6 years ago

After submitting something, verdict is "compiler-error" and output is:

Compiling failed with exitcode 255, compiler output:
/opt/domjudge/judgehost/bin/runguard: creating cgroup: Failed to remove a non-empty group(50029)
Try `/opt/domjudge/judgehost/bin/runguard --help' for more information.
Error: failed to set /sys/fs/cgroup/cpuset/domjudge/dj_cgroup_1454_1521230721/cpuset.mems: Permission denied
Error: failed to set /sys/fs/cgroup/cpuset/domjudge/dj_cgroup_1454_1521230721/cpuset.cpus: Permission denied
SolalPirelli commented 6 years ago

@nickygerritsen if you happen to have already seen this, I'd love some insight... otherwise, it can wait, I'll create judgehosts by hand.

nickygerritsen commented 6 years ago

Are you using Linux? You should enable cgroups on Linux (see the readme). For other OSes it shouldn’t happen and I haven’t seen it happening yet

SolalPirelli commented 6 years ago

Linux indeed; my /proc/cmdline contains cgroup_enable=memory swapaccount=1 and the machine rebooted after updating GRUB, I think that's all?

SolalPirelli commented 6 years ago

Found it - need to actually run /opt/domjudge/judgehost/bin/create_cgroups in the container. Not sure why it wasn't run.

SolalPirelli commented 6 years ago

(I'll gladly help fixing this - later, have a contest soon :D)

nickygerritsen commented 6 years ago

Good luck with the contest. It should run it automatically but we can figure out why it doesn’t. Thanks for the help!

Could you let us know how the Docker images performed and worked after the contest? I think you are the first to run a contest with it so we are really looking for feedback!

greg commented 6 years ago

I had the exact same issue with judging. Running the create_cgroups command as above fixes it, but if the judgehost container is stopped for whatever reason, it can't be started again:

# docker start judgehost-0 -a
[..] Setting timezone

Current default time zone: 'Europe/Amsterdam'
Local time is now:      Thu Mar 22 03:05:22 CET 2018.
Universal Time is now:  Thu Mar 22 02:05:22 UTC 2018.

[ok] Container timezone set to: Europe/Amsterdam

[..] Setting up restapi file
[ok] Restapi file set up

useradd: user 'domjudge-run-0' already exists

Deleting the container and setting it up again (including running create_cgroups) works, and it's not too much effort since it's only two commands, but still probably not the expected behaviour...

I'll update on how this all performed in my contest in a day or so.

nickygerritsen commented 6 years ago

I have just pushed a version to Docker Hub that should fix the user creation bug when restarting the container. This version also contains a possible fix for the create_cgroups (see 8696d16). Could you verify it works?

latest and 5.3.2 both are updated with these changes.

greg commented 6 years ago

I can confirm that the create_cgroups issue is now fixed, but the user creation error still occurs with the same message. (I've reinstalled both domserver and judgehost on the machine)

nickygerritsen commented 6 years ago

Ah, typo in my check. I just updated the images again and they should be OK now. Could you please check?

greg commented 6 years ago

That fixed it, thanks!

nickygerritsen commented 6 years ago

Great, thanks for testing!