`build_fuzzers --engine centipede` isn't compatible with podman
- Dominant language
- Shell
- Stars
- 12.6k
- Forks
- 2.9k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 62
Description
When `podman` is used instead of `docker` `helper.py build_fuzzers --sanitizer centipede` fails with
```sh
f18dd9d48b554f299fea9ac212b0e53970ad68e8858a4eec5d01a52321b8ae08
INFO:root:Keeping existing build artifacts as-is (if any).
INFO:root:Running: docker run --rm --privileged --shm-size=2g --platform linux/amd64 -i -e FUZZING_ENGINE=centipede -e SANITIZER=address -e ARCHITECTURE=x86_64 -e PROJECT_NAME=systemd -e HELPER=True -e FUZZING_LANGUAGE=c -v /home/vagrant/oss-fuzz-2/build/out/systemd/__centipede_address:/out -v /home/vagrant/oss-fuzz-2/build/work/systemd:/work -t gcr.io/oss-fuzz/systemd.
run --rm --privileged --shm-size=2g --platform linux/amd64 -i -e FUZZING_ENGINE=centipede -e SANITIZER=address -e ARCHITECTURE=x86_64 -e PROJECT_NAME=systemd -e HELPER=True -e FUZZING_LANGUAGE=c -v /home/vagrant/oss-fuzz-2/build/out/systemd/__centipede_address:/out -v /home/vagrant/oss-fuzz-2/build/work/systemd:/work -t --pull=never gcr.io/oss-fuzz/systemd
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: statfs /home/vagrant/oss-fuzz-2/build/out/systemd/__centipede_address: no such file or directory
```
because the `__centipede_$SANITIZER` directories aren't created and unlike `docker` `podman` doesn't create them itself: https://github.com/google/oss-fuzz/pull/4763.
I kind of fixed it with
```diff
diff --git a/infra/helper.py b/infra/helper.py
index dc9d2303..6f198208 100755
--- a/infra/helper.py
+++ b/infra/helper.py
@@ -732,6 +732,7 @@ def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals,to
return False
project_out = os.path.join(project.out, child_dir)
+ os.makedirs(project_out, exist_ok=True)
if clean:
logging.info('Cleaning existing build artifacts.')
```
for now.
Contributor guide
Research direction
Start in infra/helper.py at build_fuzzers_impl and inspect how project_out is prepared before the container is invoked. Reproduce the build_fuzzers centipede command with Podman, then verify that the sanitizer-specific output directory exists before mounting it and that the statfs error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100