You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tribler's GUI process starts the Core process using QProcess. It may be expected that the Core process is a child process and should terminate after the crash of the parent process. But it is not the case. As it turns out, Qt terminates child processes only when the parent process terminates correctly. If the parent process crashes, child processes started with QProcess continue to work.
To reproduce the error you can start Tribler and kill Tribler GUI process (for example, with ProcessExplorer on Windows). You can see that the second tribler.exe process continues to work and tribler-core-info.log/tribler-core-error.log files are used by this process.
In this situation, if Tribler is restarted, Core should stop immediately with the following error:
CoreCrashedError
The Tribler core has unexpectedly finished with exit code 1 and status: 0!
Last core output:
[PID:22891] 2022-08-11 22:50:32,198 - INFO - tribler.core.logger.logger(64) - Config loaded for app_mode=tribler-core
[PID:22891] 2022-08-11 22:50:32,198 - INFO - tribler.core.start_core(174) - Core is already running, exiting
The recommended approach for dealing with this QProcess problem is implementing a heart-beat check in the Core process that checks that the GUI is still alive and terminates Core otherwise. For this, we can have a separate component that monitors the GUI process.
The text was updated successfully, but these errors were encountered:
Tribler's GUI process starts the Core process using
QProcess
. It may be expected that the Core process is a child process and should terminate after the crash of the parent process. But it is not the case. As it turns out, Qt terminates child processes only when the parent process terminates correctly. If the parent process crashes, child processes started with QProcess continue to work.To reproduce the error you can start Tribler and kill Tribler GUI process (for example, with ProcessExplorer on Windows). You can see that the second
tribler.exe
process continues to work andtribler-core-info.log
/tribler-core-error.log
files are used by this process.In this situation, if Tribler is restarted, Core should stop immediately with the following error:
The recommended approach for dealing with this QProcess problem is implementing a
heart-beat
check in the Core process that checks that the GUI is still alive and terminates Core otherwise. For this, we can have a separate component that monitors the GUI process.The text was updated successfully, but these errors were encountered: