Progress Log for "Overlay Handling with fuse-overlayfs" #1036
Replies: 5 comments 1 reply
-
Progress Made up (July 2nd)All the code is on the branch gsoc-overlay-handling-with-fuse-overlayfs-dev. Current ProgressSo far, we have achieved the following:
Comparison to PlanI must admit that the current progress is slower than the planned schedule. According to the original plan, Challenges and RoadblocksThere are currently two issues, with the first being more urgent and challenging: 1. Using
|
Beta Was this translation helpful? Give feedback.
-
Progress Made up (July 10th)All the code is on the branch gsoc-overlay-handling-with-fuse-overlayfs-dev. Current ProgressAll functions of BenchExec work correctly, with the fuse-based overlay mount serving as a fallback for the kernel overlay mount and providing appropriate, comprehensive messages. This was tested on an Ubuntu Server 24.04/Linux 6.8.0-36-generic. Comparison to PlanThe current progress is consistent with the plan, with no significant delays or advancements. Challenges and RoadblocksOn Ubuntu 22.04, Here is the full log: (benchexec-venv) dadayang@haoranyang:~$ containerexec --debug ls
2024-07-10 15:05:51 - DEBUG - This is containerexec 3.22-dev.
2024-07-10 15:05:51 - INFO - Starting command ls
2024-07-10 15:05:51 - DEBUG - Available Cgroups: {}
2024-07-10 15:05:51 - DEBUG - Starting process.
2024-07-10 15:05:51 - DEBUG - Parent: child process of RunExecutor with PID 1509 started.
2024-07-10 15:05:51 - DEBUG - Child: child process of RunExecutor with PID 1509 started
2024-07-10 15:05:51 - DEBUG - Failed to make b'/tmp/BenchExec_run_wqsljv85/mount/home/benchexec' a bind mount: [Errno 2] mount(b'/tmp/BenchExec_run_wqsljv85/mount/home/benchexec', b'/tmp/BenchExec_run_wqsljv85/mount/home/benchexec', None, 4096, None) failed: No such file or directory
2024-07-10 15:05:51 - DEBUG - Mounting '/' as overlay
2024-07-10 15:05:51 - DEBUG - [Errno 16] umount(b'/tmp/BenchExec_run_wqsljv85/mount/') failed: Device or resource busy
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/', lower=b'/', upper=b'/tmp/BenchExec_run_wqsljv85/temp/', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/1'
2024-07-10 15:05:51 - DEBUG - Cannot use kernel overlay for /: [Errno 22] mount(b'none', b'/tmp/BenchExec_run_wqsljv85/mount/', b'overlay', 0, b'lowerdir=/,upperdir=/tmp/BenchExec_run_wqsljv85/temp/,workdir=/tmp/BenchExec_run_wqsljv85/overlayfs/1') failed: Invalid argument. Trying to use fuse-overlayfs instead.
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/', lower=b'/', upper=b'/tmp/BenchExec_run_wqsljv85/temp/', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/1'
2024-07-10 15:05:51 - DEBUG - Mounting '/dev' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/dev/pts' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/dev/shm' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/dev/hugepages' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/dev/mqueue' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/run' as hidden
2024-07-10 15:05:51 - DEBUG - Mounting '/sys' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/kernel/security' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/fs/cgroup' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/fs/pstore' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/firmware/efi/efivars' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/fs/bpf' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/kernel/debug' as read-only
2024-07-10 15:05:51 - DEBUG - Marking inaccessible directory '/sys/kernel/debug' as hidden because it contains a mountpoint at '/sys/kernel/debug/tracing'
2024-07-10 15:05:51 - DEBUG - [Errno 22] umount(b'/tmp/BenchExec_run_wqsljv85/mount/sys/kernel/debug') failed: Invalid argument
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/kernel/tracing' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/fs/fuse/connections' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/sys/kernel/config' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/proc' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/core20/2264' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/core20/2264', lower=b'/snap/core20/2264', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/core20/2264', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/2'
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/core20/2318' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/core20/2318', lower=b'/snap/core20/2318', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/core20/2318', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/3'
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/lxd/27948' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/lxd/27948', lower=b'/snap/lxd/27948', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/lxd/27948', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/4'
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/lxd/28373' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/lxd/28373', lower=b'/snap/lxd/28373', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/lxd/28373', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/5'
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/snapd/21465' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/snapd/21465', lower=b'/snap/snapd/21465', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/snapd/21465', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/6'
2024-07-10 15:05:51 - DEBUG - Mounting '/snap/snapd/21759' as overlay
2024-07-10 15:05:51 - DEBUG - Creating overlay mount: target=b'/tmp/BenchExec_run_wqsljv85/mount/snap/snapd/21759', lower=b'/snap/snapd/21759', upper=b'/tmp/BenchExec_run_wqsljv85/temp/snap/snapd/21759', work=b'/tmp/BenchExec_run_wqsljv85/overlayfs/7'
2024-07-10 15:05:51 - DEBUG - Cannot use overlay mode for /boot/efi because it has file system vfat. Using read-only mode instead. You can override this by specifying a different directory mode.
2024-07-10 15:05:51 - DEBUG - Mounting '/boot/efi' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/var/lib/lxcfs' as read-only
2024-07-10 15:05:51 - DEBUG - Mounting '/tmp' as hidden
2024-07-10 15:05:51 - DEBUG - Mounting '/run' as hidden
2024-07-10 15:06:51 - WARNING - Child 1509 not ready after 60s, likely https://github.com/sosy-lab/benchexec/issues/656 occurred. Killing it and trying again Future PlansNext, we need to identify the cause of the error and ensure everything works correctly. I will conduct further tests on machines with other versions of Ubuntu first. |
Beta Was this translation helpful? Give feedback.
-
Progress Made up (Aug 1st)The relevant scripts used for evalutation and results are available in the benchexec-eval repo. Current ProgressPerformance evalutions have beed conducted on BenchExec, comparing the performance metrics of BenchExec using kernel overlayfs and fuse-overlayfs. The conclusion is that using fuse-overlayfs has only a minor impact on performance, though it is still measuarble. EnvironmentThe experiment was conducted on a PC equipped with the following specifications:
BenchExec VersionConsistent with gsoc-overlay-handling-with-fuse-overlayfs-dev. WorkloadSome benchmarks from the SPEC CPU 2017 test suite were selected as the workload. SPEC designed these suites to provide a comparative measure of compute-intensive performance across the widest practical range of hardware using workloads developed from real user applications. The selected benchmarks are 600.perlbench_s, 602.gcc_s, 620.omnetpp_s, 631.deepsjeng_s, 641.leela_s, and 648.exchange2_s. In addition to being compute-intensive, these benchmarks also involve a significant amount of I/O. MetricsBenchExec provides the following data as metrics:
Among these, we are most concerned with walltime, cputime, and memory. ResultsComparison to PlanThe progress is currently slightly behind schedule, but this was anticipated, I had allocated some extra time in the research plan to address this situation. Challenges and RoadblocksThe current issue remains that BenchExec using a fuse-based overlay causes a deadlock problem on Ubuntu 22.04, which has not been resolved. The problem only occurs on Ubuntu 22.04 among all current LTS versions (20.04, 22.04, 24.04). Both 20.04 and 24.04 have been tested and can run all of BenchExec’s functionalities correctly. Deadlock issues are typically difficult to diagnose and resolve. However, since BenchExec using a fuse-based overlay works correctly on most Ubuntu LTS versions, the worst-case scenario would be to issue a warning in BenchExec to users running Ubuntu 22.04. Future PlansFurther organize the relevant documents and eval data, refine the code, and issue warning messages to users running BenchExec on Ubuntu 22.04 (until we can resolve the deadlock issue). AsideMy mentor Dr. Philipp Wendler has raised several points regarding the current fuse-based overlay mechanism, which are worth discussing. These discussions have been very meaningful, and we have reached conclusions through communication and experimentation. The topic of discussion was whether fuse-overlayfs might incorrectly affect BenchExec's performance measurements (cputime and memory). For details, please refer to #1062 (comment), and we will not elaborate further here. |
Beta Was this translation helpful? Give feedback.
-
Progress Made up (Aug 5th)All the code is on the branch gsoc-overlay-handling-with-fuse-overlayfs-dev. Current ProgressWe resolved the deadlock issue that occurred with BenchExec based on DeadlockOn Ubuntu 22.04, when BenchExec uses We compared the system call traces obtained via
By comparing these logs, it can be observed that When we mount an overlayfs to This issue and its solution were mentioned in a PR for fuse-overlayfs. The PR modifies the behavior by using I previously mentioned that BenchExec using It is certain that, in the context of BenchExec, we must use a version of Drop Ambient CapabilitiesThis issue was mentioned in previous discussions. I simply added Comparison to PlanWe are almost there, and the code in the development branch is mergeable. Next, we need to write the relevant documentation to make all the changes user-friendly. Future PlansWrite user-friendly documentation and make additional optimizations to BenchExec's use of |
Beta Was this translation helpful? Give feedback.
-
Final State: GSoC '24
For relevant discussions and code, please refer to the PR #1062. About the ProjectIn this GSoC project, I implemented a mechanism in BenchExec to use fuse-overlayfs as an alternative to kernel overlayfs, addressing the issue where kernel security updates prevented mounting non-leaf nodes with kernel overlayfs. Current Progress Compared to PlanWith the help of my mentor and the community, I have nearly completed all the goals originally planned, which include:
Future WorkNext, I will continue to make some minor improvements to the project, which will not affect the existing functionality. Thank YouI am grateful to Dr. Philipp Wendler for his thoughtful guidance, including his revisions to my proposal and the solutions he provided for the various issues I encountered. I also want to thank Google for offering this opportunity to participate in the open-source community. |
Beta Was this translation helpful? Give feedback.
-
I am the accepted contributor for the GSoC 2024 project "overlay handling with fuse-overlayfs #928". This discussion will serve as the project progress log during GSoC 2024. I will post real-time updates on the current progress in this discussion, and I will also respond to any related questions as soon as possible.
Welcome everyone to follow the project and its progress!
Beta Was this translation helpful? Give feedback.
All reactions