cms icon indicating copy to clipboard operation
cms copied to clipboard

How to fix Worker failed when submit a solution

Open vuhatuananh opened this issue 7 years ago • 3 comments

When I submitted a solution, status show "Compiling..." very long time. and cmsLogService show that: (My system is CMS 1.5 on Ubuntu 18.10)

2018-11-11 20:04:31,211 - ERROR [Worker,0] Worker failed: [Errno 2] No such file or directory: '/tmp/cms-compile-erf3_j6t/home/compilation_stdout_0.txt'. Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/service/Worker.py", line 119, in execute_job_group task_type.execute_job(job, self.file_cacher) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/tasktypes/abc.py", line 226, in execute_job self.compile(job, file_cacher) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/tasktypes/Batch.py", line 231, in compile compilation_step(sandbox, commands) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/steps/compilation.py", line 106, in compilation_step stats = generic_step(sandbox, commands, "compilation", collect_output=True) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/steps/utils.py", line 91, in generic_step collect_output=collect_output) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/steps/utils.py", line 64, in generic_execution return execution_stats(sandbox, collect_output=collect_output) File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/steps/stats.py", line 54, in execution_stats stats["stdout"] = sandbox.get_file_to_string(sandbox.stdout_file)
File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/Sandbox.py", line 429, in get_file_to_string with self.get_file(path) as file
: File "/usr/local/lib/python3.6/dist-packages/cms-1.5.dev0-py3.6.egg/cms/grading/Sandbox.py", line 394, in get_file file_ = open(real_path, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cms-compile-erf3_j6t/home/compilation_stdout_0.txt'

Thanks!

vuhatuananh avatar Nov 12 '18 04:11 vuhatuananh

Can you list the content of /tmp/cms-compile-erf3_j6t/home/ and paste in particular the content of commands.log and run.log.* (these might be in the directory above).

stefano-maggiolo avatar Nov 12 '18 23:11 stefano-maggiolo

ls /tmp/cms-compile-erf3_j6t/home/ just have a file "SUM.cpp" that I submitted.

commands.log isolate --box-id=11 --cg --cg-timing --chdir=/tmp --dir=/tmp=/tmp/cms-compile-erf3_j6t/home:rw --dir=/etc/alternatives=/etc/alternatives --dir=/etc=/etc --dir=/var/lib/ghc=/var/lib/ghc --full-env --env=HOME=/tmp --cg-mem=524288 --stdout=/tmp/compilation_stdout_0.txt --processes=1000 --stderr=/tmp/compilation_stderr_0.txt --time=10 --wall-time=21 --meta=/tmp/cms-compile-erf3_j6t/run.log.0 --run -- /usr/bin/g++ -DEVAL -std=gnu++11 -O2 -pipe -static -s -o SUM SUM.cpp

run.log.0 time:0.000 time-wall:0.630 max-rss:708 csw-voluntary:7 csw-forced:2 exitsig:11 status:SG message:Caught fatal signal 11

vuhatuananh avatar Nov 13 '18 03:11 vuhatuananh

That's interesting, looks like the compilation crashed before being able to create any output (we always assume it does, that's why don't handle it well). Anything in compiler_stderr? Can you try running that command directly from the command line and see if it prints anything? (You might need to launch isolate --cg --init -- box-id=11 first.)

stefano-maggiolo avatar Nov 13 '18 08:11 stefano-maggiolo