cms-dev / cms-dev/cms

Add ability to limit stack size for custom checker.

Open
#679 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tasktypes
Dominant language
Python
Stars
1k
Forks
412
Avg merge
6d 10h
Merged PRs (30d)
3

Description

Recently, I created a problem with a custom checker, in which I made a bug that causes an infinite recursive loop. Then the checker took forever to finish, caused my computer to freeze, then when I restart the computer (literally unplugged the power) and start cms again, the worker service re-ran the checker and my computer froze again... After that, I had to remove that problem from cms and everything became fine again.
So what I'm asking here is how to limit the stack size using for custom checker (so it'll throw a segment fault if the stack size used is exceeded, like how it happens with users submissions), or if it hasn't been implemented yet, I hope you would do it. Or maybe it's just a problem on my side, if so, I'm using Ubuntu 14.04.5 64bit, what would have caused the problem ?
Thank you.
P.s: sorry for my english.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the custom checker execution path and comparing it with the existing resource limits for user submissions. Check how stack limits are applied on Ubuntu and how checker failures are reported. Done means an infinite-recursion checker is bounded rather than freezing the worker, with behavior verified by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.