platform/core/appfw/launchpad.git
18 months agoRelease version 0.30.2 24/291824/1
Hwankyu Jhun [Sun, 23 Apr 2023 23:23:40 +0000 (23:23 +0000)]
Release version 0.30.2

Changes:
 - Fix crash issue of first dotnet application to be executed

Change-Id: If680a45abf72dfae683d23ff9400225c95ebe7ee
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
18 months agoFix crash issue of first dotnet application to be executed 22/291822/1
Hwankyu Jhun [Sun, 23 Apr 2023 22:32:02 +0000 (22:32 +0000)]
Fix crash issue of first dotnet application to be executed

There is a problem about loading the launcher info in the AppExecutor class.
In the previous implementation, the AppExecutor created the process pool
before initializing the launcher info. It causes the crash issue.
If the launch request is for dotnet or dotnet-nui app-types, the process pool
cannot execute it properly. Because, there is no launcher info.
This patch modifies the process pool initialization of the AppExecutor.

Change-Id: Icf41ab3584d85963d793b497290010805f1bab91
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.30.1 67/291767/1
Hwankyu Jhun [Fri, 21 Apr 2023 04:36:07 +0000 (04:36 +0000)]
Release version 0.30.1

Changes:
 - Add LaunchResult enum
 - Delay initilaization of AppExecutor
 - Add missing exception handlings
 - Fix build error for gcc 12.2.0

Change-Id: I23b19ad1d3a7dc97bb425ae1f09a8f0464caea8a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix build error for gcc 12.2.0 61/291761/1
Hwankyu Jhun [Fri, 21 Apr 2023 03:14:20 +0000 (03:14 +0000)]
Fix build error for gcc 12.2.0

- Add missing header inclusions
- Fix wrong if statement

Change-Id: I0a517be1ab498c8c577eaedf4aecb5b372d6ccbd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoAdd missing exception handlings 42/291742/1
Hwankyu Jhun [Thu, 20 Apr 2023 23:54:37 +0000 (23:54 +0000)]
Add missing exception handlings

When the executable file does have the execution permission,
the constructor of the LoaderContext throws an exception.
To prevent the crash issue, we should handle exceptions.

Change-Id: Ie30a8e6899fa4df2f60dbef14d1a5f701dc451ec
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoDelay initilaization of AppExecutor 40/291740/1
Hwankyu Jhun [Thu, 20 Apr 2023 22:46:47 +0000 (22:46 +0000)]
Delay initilaization of AppExecutor

If a process is created before SignalManager initialization, there may be
a problem that it cannot handle SIGCHLD handling properly. The patch delays
the initialization of AppExecutor until after SignalManager initialization
to fix this issue.

Change-Id: Icb0f97915f76648a3f0c07f9d2fb1200a297258e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoAdd LaunchResult enum 73/291673/2
Changgyu Choi [Thu, 20 Apr 2023 06:37:33 +0000 (15:37 +0900)]
Add LaunchResult enum

This patch adds LaunchResult enum for visibility of the
LaunchRequestDo().

Change-Id: Ieb8f45a7480cdb2a4d89b6dddbbbda98c251f0b8
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
19 months agoRelease version 0.30.0 67/291667/1 accepted/tizen/unified/20230421.033218
Hwankyu Jhun [Thu, 20 Apr 2023 04:59:15 +0000 (04:59 +0000)]
Release version 0.30.0

Changes:
 - Support Process pool feature
 - Modify loader management

Change-Id: I5c14ba5438db4d51c9eceae96eefac4b20d70146
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoModify loader management 26/291626/11
Hwankyu Jhun [Wed, 19 Apr 2023 09:54:36 +0000 (09:54 +0000)]
Modify loader management

The management policy for the loader process will be changed.
Loader processes will be created without checking the CPU threshold.
When an execution request is received, if a loader process is in
the ready state, the execution request will be held until the loader process is
ready and then forwarded to the loader process.

This patch was created with reference to the patch below:
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/launchpad/+/288190/

Change-Id: I1b9dbed0824e7b72d6a743d8c8a2b4b266fa741c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoSupport Process pool feature 45/291545/14
Hwankyu Jhun [Tue, 18 Apr 2023 06:39:19 +0000 (06:39 +0000)]
Support Process pool feature

Launchpad is introducing a process pool. The process pool class creates
child processes, which are used to execute application launch requests or
to create loader processes. This feature is used to improve performance.
The PSS memory usage of candidate processes is not high, typically ranging
from 400 to 500.

Change-Id: I0142e7c15d12295741c46fa5e203caa664dea0d9
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.29.0 45/291445/1 accepted/tizen/unified/20230417.140303
Hwankyu Jhun [Mon, 17 Apr 2023 03:41:18 +0000 (03:41 +0000)]
Release version 0.29.0

Changes:
 - Refactor launchpad

Change-Id: I0f44a2b236c12f1b357ad50539bf453ea3ee1b26
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor launchpad 13/290713/47
Changgyu Choi [Fri, 31 Mar 2023 06:17:19 +0000 (15:17 +0900)]
Refactor launchpad

The launchpad is implemented using C++ language.

Change-Id: I43ee313ed4c5f73067f0f79df226dee09c77226a
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
19 months agoRelease version 0.28.3 89/291289/1 accepted/tizen/unified/20230413.123723
Hwankyu Jhun [Thu, 13 Apr 2023 02:20:08 +0000 (02:20 +0000)]
Release version 0.28.3

Changes:
 - Add a missing exception handling

Change-Id: If0af54c83ffdcb8b9230febd731348fcb75176fa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoAdd a missing exception handling 83/291283/1
Hwankyu Jhun [Thu, 13 Apr 2023 01:02:22 +0000 (01:02 +0000)]
Add a missing exception handling

The operator++ of the std::filesystem::directory_iterator can throw an
exception when the directory is deleted or the process does not have
a permission to access it.

Change-Id: I44f8142a23941d2ee9e0ff08d31225b4b3429cd9
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.28.2 45/291045/1 accepted/tizen/unified/20230407.140027
Hwankyu Jhun [Fri, 7 Apr 2023 01:19:10 +0000 (01:19 +0000)]
Release version 0.28.2

Changes:
 - Fix wrong path of debugger config

Change-Id: I4c4f37ca3bbc94ccac0a76885e2b5b3e904b6bdd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix wrong path of debugger config 44/291044/1
Hwankyu Jhun [Fri, 7 Apr 2023 00:55:08 +0000 (00:55 +0000)]
Fix wrong path of debugger config

The debugger config file is installed to "/usr/share/aul".

Change-Id: I36827f5c50d5f532e76ee7f419bf9303e8e53c97
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.28.1 64/290964/1 accepted/tizen/unified/20230406.165738
Hwankyu Jhun [Wed, 5 Apr 2023 23:55:14 +0000 (23:55 +0000)]
Release version 0.28.1

Changes:
 - Fix aul daemons path

Change-Id: I924d241b0996c5ddab8bd7f6f99993b9c8dee95b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix aul daemons path 61/290961/2
Mateusz Moscicki [Wed, 5 Apr 2023 19:23:01 +0000 (21:23 +0200)]
Fix aul daemons path

The launchpad-process-pool socket path must be
"/run/aul/daemons/<uid>/.launchpad-process-pool-sock".

Change-Id: I89e2df902a9b83af863aa13b919e15eea8e942e0

19 months agoRelease version 0.28.0 04/290904/1
Hwankyu Jhun [Tue, 4 Apr 2023 23:51:38 +0000 (23:51 +0000)]
Release version 0.28.0

Changes:
 - Refactor launchpad
 - Fix static analysis issues

Change-Id: Ic13afc440e5afab2a239e19d32a247a008bcb6f5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix static analysis issues 02/290902/1
Hwankyu Jhun [Tue, 4 Apr 2023 22:55:30 +0000 (22:55 +0000)]
Fix static analysis issues

Fixed:
 - resource leak
 - forward null

Change-Id: I24116eb324737cdb27f1780d8fed244a3458d9fc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor launchpad 67/290767/10
Hwankyu Jhun [Mon, 3 Apr 2023 04:31:06 +0000 (04:31 +0000)]
Refactor launchpad

The launchpad code is implemented using C++ language.

Change-Id: I65bacbd91e0fdc3beff21097628c5c908ee079d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.27.0 37/290837/1
Hwankyu Jhun [Tue, 4 Apr 2023 06:05:05 +0000 (06:05 +0000)]
Release version 0.27.0

Changes:
 - Refactor vconf code related to system events
 - Refactor app defined loader info feature
 - Remove unnecessary log system
 - Add missing exception handling
 - Refactor app labels monitor
 - Modify AppLabelsMonitor to singleton
 - Fix shared queue initialization

Change-Id: I0979e83d0c6c10fb8f1a5f375f7ae95a9aa85a51
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix shared queue initialization 35/290835/1
Hwankyu Jhun [Tue, 4 Apr 2023 05:47:41 +0000 (05:47 +0000)]
Fix shared queue initialization

Before running the worker thread, the shared queue must be allocated.
If it's not allocated, the thread will be crashed by the invalid access issue.

Change-Id: I9100ef14e458668452091c89bdeebd3f8beb7d3f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoModify AppLabelsMonitor to singleton 53/290653/5
Changgyu Choi [Thu, 30 Mar 2023 07:28:20 +0000 (16:28 +0900)]
Modify AppLabelsMonitor to singleton

AppLabelsMonitor should be accessible throughout global.

Change-Id: I63536f620360506865c01f1259f8a48cc1e7ca82
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
19 months agoRefactor app labels monitor 43/290643/2
Hwankyu Jhun [Thu, 30 Mar 2023 05:17:11 +0000 (05:17 +0000)]
Refactor app labels monitor

The app labels monitor is implmeneted using C++ language.

Change-Id: I329a9a80a1428487a38c2439383242d6eb036fa8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoAdd missing exception handling 44/290644/1
Hwankyu Jhun [Thu, 30 Mar 2023 05:53:27 +0000 (05:53 +0000)]
Add missing exception handling

If the launchpad-process-pool does not have the capability that is
cap_dac_override, the launchpad-process-pool cannot create a new directory.
The launchpad-process-pool cannot create a new directory in the '/opt/usr' path.

Change-Id: I45b86c9a549b78ce483dcbe4b7ae0fd418cfcecb
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRemove unnecessary log system 33/290633/1
Hwankyu Jhun [Thu, 30 Mar 2023 04:08:14 +0000 (04:08 +0000)]
Remove unnecessary log system

If the execv() call fails, there used to be a feature that uses a socket to
send the error message to the launchpad.
This feature is no longer needed. The stderr file descriptor is redirected to
dlog, so we can check error logs using dlog.

Change-Id: I36ad6d690361bba01dce2df065e5caa8d22fab5b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor app defined loader info feature 25/290625/4
Hwankyu Jhun [Thu, 30 Mar 2023 01:37:31 +0000 (01:37 +0000)]
Refactor app defined loader info feature

The code implementation uses C++ language. The launchpad inotify code is removed.
In the previous implementation, we added the FileMonitor class.
The app defined loader feature uses the FileMonitor class to monitor
file creation and deletion events.

Change-Id: I315c541d49cc3d3227f1965e81b6108a48a163bc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor vconf code related to system events 25/290525/8
Hwankyu Jhun [Tue, 28 Mar 2023 05:39:48 +0000 (05:39 +0000)]
Refactor vconf code related to system events

The vconf code is implemented using C++ language.

Change-Id: I6fb5f22d7d006543234d8156babe2ab023f658b0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.26.3 88/290588/1 accepted/tizen/unified/20230330.025620
Hwankyu Jhun [Wed, 29 Mar 2023 09:29:51 +0000 (09:29 +0000)]
Release version 0.26.3

Changes:
 - Refactor launchpad config
 - Fix wrong socket path

Change-Id: I9d3a2b8d69d091d33d0850acc5b2fe7d343b5a29
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix wrong socket path 87/290587/2
Hwankyu Jhun [Wed, 29 Mar 2023 09:19:51 +0000 (09:19 +0000)]
Fix wrong socket path

The hydra sigchld socket path must be "/run/aul/daemons/<uid>/.hydra-sigchld-sock".
The "/" was missed. This patch fixes it.

Change-Id: I13b924a8788fc609e5514153166c4c26174242d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor launchpad config 13/290413/8
Hwankyu Jhun [Fri, 24 Mar 2023 06:42:10 +0000 (06:42 +0000)]
Refactor launchpad config

The launchpad config is implemented using C++ language.

Change-Id: I0b4e01abed0e8b07fc2763b79362312177064959
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.26.2 72/290472/1 accepted/tizen/unified/20230329.013224
Changgyu Choi [Mon, 27 Mar 2023 06:19:49 +0000 (15:19 +0900)]
Release version 0.26.2

Changes:
 - Add CPUChecker and AppInfo classes
 - Refactor launchpad debug
 - Fix child process deadlock issue
 - Add create_directories() exception handling

Change-Id: Ib477dc3da9a3a5462696255cacb2562c90a25433
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
19 months agoAdd create_directories() exception handling 67/290467/5
Changgyu Choi [Mon, 27 Mar 2023 05:43:29 +0000 (14:43 +0900)]
Add create_directories() exception handling

std::filesystem::create_directories() can throw an exception.
This patch adds the exception handling for the above case.

Change-Id: I37228b7b38ae1c9894ae2b1586429c39e8379e63
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
19 months agoFix child process deadlock issue 69/290469/3
Hwankyu Jhun [Mon, 27 Mar 2023 05:53:06 +0000 (05:53 +0000)]
Fix child process deadlock issue

When a child process accesses the destructor of std::condition_variable,
it can potentially go to the deadlock state.
To avoid the deadlock issue of the child process, the launchpad
allocates the condition variables using new keyword.

Change-Id: Icc5709671cb9a54557fc6a78ccb9f416c2e3d114
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRefactor launchpad debug 04/290404/6
Hwankyu Jhun [Fri, 24 Mar 2023 05:13:21 +0000 (05:13 +0000)]
Refactor launchpad debug

The launchpad debug is implemented using C++ language.

Change-Id: I13ed4cb60cfcf356d52748d3a2f3d53182ca2d23
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoAdd CPUChecker and AppInfo classes 39/290339/6
Hwankyu Jhun [Thu, 23 Mar 2023 08:48:27 +0000 (08:48 +0000)]
Add CPUChecker and AppInfo classes

The new claases are for refactoring the launchpad.

Adds:
 - CPUChecker
 - AppInfo

Change-Id: I1cb745057d34fc092783c172b3369ebd4bc39d9c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.26.1 34/290334/1 accepted/tizen/unified/20230325.044622
Hwankyu Jhun [Thu, 23 Mar 2023 07:40:04 +0000 (07:40 +0000)]
Release version 0.26.1

Changes:
 - Fix build break issues

Change-Id: I104e968477b4d98acc3286e72fc2e671756851e4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoFix build break issues 29/290329/1
Hwankyu Jhun [Thu, 23 Mar 2023 07:01:58 +0000 (07:01 +0000)]
Fix build break issues

- Use std::stringstream instead of std::sscanf()
- Use unsigned long long instead of uint64_t

Change-Id: Ib6b0f7cf28efbb478ca110ec107f7d55761dd976
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
19 months agoRelease version 0.26.0 07/290307/1
Hwankyu Jhun [Thu, 23 Mar 2023 04:13:25 +0000 (04:13 +0000)]
Release version 0.26.0

Changes:
 - Add liblaunchpad-common library for launchpad daemons
 - Fix 64bit build error
 - Add to enable TIZEN_ASAN_ACTIVATION
 - Refactor launchpad logger
 - Modify FileMonitor class
 - Refactor launchpad dbus
 - Fix static analysis issues
 - Refactor launchpad worker
 - Remove cpplint warning messages
 - Refactor Memory Monitor
 - Refactor launchpad signal

Change-Id: Ic6ff617adc69a9593a0b8383fdd99bebf306c4ff
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRefactor launchpad signal 99/290099/7
Hwankyu Jhun [Mon, 20 Mar 2023 07:24:43 +0000 (07:24 +0000)]
Refactor launchpad signal

The launchpad signal is implemented using C++ language.

Change-Id: I633d2a5d58f01b4fdf70df9613fb1dbd1a2c88b2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRefactor Memory Monitor 60/290060/3
Hwankyu Jhun [Sun, 19 Mar 2023 23:58:27 +0000 (23:58 +0000)]
Refactor Memory Monitor

The launchpad memory monitor is implemented using C++ language.

Change-Id: I13a530d912a43ecff1271e78ede22334da9344c3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRemove cpplint warning messages 21/289721/4
Hwankyu Jhun [Tue, 14 Mar 2023 03:55:34 +0000 (03:55 +0000)]
Remove cpplint warning messages

- Use uint64_t instead of C type long
- Use reinterpret_cast instead of C-style cast
- Delete Redundant blank line

Change-Id: I238d613bcc3e484687c99daa2bf62ed9318ffa92
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRefactor launchpad worker 08/289708/7
Hwankyu Jhun [Mon, 13 Mar 2023 23:29:31 +0000 (23:29 +0000)]
Refactor launchpad worker

The launchpad worker is implemented using C++ language.

Change-Id: Ida9775036924f4e148ba5896433634fa20f52d5f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoFix static analysis issues 29/289729/1
Hwankyu Jhun [Tue, 14 Mar 2023 05:21:53 +0000 (05:21 +0000)]
Fix static analysis issues

Types:
 - Uninitialized pointer read

Change-Id: Ibb40848fcd278ff28216b7c2a41091a95e4d3b8c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRefactor launchpad dbus 51/289651/8
Hwankyu Jhun [Mon, 13 Mar 2023 03:57:40 +0000 (03:57 +0000)]
Refactor launchpad dbus

The launchpad dbus is implemented using C++ language.

Change-Id: I6aea493bf48a51cfdeb54da88e83732e9348ae2c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoModify FileMonitor class 98/289598/5
Hwankyu Jhun [Fri, 10 Mar 2023 06:49:14 +0000 (06:49 +0000)]
Modify FileMonitor class

This patch uses the IOChannel class.

Change-Id: I29ab1f29ce6e1461592cedd2805882b6b1ae4355
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRefactor launchpad logger 90/289590/5
Hwankyu Jhun [Fri, 10 Mar 2023 04:45:08 +0000 (04:45 +0000)]
Refactor launchpad logger

The logger & log codes are implemented using C++ language.

Change-Id: I3a77b3eb137d1e7993620189e17a3a78b25bba7f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoAdd to enable TIZEN_ASAN_ACTIVATION 04/288804/18
Changgyu Choi [Thu, 23 Feb 2023 08:10:28 +0000 (17:10 +0900)]
Add to enable TIZEN_ASAN_ACTIVATION

If you want to add the TIZEN_ASAN_ACTIVATION environment variable when launching a certain app,
add the appid to the /opt/usr/share/aul/debug/.asan_app_list.

Change-Id: I7eba02d0a7f0afd9ad7588526ba9e923a5325d4e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
20 months agoFix 64bit build error 22/289522/1
Changgyu Choi [Thu, 9 Mar 2023 06:25:37 +0000 (15:25 +0900)]
Fix 64bit build error

In 64bit environment, size_t may be 8bytes.

Change-Id: I1a6abfbe2eb52dfaa5165aef50ff72b1081119f2
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
20 months agoAdd liblaunchpad-common library for launchpad daemons 44/289444/9
Hwankyu Jhun [Thu, 9 Mar 2023 05:03:33 +0000 (05:03 +0000)]
Add liblaunchpad-common library for launchpad daemons

The liblaunchpad-common library is added for launchpad daemons.

Change-Id: I4cc7d88a3709184a6cfd3908160d23c044341648
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRelease version 0.25.1 02/289402/1 accepted/tizen/unified/20230309.035153
Hwankyu Jhun [Tue, 7 Mar 2023 06:03:52 +0000 (06:03 +0000)]
Release version 0.25.1

Changes:
 - Add logs for debugging loader creation

Change-Id: I446868898d85d6b3ce30a6fa6f8f2f6fb415be52
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoAdd logs for debugging loader creation 01/289401/1
Hwankyu Jhun [Tue, 7 Mar 2023 05:57:08 +0000 (05:57 +0000)]
Add logs for debugging loader creation

To debug loader creation, new logs are added.

Change-Id: I1ca9c480ba7f11d4321639df8a0dc7f07cbfd87f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRelease version 0.25.0 02/289302/1
Hwankyu Jhun [Mon, 6 Mar 2023 05:57:14 +0000 (05:57 +0000)]
Release version 0.25.0

Changes:
 - Add a new option to the loader configuration

Change-Id: I9df5bff98dc9a8c49c9e1226581070ee80e7b90f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoAdd a new option to the loader configuration 94/289294/3
Hwankyu Jhun [Mon, 6 Mar 2023 04:01:23 +0000 (04:01 +0000)]
Add a new option to the loader configuration

The "CONDITION_PATH_EXISTS" option is added to the loader configuration.
The option is for the "ON_BOOT_TIMEOUT" option. If the path does not exist,
the launchpad does not prepare the candidate process. And, the launchpad
adds a timer to wait until the path exists. The interval of the timer is 100 ms.

Change-Id: I626b25ef8448079bd7fba90f76e7815a2934574b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRelease version 0.24.3 90/289290/1
Hwankyu Jhun [Mon, 6 Mar 2023 01:13:15 +0000 (01:13 +0000)]
Release version 0.24.3

Changes:
 - Remove build warning messages
 - Delete unused files after process shutdown

Change-Id: Ic1d2e4fd755130f98597cde93354584518b33c23
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoDelete unused files after process shutdown 32/289232/4
Hwankyu Jhun [Fri, 3 Mar 2023 04:49:55 +0000 (04:49 +0000)]
Delete unused files after process shutdown

After the process is terminated, the launchpad deletes unnecessary files.
To debug & profile dotnet applications, the coreclr creates "clr-debug-pipe-"
and "dotnet-diagnostic-" files. The launchpad deletes the files if the files
exists. To avoid blocking the main thread of the launchpad, this patch
creates a new worker thread that is "RecycleBin+".

Change-Id: I68e02359ed2ec79801b46da2f45ef54b5c35f4b9
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRemove build warning messages 37/289237/2
Hwankyu Jhun [Fri, 3 Mar 2023 05:35:22 +0000 (05:35 +0000)]
Remove build warning messages

This patch fixes build warnings.

Change-Id: If38a108c401b91bc429dd2b5e59efd494c88ec1f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRelease version 0.24.2 16/289216/1
Hwankyu Jhun [Fri, 3 Mar 2023 00:00:36 +0000 (00:00 +0000)]
Release version 0.24.2

Changes:
 - Fix wrong initialization

Change-Id: I4a33cefab8c9ededaa69459aa1b004f26152f8d2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoFix wrong initialization 11/289211/1
Hwankyu Jhun [Thu, 2 Mar 2023 23:34:02 +0000 (23:34 +0000)]
Fix wrong initialization

The memory monitor initialization should be called before adding default slots.
If the threshold is greater than 100, the memory monitor should be disabled.

Change-Id: I64ce56d5d73c3a61bccec425827567ad37c2c640
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
20 months agoRelease version 0.24.1 96/288996/1 accepted/tizen/unified/20230228.052745
jh9216.park [Mon, 27 Feb 2023 07:53:38 +0000 (02:53 -0500)]
Release version 0.24.1

Changes:
 - Fix lib dir
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
Change-Id: I47ebc7a50bb2b6454e24316b2bfe7d409da723de

20 months agoFix lib dir 77/288977/1
jh9216.park [Mon, 27 Feb 2023 06:14:05 +0000 (01:14 -0500)]
Fix lib dir

Change-Id: I8c44ae1304579b250937d5568ae751b36e9854b2
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
21 months agoRelease version 0.24.0 88/288388/1 accepted/tizen/unified/20230220.174442
Changgyu Choi [Thu, 16 Feb 2023 05:20:16 +0000 (14:20 +0900)]
Release version 0.24.0

Changes:
 - Refactor launchpad to c++
 - Add unittest
 - Modify launchpad-process-pool directory structure
 - Fix library path for aarch64
 - Rename sample loader lib path args to /test

Change-Id: I846cd507e348b330bea0ae5d3eb44d2cfc231f49
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoRename sample loader lib path args to /test 85/288385/3
Changgyu Choi [Thu, 16 Feb 2023 05:04:33 +0000 (14:04 +0900)]
Rename sample loader lib path args to /test

Change-Id: I8aa04dccb3d66aadccd31f6571fbab1ad048736e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoFix library path for aarch64
Changgyu Choi [Thu, 16 Feb 2023 05:04:33 +0000 (14:04 +0900)]
Fix library path for aarch64

Change-Id: I8aa04dccb3d66aadccd31f6571fbab1ad048736e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoModify launchpad-process-pool directory structure 64/288164/3
Changgyu Choi [Mon, 13 Feb 2023 02:11:24 +0000 (11:11 +0900)]
Modify launchpad-process-pool directory structure

launchpad-process-pool directory structure is modified as follow.

launchpad-process-pool
 | *.cc
 | *.hh

Change-Id: I30c244da4b5fe20db85ea7ad00209cb5bd8cc84c
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoAdd unittest 89/287889/7
Changgyu Choi [Tue, 7 Feb 2023 09:37:48 +0000 (18:37 +0900)]
Add unittest

Unittest adds:
 - DebuggerInfo
 - LauncherInfo
 - LoaderInfo

Change-Id: If2a8bf0ea367eb071713d951ba6117f83a5765bd
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoRefactor launchpad to c++ 03/287603/4
Changgyu Choi [Wed, 1 Feb 2023 07:05:39 +0000 (16:05 +0900)]
Refactor launchpad to c++

We will refactor launchpad to c++ step by step.

Changes:
 - debugger_info
 - launcher_info
 - loader_info

Change-Id: I973d98b0669c4b752ba6cf7203f83e8c83085dc0
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
21 months agoRelease version 0.23.2 80/287680/1
Hwankyu Jhun [Thu, 2 Feb 2023 07:37:25 +0000 (07:37 +0000)]
Release version 0.23.2

Changes:
 - Fix wrong condition of maximum count of cpu checker

Change-Id: Ia8b71a94e2917161c235dee5f9a84c134fe5dcf2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
21 months agoFix wrong condition of maximum count of cpu checker 79/287679/1
Hwankyu Jhun [Thu, 2 Feb 2023 07:30:39 +0000 (07:30 +0000)]
Fix wrong condition of maximum count of cpu checker

The return value should be compared with the INT_MIN.

Change-Id: I83cca8e386abafaecf925c035e239dba28189347
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
21 months agoRelease version 0.23.1 70/287570/1 accepted/tizen/unified/20230206.093743 accepted/tizen/unified/20230206.093902
Hwankyu Jhun [Tue, 31 Jan 2023 22:54:52 +0000 (22:54 +0000)]
Release version 0.23.1

Changes:
 - Modify loader priority feature

Change-Id: I62b68f788ebd326857aef54ff7c013724c368028
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
21 months agoModify loader priority feature 42/287542/2
Hwankyu Jhun [Tue, 31 Jan 2023 06:35:46 +0000 (06:35 +0000)]
Modify loader priority feature

After this patch is applied, the loader priority feature is basically activated.
The platform developer can adjust a scheduling priority using
the loader configuration file.
The 'SCEHD_PRIORITY' tag is added for the loader process.
The loader developer can set the scheduling priority as below:
+------------------------------------------------------------------------------+
| [LOADER]                                                                     |
| NAME hw-loader                                                               |
| ...                                                                          |
| SCEHD_PRIORITY         -20                                                   |
+------------------------------------------------------------------------------+

The range of the priority is -20 to 19. (-20 being the highest priority
and 19 being the lowest priority.)
If the loader has the sched priority tag, the child process sets
the scheduling priority using the configure information after the process
is created. And then, the loader process sets the priority to the normal
priority before running the main loop.

Change-Id: I531cc8381936ef4f6c9b8bad1640a0a8714f2777
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
21 months agoRelease version 0.23.0 30/287430/1
Hwankyu Jhun [Mon, 30 Jan 2023 01:33:22 +0000 (01:33 +0000)]
Release version 0.23.0

Changes:
 - Add new APIs for loader process

Change-Id: I8bc1e832f5e1e53a720638eef47111fbad7e06d5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoAdd new APIs for loader process 34/287034/2
Hwankyu Jhun [Thu, 19 Jan 2023 01:47:28 +0000 (01:47 +0000)]
Add new APIs for loader process

Before calling the loader_launch_cb() callback function, the loader process
has to make blocking all sub threads if a new thread is able to be created by
the sub thread. This patch adds new functions for the loader process.
Some loader process creates a new process while calling the security_manager_prepare_app2().
It makes an application launch failure issue.

When calling the loader_prelaunch_cb() callback function, the loader should call
the launchpad_loader_block_threads() to make blocking all sub threads.
And then, the loader calls the launchpad_loader_unblock_threads() while calling
the launchpad_launch_cb() callback function.

Even if the sub thread creates a new thread while calling the launchpad_loader_block_threads(),
it handles by the security_manager_prepare_app2() function.
This is not complete solution. But, this patch is able to reduce the risk about
the launch failure issues.

Adds:
 - launchpad_loader_block_threads()
 - launchpad_loader_unblock_threads()

Change-Id: Ib98d435507abbb0d3ebe0a5617d7fcb2509c154e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 0.22.2 16/286916/1 accepted/tizen/unified/20230118.043049
Hwankyu Jhun [Tue, 17 Jan 2023 00:25:59 +0000 (00:25 +0000)]
Release version 0.22.2

Changes:
 - Add retrying count check for waiting threads

Change-Id: Ifb70ace83d91cf386993b37ccca4c97c69182d50
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoAdd retrying count check for waiting threads 13/286913/1
Hwankyu Jhun [Mon, 16 Jan 2023 23:27:29 +0000 (23:27 +0000)]
Add retrying count check for waiting threads

If the retyring count is exceeded, the candidate process stops to wait for
threads ready. The maximum retrying count is 600. In the worst case,
the candidate process can be waitted until 30 seconds.

Change-Id: I4c73674c9f783499af1087c3855f56205a52a6ad
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 0.22.1 71/286871/1 accepted/tizen/unified/20230117.140508
Hwankyu Jhun [Mon, 16 Jan 2023 05:37:58 +0000 (05:37 +0000)]
Release version 0.22.1

Changes:
 - Print appid for debugging
 - Fix build error
 - Wait for threads ready

Change-Id: I0c31efefc993cf2f3916edd1606d9f6e86aea4a5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoWait for threads ready 59/286859/6
Hwankyu Jhun [Mon, 16 Jan 2023 01:00:42 +0000 (01:00 +0000)]
Wait for threads ready

Before calling the security_manager_prepare_app2() function, all threads
of the loader process MUST be ready. After this patch is applied,
the loader porcess waits until threads are ready if the key-value data
related to the thread exists in the extra data.

Change-Id: I871b1a53e602dadc50134fca5575a54d6fc1b249
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoFix build error 70/286870/1
Hwankyu Jhun [Mon, 16 Jan 2023 05:02:08 +0000 (05:02 +0000)]
Fix build error

If the priority change feature is enabled, the build error is occurred.
This patch fixes the build error. The TIZEN_FEATURE_PRIORITY_CHANGE feature
is not used in the loader process. It's removed from the app-defined-loader.

Change-Id: Ia6333c0195b5db3baaa7ce5aa6feb7cd7b08d23e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoPrint appid for debugging 30/286730/1
Hwankyu Jhun [Thu, 12 Jan 2023 06:47:20 +0000 (06:47 +0000)]
Print appid for debugging

To debug which the application is calling security_manager_prepare_app_v2(),
the launchpad prints the application ID.
This patch fixes the typo and removes build warning message.

Change-Id: I3c38ff369ab4cc01aac2c8fdfd3d1e74c3f490ee
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 0.22.0 21/286521/1 accepted/tizen/unified/20230110.164133
Hwankyu Jhun [Mon, 9 Jan 2023 07:42:15 +0000 (07:42 +0000)]
Release version 0.22.0

Changes:
 - Add res pkgids to env

Change-Id: I272ee28057a015f8371de7358d6ce9fc51021bc3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoAdd res pkgids to env 73/284573/4
Sangyoon Jang [Mon, 21 Nov 2022 01:18:01 +0000 (10:18 +0900)]
Add res pkgids to env

Change-Id: I920242fa6eda3bf634f527f83b46b89c3bd0eef0
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
22 months agoRelease version 0.21.6 86/286286/1 accepted/tizen/7.0/unified/20230105.155141 accepted/tizen/unified/20230104.172225
Hwankyu Jhun [Tue, 3 Jan 2023 06:24:26 +0000 (06:24 +0000)]
Release version 0.21.6

Changes:
 - Create aul worker thread before running the main loop

Change-Id: Icea70fcc50d99488bfa3a7b42986abd2e031a58f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoCreate aul worker thread before running the main loop 71/286271/1
Hwankyu Jhun [Tue, 3 Jan 2023 04:44:28 +0000 (04:44 +0000)]
Create aul worker thread before running the main loop

To improve launching performance, the launchpad library calls
the aul_launch_worker_init() function to prepare the aul worker thread.

Requires:
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/aul-1/+/286270

Change-Id: I09da6090fafc4148cb6532307a69cfeb7b703f70
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 0.21.5 88/286088/1 accepted/tizen/unified/20221228.170003
Changgyu Choi [Tue, 27 Dec 2022 09:58:30 +0000 (18:58 +0900)]
Release version 0.21.5

Changes:
 - Fix static analysis issues

Change-Id: I892a5db902e63797fd9b3a960e058722a45b66b3
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix static analysis issues 81/286081/1
Changgyu Choi [Tue, 27 Dec 2022 08:49:41 +0000 (17:49 +0900)]
Fix static analysis issues

Change-Id: If01054da536adbfe4afc5a6fece227b5ba252264
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoRelease version 0.21.4 95/285895/1 accepted/tizen/7.0/unified/20221223.170221 accepted/tizen/unified/20221227.170634
Changgyu Choi [Thu, 22 Dec 2022 06:26:26 +0000 (15:26 +0900)]
Release version 0.21.4

Changes:
 - Fix library path for aarch64

Change-Id: I636804d10678b84d8355569e538f4a04a0ad663a
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
22 months agoFix library path for aarch64 83/285883/1
Changgyu Choi [Thu, 22 Dec 2022 05:49:18 +0000 (14:49 +0900)]
Fix library path for aarch64

Change-Id: I1c576aadef1c5a096823c251d9416af5314f5eeb
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoRelease version 0.21.3 37/285437/1 accepted/tizen/7.0/unified/20221216.024731
Hwankyu Jhun [Tue, 13 Dec 2022 00:58:49 +0000 (00:58 +0000)]
Release version 0.21.3

Changes:
 - Remove forker thread

Change-Id: I125713cf0ee0e4e2f2e2d635fa861b5df832ee9a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRemove forker thread 35/285435/1
Hwankyu Jhun [Mon, 12 Dec 2022 23:39:34 +0000 (23:39 +0000)]
Remove forker thread

If the main thread is calling the malloc() when the forker thread calls
the fork(), the child process will be always blocked if it calls the malloc().
This issue is similar to the previous commit that is
'0fbcdd1969571c72cc97a2a24dd76a76c42a18e3'.

Change-Id: Iec8f8083c79d5f8a3b08aa49be7bb8d972fbb5a7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 0.21.2 34/284634/1 accepted/tizen/7.0/unified/20221123.170844 accepted/tizen/unified/20221124.015422
Changgyu Choi [Tue, 22 Nov 2022 06:42:28 +0000 (15:42 +0900)]
Release version 0.21.2

Changes:
 - Fix static analysis issues

Change-Id: I94fc406a20e88da798d35f8561ccfd091252c72d
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoFix static analysis issues 82/284582/4
Changgyu Choi [Mon, 21 Nov 2022 08:14:52 +0000 (17:14 +0900)]
Fix static analysis issues

Change-Id: I28acaeb2507b199fcbf1ac56c51120a0468c11b1
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 0.21.1 00/284500/1
Hwankyu Jhun [Fri, 18 Nov 2022 06:18:26 +0000 (06:18 +0000)]
Release version 0.21.1

Changes:
 - Do not check candidate process state

Change-Id: I31279689af35625c4f0df1c37dc335c32cb62fa5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoDo not check candidate process state 95/284495/1
Hwankyu Jhun [Fri, 18 Nov 2022 05:45:11 +0000 (05:45 +0000)]
Do not check candidate process state

When starting launchpad, getting the vconf value can be failed.
Even if getting the vconf value is failed, the loader process should be
executed that has a onboot timeout feature in the configuration file.

Change-Id: Ie6d22f18aa711a325b445102bff16914f6ed4727
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 0.21.0 90/284490/1 accepted/tizen/7.0/unified/20221123.015514 accepted/tizen/unified/20221123.015012
Hwankyu Jhun [Fri, 18 Nov 2022 02:19:52 +0000 (02:19 +0000)]
Release version 0.21.0

Changes:
 - Make enumeration for commands
 - Modify slot addition function
 - Support timeout feature related on boot

Change-Id: I7d588a3ef2c0d3360d6f158d9938749e6eb78768
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoSupport timeout feature related on boot 89/284489/4
Hwankyu Jhun [Fri, 18 Nov 2022 00:26:46 +0000 (00:26 +0000)]
Support timeout feature related on boot

To exeucte the loader process forcedly, the feature is supported.
"ON_BOOT_TIMEOUT" tag is added for parsing on boot timeout value.
Even if the CPU threshold is not exceeded, the loader process will be
executed by the timer.

Change-Id: I6a588d28ed1c81685f5718b9c03a680d6d0631d3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoModify slot addition function 88/284488/3
Hwankyu Jhun [Thu, 17 Nov 2022 23:51:04 +0000 (23:51 +0000)]
Modify slot addition function

To reduce the number of parameters of the __add_slot() function,
the slot_info_t is added.

Change-Id: I487e1eb1172ff667531c7ad2e9c6a1ff3fdf3296
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoMake enumeration for commands 87/284487/1
Hwankyu Jhun [Thu, 17 Nov 2022 22:49:05 +0000 (22:49 +0000)]
Make enumeration for commands

This patch defines enumeration for launchpad commands.

Change-Id: Iee03d39889d7f1b0d2a051d97167f4045f1d23c8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 0.20.1 80/284280/1 accepted/tizen/7.0/unified/20221116.014838 accepted/tizen/unified/20221115.172902
Hwankyu Jhun [Tue, 15 Nov 2022 02:37:57 +0000 (02:37 +0000)]
Release version 0.20.1

Changes:
 - Move calling fork() to main thread

Change-Id: If303c4ccb6c820206133bf0fe0be931eca7c9d6e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoMove calling fork() to main thread 73/284273/1
Hwankyu Jhun [Tue, 15 Nov 2022 00:06:39 +0000 (00:06 +0000)]
Move calling fork() to main thread

After the previous patchset is applied, dyntranstion feature is not working fine
as below:
+------------------------------------------------------------------------------+
| security_manager_sync_threads_internal(671) > Not all threads synchronized:  |
|     threads left: 15                                                         |
| operator()(1013) > Can't properly setup application threads (Smack label &   |
|     capabilities) for application                                            |
+------------------------------------------------------------------------------+
To avoid the issue, creating a child process for a candidate process is moved to
the main thread.

Change-Id: If58914fb04b8b07782f624ffcc1b9342ad1a7b4a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>