From c67edcbff5d86e1b4554cc297f7ec162232fa7b1 Mon Sep 17 00:00:00 2001 From: Ayush Jain Date: Mon, 19 Feb 2024 11:08:24 +0530 Subject: [PATCH] Run filebench with addr_no_randomize Filebench causes segmentation fault on system when ASLR is enabled as memory starts to overlap when many processes are defined with same binary of filebench. So running benchmark with addr_no_randomize personality making the benchmark to run cleanly. Signed-off-by: Ayush Jain --- fs/filebench.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/filebench.py b/fs/filebench.py index 240da8c29..5d94311b1 100644 --- a/fs/filebench.py +++ b/fs/filebench.py @@ -65,6 +65,13 @@ def test(self): testfile = self.params.get('testfile', default='fileserver.f') testfile_path = os.path.join(self.install_prefix, 'share', 'filebench', 'workloads', testfile) - cmd = '%s -f %s' % (binary_path, testfile_path) + + # Due to compatibility issues with filebench, ASLR (Address Space + # Layout Randomization) is disabled in the process personality. + # Filebench does not work properly when ASLR is enabled. + # Disabling ASLR ensures consistent behavior and reliable execution + # of filebench benchmarks. + + cmd = 'setarch --addr-no-randomize %s -f %s' % (binary_path, testfile_path) out = process.system_output(cmd) self.log.info(b"result:" + out)