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
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
start Tribler with some torrents
check tribler-core-error.log
See error:
[tribler-core PID:39] 2023-12-18 06:51:58,923 - ERROR <watching_thread:91> tribler.core.utilities.slow_coro_detection._report_freeze(): Slow coroutine is occupying the loop for 1.206 seconds already: <Task pending name='TorrentChecker:check local torrents' coro=<interval_runner() running at ipv8/taskmanager.py:18> cb=[TaskManager.register_task.<locals>.done_cb() at ipv8/taskmanager.py:128]>
Stack for <Task pending name='TorrentChecker:check local torrents' coro=<interval_runner() running at ipv8/taskmanager.py:18> cb=[TaskManager.register_task.<locals>.done_cb() at ipv8/taskmanager.py:128]> (most recent call last):
File "run_tribler.py", line 109, in <module>
File "tribler/core/start_core.py", line 204, in run_core
File "tribler/core/start_core.py", line 174, in run_tribler_core_session
File "asyncio/base_events.py", line 603, in run_until_complete
File "asyncio/base_events.py", line 570, in run_forever
File "asyncio/base_events.py", line 1859, in _run_once
File "tribler/core/utilities/slow_coro_detection/patch.py", line 37, in patched_handle_run
File "asyncio/events.py", line 81, in _run
File "ipv8/taskmanager.py", line 18, in interval_runner
[tribler-core PID:39] 2023-12-18 06:51:59,390 - ERROR <patch:52> tribler.core.utilities.slow_coro_detection._report_long_duration(): Slow coroutine step execution (duration=1.673 seconds): <Task pending name='TorrentChecker:check local torrents' coro=<interval_runner() running at ipv8/taskmanager.py:18> wait_for=<_GatheringFuture pending cb=[<TaskWakeupMethWrapper object at 0x7f3d63a8e160>()]> cb=[TaskManager.register_task.<locals>.done_cb() at ipv8/taskmanager.py:128]>
Desktop (please complete the following information):
OS: Linux Debian 11 oldstable
Tribler's version 7.13.0 (flatpak org.tribler.Tribler)
The text was updated successfully, but these errors were encountered:
Thanks for your report. It seems like there is a heavy database operation running on a thread where it does not belong, on the "main thread".
This will not crash Tribler nor is there any unrecoverable error (@Tribler/reviewers perhaps we should downgrade this to "WARNING" level). That said, this is not good for your client's responsiveness.
The rest of my answer is targeted at developers. This is the code being called in the interval task:
I closed my quick fix of #7796. With the interweaving of asyncio and db calls, it's probably best to solve this in (or, wait for) a big refactoring of the entire torrent checker architecture.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: