Increase timeout waiting for signal delivery to 2 seconds 90/245890/1
authorTomasz Swierczek <t.swierczek@samsung.com>
Mon, 19 Oct 2020 06:57:18 +0000 (08:57 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Mon, 19 Oct 2020 06:57:18 +0000 (08:57 +0200)
The prepare_app is synchronizing threads security attributes in app
candidate process, which can be multithreaded. Security-Manager's
implementation mimics implementation in libc for smack label synchronization,
using signal handlers to do that.

In some systems under heavy load current timeout we're waiting for signal
delivery can be not enough, hence increasing the timeout.

Change-Id: I2b73c743fee61acbaeb834566a43b0f427218aab

src/client/client-security-manager.cpp

index f684b02eea335e63ce95a771ab76e98e2073672c..34767d6f57f4d73bd11063888d01998e3dcb8977 100644 (file)
@@ -663,7 +663,7 @@ static inline int security_manager_sync_threads_internal(const std::string &app_
         LogDebug("number of threads already gone (signals unsent): " << threads_gone);
 
         for (int i = MAX_SIG_WAIT_TIME; g_threads_count && i; i--)
-            usleep(1000);   // 1 ms
+            usleep(2000);   // 2 ms
 
         Syscall::sigaction(SIGSETXID, &old, nullptr);