Change MemoryMax constraint in asan envrionment 87/317287/3 accepted/tizen/unified/20250107.102100 accepted/tizen/unified/x/20250107.210542 accepted/tizen/unified/x/asan/20250113.002020
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 30 Dec 2024 05:02:35 +0000 (14:02 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 30 Dec 2024 06:16:31 +0000 (15:16 +0900)
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 <sw0312.kim@samsung.com>
packaging/storaged.spec
systemd/storaged.asan.conf [new file with mode: 0644]

index 6c6a3ae9726608b978e091ed957c664317dc5e39..d0d0e5a4eabcdcae558348180277c45c5a57df0e 100644 (file)
@@ -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 (file)
index 0000000..af1713a
--- /dev/null
@@ -0,0 +1,2 @@
+[Service]
+MemoryMax=64M