Remove calling signal finalization 41/195741/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 17 Dec 2018 23:10:19 +0000 (08:10 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 18 Dec 2018 00:08:02 +0000 (09:08 +0900)
Sometimes, the app process is deadlock while calling the g_object_unref().
While calling fork(), gdbus thread of the parent process has a mutex
locked. In the child, the mutex is in the locked state.
(locked by a nonexistent thread and thus can never be unlocked.)

Backtrace:
 - #0  0xb6132900 in syscall () from /usr/lib/libc-2.24.so
 - #1  0xb63aab90 in g_mutex_lock_slowpath () from /usr/lib/libglib-2.0.so.0.5200.2
 - #2  0xb635bbe4 in g_source_destroy_internal () from /usr/lib/libglib-2.0.so.0.5200.2
 - #3  0xb657f510 in _g_kdbus_worker_stop () from /usr/lib/libgio-2.0.so.0.5200.2
 - #4  0xb65365d4 in g_dbus_connection_dispose () from /usr/lib/libgio-2.0.so.0.5200.2
 - #5  0xb6434720 in g_object_unref () from /usr/lib/libgobject-2.0.so.0.5200.2
 - #6  0x004e1361 in _signal_fini () from /usr/bin/launchpad-process-pool
 - #7  0x004dac9d in __exec_app_process () from /usr/bin/launchpad-process-pool
 - #8  0x004d9f0f in __fork_app_process () from /usr/bin/launchpad-process-pool
 - #9  0x004dc01b in __handle_launch_event () from /usr/bin/launchpad-process-pool

Change-Id: Iaad316621111f2494381f440c3a7fe0ab4473731
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad.c

index 363ba3a..3fa9a2f 100755 (executable)
@@ -571,8 +571,6 @@ static int __exec_loader_process(void *arg)
        char **argv = arg;
 
        _signal_unblock_sigchld();
-       _signal_fini();
-
        _close_all_fds();
        _setup_stdio(basename(argv[LOADER_ARG_PATH]));
 
@@ -1016,7 +1014,6 @@ static int __exec_app_process(void *arg)
                _debug_prepare_debugger(launch_arg->kb);
 
        _signal_unblock_sigchld();
-       _signal_fini();
 
        _delete_sock_path(getpid(), getuid());