benchexec: Container mode fails with "Operation not permitted" on recent Ubuntu
Hi,
I installed benchexec by following the instructions from INSTALL.md
:
$ sudo add-apt-repository ppa:sosy-lab/benchmarking
$ sudo apt install benchexec
- OS: Ubuntu 18.04.3 LTS
- Python: Python 3.6.9
- User Groups:
... adm sudo dip plugdev lpadmin sambashare benchexec docker
- Benchexec Version: 3.3
python3 -m benchexec.check_cgroups
runs succesfully and produces no warnings.- Installed relevant packages:
libseccomp2 libseccomp-dev
However, when running benchexec the following happens (regardless of the tool):
$ benchexec ../../../bench-defs/benchmark-defs/prtest.small.xml
2020-10-14 18:01:04 - WARNING - Could not load libseccomp2, please install it for improved container isolation (libseccomp.so.2: cannot open shared object file: Operation not permitted).
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
File "/usr/lib/python3/dist-packages/benchexec/containerized_tool.py", line 118, in _init_container_and_load_tool
File "/usr/lib/python3/dist-packages/benchexec/containerized_tool.py", line 210, in _load_tool
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 780, in get_code
File "<frozen importlib._bootstrap_external>", line 832, in get_data
PermissionError: [Errno 1] Operation not permitted: '/usr/lib/python3/dist-packages/benchexec/tools/prtest.py'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/benchexec", line 11, in <module>
load_entry_point('BenchExec==3.3', 'console_scripts', 'benchexec')()
File "/usr/lib/python3/dist-packages/benchexec/benchexec.py", line 478, in main
sys.exit(benchexec.start(argv or sys.argv))
File "/usr/lib/python3/dist-packages/benchexec/benchexec.py", line 73, in start
rc = self.execute_benchmark(arg)
File "/usr/lib/python3/dist-packages/benchexec/benchexec.py", line 338, in execute_benchmark
self.config.start_time or util.read_local_time(),
File "/usr/lib/python3/dist-packages/benchexec/model.py", line 299, in __init__
(self.tool_module, self.tool) = load_tool_info(tool_name, config)
File "/usr/lib/python3/dist-packages/benchexec/model.py", line 161, in load_tool_info
tool = containerized_tool.ContainerizedTool(tool_module, config)
File "/usr/lib/python3/dist-packages/benchexec/containerized_tool.py", line 61, in __init__
raise e
File "/usr/lib/python3/dist-packages/benchexec/containerized_tool.py", line 57, in __init__
container_options,
File "/usr/lib/python3.6/multiprocessing/pool.py", line 259, in apply
return self.apply_async(func, args, kwds).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
PermissionError: [Errno 1] Operation not permitted: '/usr/lib/python3/dist-packages/benchexec/tools/prtest.py'
<!-- prtest.small.xml -->
<?xml version="1.0"?>
<!DOCTYPE benchmark PUBLIC "+//IDN sosy-lab.org//DTD BenchExec benchmark 1.18//EN" "https://www.sosy-lab.org/benchexec/benchmark-1.18.dtd">
<benchmark tool="prtest" displayName="PRtest" timelimit="15 s" memlimit="15 GB" cpuCores="8">
<require cpuModel="Intel Xeon E3-1230 v5 @ 3.40 GHz" cpuCores="8"/>
<resultfiles>**/test-suite/*</resultfiles>
<rundefinition name="test-comp20_prop-coverage-branches">
<propertyfile>../sv-benchmarks/c/properties/coverage-branches.prp</propertyfile>
</rundefinition>
<tasks name="SoftwareSystems-BusyBox-MemSafety">
<includesfile>../sv-benchmarks/c/SoftwareSystems-BusyBox-MemSafety.set</includesfile>
<option name="-m64"/>
</tasks>
</benchmark>
The same issue also happens when using benchexec with other tools, i.e. coveriteam.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (17 by maintainers)
I now reported a bug for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1900141
Until we hear more from them, the recommended workaround is to avoid usage of overlay mode as far possible as described in https://github.com/sosy-lab/benchexec/issues/621#issuecomment-709982835.