[ACT][PATCH] UBUNTU: SAUCE: ubuntu_lttng_smoke_test: adjust memory limit to fix OOM
Krzysztof Kozlowski
krzysztof.kozlowski at canonical.com
Tue Jun 15 12:15:17 UTC 2021
The test was failing on Azure Standard_B1ms instance due to OOM killer:
utils:0153| [stdout] gcc: fatal error: Killed signal terminated program cc1
In journalctl:
kernel: cc1 invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
...
kernel: Free swap = 0kB
kernel: Total swap = 0kB
kernel: 524174 pages RAM
The test sets up a swap on low-memory machines, however the detected
total memory on Standard_B1ms was 1.878 GB, so slightly below the 1.8
threshold and the swap was not setup.
Bump the threshold to really higher value, so this lack of memory won't
hit us. Setting up swap (when not needed) should not impact the test,
except making setup() slightly slower.
BugLink: https://bugs.launchpad.net/bugs/1847989
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>
---
ubuntu_lttng_smoke_test/ubuntu_lttng_smoke_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ubuntu_lttng_smoke_test/ubuntu_lttng_smoke_test.py b/ubuntu_lttng_smoke_test/ubuntu_lttng_smoke_test.py
index 434a5ac2e5b0..899d91652162 100755
--- a/ubuntu_lttng_smoke_test/ubuntu_lttng_smoke_test.py
+++ b/ubuntu_lttng_smoke_test/ubuntu_lttng_smoke_test.py
@@ -40,7 +40,7 @@ class ubuntu_lttng_smoke_test(test.test):
df_gb = os.statvfs('/').f_bsize * os.statvfs('/').f_bavail / (1024.**3)
cmd = 'swapon --show'
swapon = utils.system_output(cmd)
- if mem_gb < 1.8 and df_gb > 4.0 and swapon == '':
+ if mem_gb < 3.0 and df_gb > 4.0 and swapon == '':
swap_file = '/tmp/swapfile'
cmd = 'fallocate -l 2G %s' % swap_file
utils.system(cmd)
--
2.27.0
More information about the kernel-team
mailing list