Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt a workaround for glibc deadlock described in #656
When using BenchExec with concurrent execution of runs, we sometimes experience a deadlock in our child process that is forked from the main process. This is due to missing proper handling of clone() in glibc. With this workaround, we check if the child process takes unusually long to create the container (timeout is set to 60s) and if this happens, we assume the deadlock has occurred. Because almost everything related to the container creation happens inside the child process, we can just kill the child process and attempt to start the run (with a new child process) again. This is safe because up to a certain point where we are sure that the child process cannot have started the benchmarked tool already. This is not guaranteed to catch all instances of the deadlock, only those that happen soon enough after clone() in the child. But in my tests this is the case.
- Loading branch information