kernelci / kernelci/tuxmake

Fails to clean up overlays

Open
#213 3 comments 0 reactions 0 assignees View on GitHub
gitlab issue
Dominant language
Python
Stars
6
Forks
6
Avg merge
6h 1m
Merged PRs (30d)
3

Description

***In GitLab by @broonie1 on Feb 13, 2024, 16:58 GMT:***

If I run:

tuxmake --target-arch=arm64 --kconfig=defconfig --toolchain=gcc-13 --wrapper=none --environment=KBUILD_BUILD_TIMESTAMP=@1707782361 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/tmp/bisect/work/= --runtime=docker --image=docker.io/tuxmake/arm64_gcc-13 config default kernel modules dtbs dtbs-legacy headers kselftest

This fails with:

rm: cannot remove '/tmp/bisect/out/overlay/workdir/work': Permission denied
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/broonie/git/tuxmake/tuxmake/__main__.py", line 9, in
run()
File "/home/broonie/git/tuxmake/tuxmake/__main__.py", line 6, in run
main()
File "/home/broonie/git/tuxmake/tuxmake/cli.py", line 170, in main
build.run()
File "/home/broonie/git/tuxmake/tuxmake/build.py", line 670, in run
self.cleanup()
File "/home/broonie/git/tuxmake/tuxmake/build.py", line 612, in cleanup
self.runtime.cleanup()
File "/home/broonie/git/tuxmake/tuxmake/runtime.py", line 611, in cleanup
subprocess.check_call(["rm", "-rf", str(self.overlay_dir)])
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['rm', '-rf', '/tmp/bisect/out/overlay']' returned non-zero exit status 1.

The directory /tmp/bisect/out/overlay/workdir/work can't be deleted because it is owned by root.root.

**Assignees:** stylesen

*Migrated from GitLab: https://gitlab.com/Linaro/tuxmake/-/issues/213*

Contributor guide

Open the contributing guide

Research direction

Start with tuxmake/runtime.py around Runtime.cleanup() at line 611 and the caller in tuxmake/build.py around line 612. Reproduce the provided Docker build command and inspect how the overlay directory is removed; done means cleanup completes without the permission error when the work directory is root-owned.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.