benchexec icon indicating copy to clipboard operation
benchexec copied to clipboard

Use PID cgroup controller to limit number of tasks

Open PhilippWendler opened this issue 8 years ago • 2 comments

In order to prevent (accidental) fork bombs and exhaustion of the number of available PIDs, BenchExec should use the pid cgroup controller (if available) and set a limit of concurrent tasks (threads and processes) per run. In theory, we could make the limit configurable, but as this is mostly to prevent crashing the system, I think it enough to just hard-code it to a high value like 10000.

PhilippWendler avatar Mar 21 '17 08:03 PhilippWendler

Such a problem has happened in SV-COMP'19, so we should implement this.

The problem was that there was a limit of about 10000 PIDs for a user, and a run triggered this, leaving BenchExec and other runs no chance to create further threads/processes. So in order for us to always be able to fork, we need to limit the runs.

PhilippWendler avatar Oct 22 '18 04:10 PhilippWendler

As workaround, one can use --set-cgroup-value pids.max=5000.

PhilippWendler avatar Oct 22 '18 09:10 PhilippWendler