From 671ef0e2b3b99a9beb33cf5d3ce6fe98c13dcd1a Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Mon, 30 Dec 2024 14:02:35 +0900 Subject: [PATCH] Change MemoryMax constraint in asan envrionment In asan environment, it uses more memory for asan check and MemoryMax=20M is not enough. To avoid oom-kill of storaged in asan envrionment, change MemoryMax in asan envrionment with different asan conf file in storged.service.d directory. Change-Id: Ibf8b475dec05fd4763728ee4ef5fa3d7baf8904b Signed-off-by: Seung-Woo Kim --- packaging/storaged.spec | 8 ++++++++ systemd/storaged.asan.conf | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 systemd/storaged.asan.conf diff --git a/packaging/storaged.spec b/packaging/storaged.spec index 6c6a3ae..d0d0e5a 100644 --- a/packaging/storaged.spec +++ b/packaging/storaged.spec @@ -124,6 +124,11 @@ rm -rf %{buildroot} %install_service delayed.target.wants storaged.service +%if "%{asan}" == "1" +mkdir -p %{buildroot}%{_unitdir}/storaged.service.d +install -m 644 systemd/storaged.asan.conf %{buildroot}%{_unitdir}/storaged.service.d +%endif + %find_lang extended-sd %post @@ -143,6 +148,9 @@ systemctl daemon-reload %{_unitdir}/delayed.target.wants/storaged.service %{_unitdir}/storaged.service %{_bindir}/storaged +%if "%{asan}" == "1" +%{_unitdir}/storaged.service.d/storaged.asan.conf +%endif %files module_block %manifest %{name}.manifest diff --git a/systemd/storaged.asan.conf b/systemd/storaged.asan.conf new file mode 100644 index 0000000..af1713a --- /dev/null +++ b/systemd/storaged.asan.conf @@ -0,0 +1,2 @@ +[Service] +MemoryMax=64M -- 2.34.1