[contestms] Re: cms sandbox problem

  • From: Giovanni Mascellani <mascellani@xxxxxxxxxxxxxxxxxxxx>
  • To: contestms@xxxxxxxxxxxxx
  • Date: Wed, 20 Nov 2013 19:30:13 +0100

Hi Mehrdad.

Il 20/11/2013 15:58, Mehrdad Miri ha scritto:
> Hi,
> After installing and running services of cms the cmsWorker service
> failed to compile codes.
> Here is the compile command :
> ./mo-box -a 2 -c /tmp/tmpZAPh_j -e -E TMPDIR=/tmp/tmpZAPh_j -f -F -m
> 262144 -o /tmp/tmpZAPh_j/compiler_stdout.txt -p /etc/ -p /lib/ -p /usr/
> -p /tmp/tmpZAPh_j/ -p /proc/self/exe -r
> /tmp/tmpZAPh_j/compiler_stderr.txt -s waitpid -s prlimit64 -t 10 -w 20
> -M /tmp/tmpZAPh_j/run.log.0 -- /usr/bin/g++ -DEVAL -static -O2 -o batch
> batch.cpp
> 
> and here is the error :
> Unknown syscall `waitpid'
> 
> So far I couldn't find a working solution so I contacted this email.

You're probably using a 64 bits system. Version 1.0 of CMS is supported
only for 32 bits environments, unfortunately, due to some limitations of
the sandbox program used. See for some more reference:

http://cms.readthedocs.org/en/v1.0/Running%20CMS.html#recommended-setup

If you can, our recommendation is to reinstall the system you're using
for your contest and put Ubuntu 12.04 LTS with 32 bits, which is the
best tested environment.

If not, you can use the tricks explained in the link above to setup a 32
bits chroot and run Workers there.

If you just want to test the system, it should be enough to replace:

    sandbox.allow_syscall = ["waitpid", "prlimit64"]

with:

    sandbox.allow_syscall = ["prlimit64"]

in cms/grading/__init__.py. This is highly discouraged for real contests.

Hope this helps. Feel free to ask again if you don't manage to fix!

Giovanni.
-- 
Giovanni Mascellani <mascellani@xxxxxxxxxxxxxxxxxxxx>
Pisa, Italy

Web: http://poisson.phc.unipi.it/~mascellani
Jabber: g.mascellani@xxxxxxxxxx / giovanni@xxxxxxxxxxxxxxxxxxxx

Attachment: signature.asc
Description: OpenPGP digital signature

Other related posts: