From: Tomasz Swierczek Date: Mon, 19 Oct 2020 06:57:18 +0000 (+0200) Subject: Increase timeout waiting for signal delivery to 2 seconds X-Git-Tag: submit/tizen/20201019.101508~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F245890%2F1;p=platform%2Fcore%2Fsecurity%2Fsecurity-manager.git Increase timeout waiting for signal delivery to 2 seconds 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 --- diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp index f684b02e..34767d6f 100644 --- a/src/client/client-security-manager.cpp +++ b/src/client/client-security-manager.cpp @@ -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);