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
Slow coroutine execution: 18.317 seconds,
<Task pending name='Task-9' coro=<Component.start() running at src\<relief>\core\components\component.py:42> cb=[gather.<locals>._done_callback() at C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\tasks.py:751]>,
Traceback (most recent call last):,
File "src\<relief>\core\start_core.py", line 206, in run_core (function started 22.815 seconds ago),
File "src\<relief>\core\start_core.py", line 169, in run_tribler_core_session (function started 21.971 seconds ago),
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 603, in run_until_complete (function started 21.928 seconds ago),
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 316, in run_forever (function started 21.928 seconds ago),
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 570, in run_forever (function started 21.928 seconds ago),
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1859, in _run_once (function started 18.317 seconds ago),
File "src\<relief>\core\utilities\slow_coro_detection\patch.py", line 37, in patched_handle_run (function started 18.317 seconds ago),
File "C:\Users\<relief>\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 81, in _run (function started 18.317 seconds ago),
File "src\<relief>\core\components\component.py", line 42, in start (function started 18.317 seconds ago),
File "src\<relief>\core\components\libtorrent\libtorrent_component.py", line 31, in run (function started 18.317 seconds ago),
File "src\<relief>\core\components\libtorrent\download_manager\download_manager.py", line 150, in initialize (function started 18.316 seconds ago),
File "src\<relief>\core\components\libtorrent\download_manager\download_manager.py", line 340, in get_session (function started 18.316 seconds ago),
File "src\<relief>\core\components\libtorrent\download_manager\download_manager.py", line 310, in create_session (function started 18.316 seconds ago)
Here:
defcreate_session(self, hops=0, store_listen_port=True):
...
# Set listen port & start the DHTifhops==0:
ltsession.listen_on(libtorrent_port, libtorrent_port+10)
iflibtorrent_port!=ltsession.listen_port() andstore_listen_port:
self.config.port=ltsession.listen_port()
try:
withopen(self.state_dir/LTSTATE_FILENAME, 'rb') asfp:
lt_state=bdecode_compat(fp.read())
iflt_stateisnotNone:
ltsession.load_state(lt_state) # line 310
...
It looks like load_state can be very slow, we should consider calling it outside of the asyncio event loop.
The text was updated successfully, but these errors were encountered:
I'll switch over self.ltsessions: dict[int, lt.session] = {} to self.ltsessions: dict[int, Future[lt.session]] = {} and schedule each create_session on a thread.
https://sentry.tribler.org/organizations/tribler/issues/2798/events/491a11cdad524e96956ff63bf12f943a/
Here:
It looks like
load_state
can be very slow, we should consider calling it outside of the asyncio event loop.The text was updated successfully, but these errors were encountered: