Mateusz Moscicki [Fri, 16 Jun 2023 08:18:29 +0000 (10:18 +0200)]
Add step that forces private connections in libsyscommon
This is used to ensure that applications launched by launchpad get their
own connection with the appropriate label, rather than using the
connection that was established before the label change.
Change-Id: I1536904207b2b73a5478c6bde973c0e9296a8f87
Hwankyu Jhun [Thu, 22 Jun 2023 09:27:58 +0000 (09:27 +0000)]
Revert "Fix wrong sigchild handler"
This reverts commit
6c22de6fcbb73202fd9e040e641d40d04d708d7b.
Change-Id: Ib8b095cf2a3ed12bf4bc3f4e28a0456ab23160d1
Hwankyu Jhun [Thu, 22 Jun 2023 09:27:23 +0000 (09:27 +0000)]
Revert "Fix a bug about sigchld handler"
This reverts commit
62f6437b97d2b229d43bd0cc3d3c14ba6badc499.
Change-Id: I54b772c7c61c9c0954c85fc189456d68e09c2f4a
Hwankyu Jhun [Thu, 22 Jun 2023 05:55:21 +0000 (05:55 +0000)]
Release version 0.35.3
Changes:
- Fix a bug about sigchld handler
Change-Id: Idbb1a2b694d783e0a1133a1b24fb907321bd2552
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 22 Jun 2023 05:41:00 +0000 (05:41 +0000)]
Fix a bug about sigchld handler
When calling the OnSigchldReceived() of the EventListener, the pid and
the status should be set properly.
Change-Id: Icc5b1fd0875dc92c3bf513e0e3afe12d6b6e538a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 22 Jun 2023 02:09:12 +0000 (02:09 +0000)]
Release version 0.35.2
Changes:
- Remove exit() call
- Fix wrong sigchild handler
Change-Id: Ib5ce2d196cd7dbd1065da75f538bd7448963b088
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 22 Jun 2023 01:55:07 +0000 (01:55 +0000)]
Fix wrong sigchild handler
The event listener should be called when getting the sigchld signal.
Change-Id: I9dc085b04237c1df3df84f73b1345032c4fe9cc3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 22 Jun 2023 00:50:55 +0000 (00:50 +0000)]
Remove exit() call
Even if execv() call is failed, the launchpad-loader must not call the exit().
It can cause the deadlock issue if the library does not consider caling
exit handlers immediately.
Change-Id: Ieae9da9c9a5162a4dc5da3d78460a8e02c7cdf5d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 21 Jun 2023 06:01:50 +0000 (06:01 +0000)]
Release version 0.35.1
Changes:
- Fix a bug related to the onboot timer setting
Change-Id: Ia658884279b791581148761501a8a03b00dd59c8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 20 Jun 2023 22:42:59 +0000 (22:42 +0000)]
Fix a bug related to the onboot timer setting
Before setting the onboot timer, the launchpad checks whether the loader context
was prepared or not. Unfortunately, the touched flag was not set.
This patch add the flag set in the Prepare() method.
Change-Id: Id6be61426bb2d3d2a86f350a159900ae41e890a5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 20 Jun 2023 06:28:34 +0000 (06:28 +0000)]
Release version 0.35.0
Changes:
- Remove blocking and unblocking all sub threads
- Support Launch Mode
Change-Id: I1d1e2f56c1bf288817b98c21770feffcaf4f14d0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 20 Jun 2023 01:24:45 +0000 (01:24 +0000)]
Support Launch Mode
The platform developer can set the launch mode of the app execution about
the loader using the configuration file.
There are 4 modes as below:
1. Mode=Previous_Operation:
- This mode is the original behavior. If the loader is not preapred,
the application will be executed using fork() & execv().
2. Mode=Default_Operation:
- This mode is the default behavior from Tizen 8.0.
- If the loader is not prepared and the loader is running, the launchpad
waits until the loader is prepared. And then, the launch request will
be delivered to the loader process.
3. Mode=Always_Loader:
- This mode is that the application will be always executed using
the loader process.
- Even if the loader process is not executed, the launch request will
be delivered to the loader process.
- If the loader process is not executed, the launchpad executes
the loader process when getting the launch request.
- After processing the launch request, the launchpad executes the loader
process when the pending request exists.
4. Mode=Always_Loader_Without_CPUChecker:
- This mode is the modified version of the "Mode=Always_Loader".
- The loader process will be executed after processing the launch request.
Change-Id: I95c7be50f4e8e79b7c490b03ecf1733c1a3f1aed
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 20 Jun 2023 04:37:11 +0000 (04:37 +0000)]
Remove blocking and unblocking all sub threads
If the launchpad library tries to block the sub thread, the main thread
can be blocked. Because, if the sub thread calls the dlsym(), the global
mutex is locked. In this case, the main thread can be blocked by the mutex.
+------------------------------------------------------------------------------+
| Thread 22 (Thread 0xa5bf9250 (LWP 8524)): |
| #0 0xb60cc754 in pthread_cond_wait@@GLIBC_2.4 () from |
| target:/lib/libpthread.so.0 |
| #1 0xb5fe5c84 in std::condition_variable::wait( |
| std::unique_lock<std::mutex>&) () from target:/lib/libstdc++.so.6 |
| #2 0xaf315a90 in launchpad::ThreadControl::SignalHandler(int) () from |
| target:/lib/liblaunchpad.so.0 |
| #3 <signal handler called> |
| #4 0xb60d06c4 in __lll_lock_wait () from target:/lib/libpthread.so.0 |
| #5 0xb60c7de8 in pthread_mutex_lock () from target:/lib/libpthread.so.0 |
| #6 0xb60e9098 in dlsym () from target:/lib/libdl.so.2 |
| |
| Thread 1 (Thread 0xb61be010 (LWP 5386)): |
| #0 0xb60d06c4 in __lll_lock_wait () from target:/lib/libpthread.so.0 |
| #1 0xb60c7de8 in pthread_mutex_lock () from target:/lib/libpthread.so.0 |
| #2 0xb619f6d4 in _dl_lookup_symbol_x () from target:/lib/ld-linux.so.3 |
| #3 0xb61a3d00 in _dl_fixup () from target:/lib/ld-linux.so.3 |
+------------------------------------------------------------------------------+
Change-Id: I98ab129dabcc73e9fc7457ea400cab735bd3e4a2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Changgyu Choi [Tue, 20 Jun 2023 00:29:50 +0000 (09:29 +0900)]
Release version 0.34.1
Changes:
- Fix build error
Change-Id: I419370759eac2ccf4d12b403ebb5b265a9d81053
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Changgyu Choi [Tue, 20 Jun 2023 00:21:00 +0000 (09:21 +0900)]
Fix build error
In 64bit build system, uint64_t is mapped to unsigned long int.
Therefore, when printing uint64_t, it should be cast as unsigned long long.
Logs:
[ 209s] /home/abuild/rpmbuild/BUILD/launchpad-0.34.0/src/app-defined-loader/app-defined-loader.cc: In member function 'void launchpad::loader::AppDefinedLoader::PreloadLib(tizen_base::Bundle)':
[ 209s] /usr/include/dlog/dlog-internal.h:72:31: error: format '%llu' expects argument of type 'long long unsigned int', but argument 8 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
Change-Id: Ia59a6f765d70040037a031a0715a7622166e19fb
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Changgyu Choi [Mon, 19 Jun 2023 08:08:11 +0000 (17:08 +0900)]
Release version 0.34.0
Changes:
- Add status to AUL_DBUS_APPDEAD_SIGNAL
- Modify app-defined-loader
- Refactor launchpad loader
Change-Id: I6e4a75a8d68d45bca046ad214a7876128cfe0200
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Hwankyu Jhun [Mon, 19 Jun 2023 03:37:28 +0000 (03:37 +0000)]
Refactor launchpad loader
The launchpad-loader is implemented using C++ language.
Change-Id: I9882c1c80fabd0ae81cb26fe4ac1dd72a0c19911
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 19 Jun 2023 05:33:31 +0000 (05:33 +0000)]
Modify app-defined-loader
The app-defined-loader uses the launchpad library.
This patch removes codes of lib/common directory.
Change-Id: Ied95a2cc31afb66796a47e4108af81fb1632f709
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Changgyu Choi [Fri, 16 Jun 2023 03:38:39 +0000 (12:38 +0900)]
Add status to AUL_DBUS_APPDEAD_SIGNAL
When an app terminates, launchpad sends app_dead signals including
exit status.
Change-Id: I0ab5a0ccdbe8a0266c257dc40a0f96b03c184b11
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Hwankyu Jhun [Mon, 19 Jun 2023 01:02:38 +0000 (01:02 +0000)]
Release version 0.33.7
Changes:
- Revert "Add debugging logs"
Change-Id: I96ba296e5eb18ef87b040d4e46f84ef0adabffc8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Sun, 18 Jun 2023 22:42:57 +0000 (22:42 +0000)]
Revert "Add debugging logs"
This reverts commit
02e70912d79139a01df4aa06a013084b24460da5.
The issue was related to memory creation in the sub thread.
Change-Id: Ie019f0e2e13b5489f789631168bd68f9a3ed2c96
Hwankyu Jhun [Fri, 16 Jun 2023 06:24:03 +0000 (06:24 +0000)]
Release version 0.33.6
Changes:
- Initialize threads before running main loop
Change-Id: I9f563531f086d24474421c06db15dba133709fe6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 16 Jun 2023 05:56:21 +0000 (05:56 +0000)]
Initialize threads before running main loop
This patch adds the DBus::Init() call in the OnCreate() of Launchpad
to avoid a blocking issue of the child process.
If a new child process is creating while creating the thread, the child
process can be blocked when the child process tries to allocate the memory.
The initialization of the cleaner thread is moved.
Change-Id: I3c93eca912c69051523651a8b9892eaf4b718b8a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 16 Jun 2023 04:18:21 +0000 (04:18 +0000)]
Release version 0.33.5
Changes:
- Add debugging logs
Change-Id: If35e15ebf6a582d7ea9de732da10fde9d9f171f7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 16 Jun 2023 02:29:51 +0000 (02:29 +0000)]
Add debugging logs
This patch is for debugging.
Change-Id: I49cda06d89c00a4c4c645bd4bee55c4ec14edd4f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 15 Jun 2023 04:51:54 +0000 (04:51 +0000)]
Release version 0.33.4
Changes:
- Fix launchpad loader library
Change-Id: I8c39382631b5f04ce17394b803b1e5f5767edbc4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 15 Jun 2023 04:34:53 +0000 (04:34 +0000)]
Fix launchpad loader library
When the terminate callback returns an error, the launchpad_loader_main()
should return with the error value.
Change-Id: Iae5cdedb0869e7c4ece0bdb96f026bba2155e59c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 13 Jun 2023 08:16:24 +0000 (08:16 +0000)]
Release version 0.33.3
Changes:
- Add missing redirection
- Modify CloseAllFds method
Change-Id: Ie2e31d409d34a0e82a1f0fc244a6bcb192e9bdf3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 13 Jun 2023 07:50:16 +0000 (07:50 +0000)]
Modify CloseAllFds method
While searching the fd directory using std::filesystem::directory_iterator,
we can close the file descriptor of the directory_iterator. In this case,
the std::filesystem::filesystem_error exception will be thrown.
To avoid throwing the exception, the method uses std::vector to store
file descriptors. And then, the method closes all file descriptors using
the vector.
Change-Id: I281ba065ec1a8b90d90791a31f4abe3e4724fad3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 12 Jun 2023 05:20:55 +0000 (05:20 +0000)]
Add missing redirection
If calling dlog_connect_fd() is failed, the launchpad should try to
redirect fd to null node.
Change-Id: I8bb2a2d2a585b7c0e1eff9e3ba958801a5bf49e6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 12 Jun 2023 03:55:03 +0000 (03:55 +0000)]
Release version 0.33.2
Changes:
- Add setting enviornment variable
Change-Id: I704189c846c70ff1199e6dbb99a1c70ce5854218
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 12 Jun 2023 03:42:06 +0000 (03:42 +0000)]
Add setting enviornment variable
"DALI_DISABLE_PARTIAL_UPDATE" is added for dali library.
Change-Id: If4180e4206301283583bae592dcd319ba6bf59c0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 12 Jun 2023 02:31:55 +0000 (02:31 +0000)]
Release version 0.33.1
Changes:
- Fix a bug about setting LD_LIBRARY_PATH
Change-Id: Ib86371ae60073986666e9bd086625d8b037d4ba4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 12 Jun 2023 02:27:42 +0000 (02:27 +0000)]
Fix a bug about setting LD_LIBRARY_PATH
The path of the LD_LIBRARY_PATH should be
'<app_root_path>/bin/<executable_file>/../lib/".
Change-Id: I6062208fe217d17298132a8edeb2244e047b17e1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 7 Jun 2023 07:30:11 +0000 (07:30 +0000)]
Release version 0.33.0
Changes:
- Refactor launchpad common library
- Adjust log messages
- Fix a bug about debug mode
Change-Id: Iff40715cb58cc2a109ef29fb4be1358b5b5fca3a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 7 Jun 2023 07:24:48 +0000 (07:24 +0000)]
Fix a bug about debug mode
The EXE tag can be empty. Unfortunately, the launchpad does not check
whether the exe is empty or not. This patch adds the empty check before
inserting the exe path to the vector.
Change-Id: I2f86449d24364f3a805ed026020c4e14459c9a23
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 5 Jun 2023 08:48:12 +0000 (08:48 +0000)]
Adjust log messages
Some log level is changed to debug level from warning level.
And, wrong log message is fixed.
Change-Id: I40b340ad60974c8926a37a168e513f6880bf0331
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 5 Jun 2023 04:30:36 +0000 (04:30 +0000)]
Refactor launchpad common library
The common library is implemented using C++ language.
Change-Id: I34759ccb4098af00bd484e77be6a63d67fb3c8dc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 2 Jun 2023 07:14:48 +0000 (07:14 +0000)]
Release version 0.32.1
Changes:
- Modify default loader configuration file
- Fix wrong implementation of launchpad library
Change-Id: I1b924bcbe0b05214dcd5f8014238693f87e3c8aa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 2 Jun 2023 06:50:27 +0000 (06:50 +0000)]
Fix wrong implementation of launchpad library
The context pointer must not be the unique_ptr. If it's the unique_ptr,
the unique_ptr tries to release the pointer.
Change-Id: I3e961ebdae813e685095a4b9c74b1221c8799860
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 2 Jun 2023 00:09:43 +0000 (00:09 +0000)]
Modify default loader configuration file
The name of the dali toolkit library is changed to libdali2-toolkit.so.
Change-Id: I27af311c462b41c6bf2f17c5dc8eb7e98b90c446
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 1 Jun 2023 22:05:54 +0000 (22:05 +0000)]
Release version 0.32.0
Changes:
- Refactor Launchpad Library
- Block and unblock threads
Change-Id: Id223483ee6f2404214df03170b4d6acaf119a1db
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 1 Jun 2023 07:34:05 +0000 (07:34 +0000)]
Block and unblock threads
Before calling the security_manager_prepare_app2() function, all threads
of the loader process MUST be blocked not to make a new thread or
terminate itself. This patch blocks all sub threads using real-time signal
and condition variable. After calling the function, the main thread of
the loade process sends the signal to unblock all sub threads using
condition variable.
Change-Id: I60e0e102f62fe8327fa844072b3017075e1692fa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 26 May 2023 01:15:30 +0000 (01:15 +0000)]
Refactor Launchpad Library
The launchpad library is impemented using C++ language.
Change-Id: I191aca9713f8771806a2516374d0710185ab9993
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 25 May 2023 04:47:47 +0000 (04:47 +0000)]
Release version 0.31.3
Changes:
- Fix static analysis issues
- Fix a bug about creating a loader process of hydra loader
- Modify setting scheduling priority
Change-Id: I780741702fa9cb1b91958dad069435b9053ceecf
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 24 May 2023 08:51:34 +0000 (08:51 +0000)]
Modify setting scheduling priority
To set the scheduling priority properly, the launchpad-process-pool
sends the priority to the child process. And, after calling fork(),
the child process creates a new session using setsid().
The argument of the setpriority() is changed to PRIO_PGRP from PRIO_PROCESS.
The hydra loader changes the priority to 0 to restore to its original state.
Change-Id: Ie5d5d6d55493934c7706b32789d35697d05285d6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 25 May 2023 02:32:24 +0000 (02:32 +0000)]
Fix a bug about creating a loader process of hydra loader
The argument that is the loader type is overwritten.
This patch copies the arguments and uses it when executing a child process.
Change-Id: Ic6a86c6a9d544ef90f0976041d92fa1145735551
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Changgyu Choi [Thu, 25 May 2023 01:52:12 +0000 (10:52 +0900)]
Fix static analysis issues
Changes:
- Initializes uninitialized attributes.
Change-Id: Ieb43c2e5eb9db7d31dd262055b114353bcbe432e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Changgyu Choi [Tue, 23 May 2023 01:43:18 +0000 (10:43 +0900)]
Release version 0.31.2
Changes:
- Fix gsource timer deletion
Change-Id: Ic5e5d901520a38b6bb21194b563f96b7cb2b92ab
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Changgyu Choi [Mon, 22 May 2023 09:47:08 +0000 (18:47 +0900)]
Fix gsource timer deletion
This implementation error cause invalid removing source.
Change-Id: I1dea3071aed99576d737ee4c9be00f7a688f9e6b
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Hwankyu Jhun [Fri, 19 May 2023 04:16:39 +0000 (04:16 +0000)]
Release version 0.31.1
Changes:
- Send result while handling the launch request
- Fix a bug about debugging application
- Modify plugin initialization of app-defined-loader
- Modify launch request handling
Change-Id: If637b4dfb33cf079ee35fb2f89713670f8ef3e1f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 19 May 2023 01:03:57 +0000 (01:03 +0000)]
Modify launch request handling
If the loader context is not prepared, the launchpad does not wait for
the loader is ready. Even if it's not prepared, the launchpad wait until
the loader is ready when the loader is hydra mode.
And, When setting the process ID of the loader context, the launchpad
sends the result to the caller if it is pending.
Change-Id: I35674ab5727644cacf3e3770e252e4a2a462c9f0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 15 May 2023 23:11:53 +0000 (23:11 +0000)]
Modify plugin initialization of app-defined-loader
To avoid delay issue, caling _launchpad_plugin_prepare_app() is moved.
Change-Id: I1cf605fc43d1d75712640bb25fd5dcbbc5d2fc47
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 18 May 2023 08:19:27 +0000 (08:19 +0000)]
Fix a bug about debugging application
When the debugger info is loaded first, the candidate process of
the process pool could not load the debugger info properly.
This patch modifies that the launchpad behavior after loading
the debugger info. To debug application properly, the launchpad
terminates the candidate process to make not using it.
Change-Id: I483d32b8712712b5f80f9f5579808b1ac493139a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 16 May 2023 04:01:54 +0000 (04:01 +0000)]
Send result while handling the launch request
Even if the loader process is not prepared, the launchpad-process-pool
sends the result to the amd. If the initialization of the loader process
is delayed, the caller process cannot get the launched process ID.
To ensure consistency of operation of handling the launch request, the caller
has to get the result from the amd.
Change-Id: Idd523c2a1d3743a39d743833adc801ddb02e2f1a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 12 May 2023 04:58:39 +0000 (04:58 +0000)]
Release version 0.31.0
Changes:
- Fix a bug about app-defined-loader
- Modify app-defined-loader for linux container
- Refactor Launchpad Hydra
- Add ProcessPool config
- Enable Cpu checker
Change-Id: Ic7f0fd33eec0769294662f9e7a9afb2f078fa117
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 12 May 2023 04:50:21 +0000 (04:50 +0000)]
Enable Cpu checker
The default value of the cpu checker enablement is changed to "true".
Change-Id: I00c8df8b593469cb629c2e4387c84d73e64c9e1f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 9 May 2023 09:33:28 +0000 (09:33 +0000)]
Add ProcessPool config
This patch adds process pool config to provide changes in the number of
process pool. The product or platform developer can modify the number of
process pool using the config file.
The default value of the number of the process pool is one.
Change-Id: I8d7d4688de66dff70d3b39a4f589d2b2c0617add
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 3 May 2023 03:54:45 +0000 (03:54 +0000)]
Refactor Launchpad Hydra
The launchpad hydra libary is implemented using C++ language.
The process pool is added to the hydra loader. And, this patch decreases
the number of the process pool of executors to one from two.
The liblaunchpad-glib library is added to separate the libary related to
glib from the liblaunchpad-common library.
It's for the liblaunchpad-hydra library.
Change-Id: I434e9612e2b1c3c2cfe9ac174c7175d16ddda842
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 3 May 2023 06:57:40 +0000 (06:57 +0000)]
Modify app-defined-loader for linux container
Some product developer wants to use the app-defined-loader for executing
an application which will be attached to the linux container.
This patch adds the plugin function call while calling the OnCreate() method.
Change-Id: Ied702faffcc6097b22f71646ee1a21f318b5ab31
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Wed, 3 May 2023 06:26:13 +0000 (06:26 +0000)]
Fix a bug about app-defined-loader
The arguments has to be changed before executing an application.
Change-Id: I64d97656bd8e8481ff3711e7f9904ceb51228957
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 2 May 2023 00:21:50 +0000 (00:21 +0000)]
Release version 0.30.8
Changes:
- Fix bug about handling app labels changes event
Change-Id: I123ea87900ef4305ee3f4778211fc7e124edf77f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 2 May 2023 00:13:10 +0000 (00:13 +0000)]
Fix bug about handling app labels changes event
Before disposing and preparaing the loader context, the launchpad has to
dispose the candidate process of the process pool.
Change-Id: Id80371087d2172399482d0350226e23c7b323e55
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Fri, 28 Apr 2023 00:58:27 +0000 (00:58 +0000)]
Release version 0.30.7
Changes:
- Dispose candidate process of process pool
Change-Id: Idf1c133d682b04e1677a7291c216d636ef411127
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Thu, 27 Apr 2023 23:43:39 +0000 (23:43 +0000)]
Dispose candidate process of process pool
When the app label changed event is received, the launchpad has to terminate
all candidate processes. If it's not, calling the security_manager_prepare_app2()
will be failed when executing an application.
Change-Id: I730bfc0fa5126743d2bd80c541d131ae581ad931
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Changgyu Choi [Tue, 25 Apr 2023 03:04:02 +0000 (12:04 +0900)]
Release version 0.30.6
Changes:
- Add missing function call
Change-Id: I9c775f949874d5f94e3b2bb9d6b2358a21aa9ec4
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
Hwankyu Jhun [Tue, 25 Apr 2023 02:38:10 +0000 (02:38 +0000)]
Add missing function call
To prevent crash issues, ExecuteEcho() should be called before calling exit()
with the error code.
Change-Id: I1e745cd752bac61381af35d84875bbaf5239c861
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Tue, 25 Apr 2023 01:49:34 +0000 (01:49 +0000)]
Release version 0.30.5
Changes:
- Prevent crash issue
Change-Id: Icf68e558751e442e83b3d6f502dd3a4075690b4a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 24 Apr 2023 23:23:49 +0000 (23:23 +0000)]
Prevent crash issue
When an app fails to run, the child process can crash while accessing
the thread code created by the parent process. This patch is to avoid
the crash issue. When it's failed, the child process executes the "echo" tool to
reload the memory state.
Change-Id: I53a16048f528c72159af5f50032bfffa6a77b7b7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 24 Apr 2023 09:15:35 +0000 (09:15 +0000)]
Release version 0.30.4
Changes:
- Improve launchpad initialization
Change-Id: I127c196dddc0423b787fa26481eeb2fb2a703c21
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 24 Apr 2023 08:42:49 +0000 (08:42 +0000)]
Improve launchpad initialization
To improve launchpad initialization, this patch applies to do boost to
the launchpad-process-pool.
Change-Id: I51d92d151254ba5e3909e70bf6e625b7d553d214
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 24 Apr 2023 05:04:21 +0000 (05:04 +0000)]
Release version 0.30.3
Changes:
- Fix a bug about pending request
Change-Id: Ia5901ae70201dee02b3a792c935e08318fb9e65e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Hwankyu Jhun [Mon, 24 Apr 2023 04:42:08 +0000 (04:42 +0000)]
Fix a bug about pending request
When the loader process is preparing, the request will be pended.
In this case, the OnLoaderPrepared() method has to be called.
Unfortunately, there was a bug about that. If the loader manager does
not set the timer, the method cannot be called.
Change-Id: I330974ce62f761b01f5ac09116927f31aaf43b22
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>