How to fix Worker failed when submit a solution
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 412
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 3
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cms/service/Worker.py and the traceback path through cms/grading/tasktypes/Batch.py, cms/grading/steps/compilation.py, utils.py, and stats.py. Reproduce the submission failure on CMS 1.5 with the reported environment, then determine why compilation_stdout_0.txt is missing; done means a submitted solution no longer remains stuck at “Compiling...” or raises this Worker error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100