Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

assertion left != right failed #18

Closed
xoriole opened this issue Apr 18, 2024 · 2 comments
Closed

assertion left != right failed #18

xoriole opened this issue Apr 18, 2024 · 2 comments
Assignees

Comments

@xoriole
Copy link
Collaborator

xoriole commented Apr 18, 2024

INFO:__main__:Run Tribler: {'torrent': '', 'core': True, 'log_level': 'INFO'}
INFO:__main__:Root state dir: /Users/user/.TriblerExperimental
INFO:tribler.core.start_core:Start tribler core. API port: -1. API key: None. State dir: /Users/user/.TriblerExperimental.
INFO:tribler.tribler_config:Load: /Users/user/.TriblerExperimental/configuration.json.
INFO:Socks5Server:Started SOCKS5 server on port 56373
INFO:Socks5Server:Started SOCKS5 server on port 56374
INFO:Socks5Server:Started SOCKS5 server on port 56375
INFO:Socks5Server:Started SOCKS5 server on port 56376
INFO:Socks5Server:Started SOCKS5 server on port 56377
INFO:tribler.core.libtorrent.download_manager.download_manager:Creating a session
INFO:tribler.core.libtorrent.download_manager.download_manager:Hops: 0.
INFO:tribler.core.libtorrent.download_manager.download_manager:Libtorrent port: 0
INFO:tribler.core.libtorrent.download_manager.download_manager:could not load libtorrent state, got exception: FileNotFoundError(2, 'No such file or directory'). starting from scratch
INFO:tribler.core.libtorrent.download_manager.download_manager:Started libtorrent session for 0 hops on port 56378
INFO:IPv8CommunityLoader:Loading overlay <class 'abc.DatabaseComponent'>
INFO:IPv8CommunityLoader:Loading overlay <class 'ipv8.dht.discovery.DHTDiscoveryCommunity'>
INFO:DHTDiscoveryCommunity:DHT community initialized (peer mid b'c4535557c6dab66105be8f9927bcf002024db5bc')
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.knowledge.community.KnowledgeCommunity'>
INFO:KnowledgeCommunity:Knowledge community initialized
INFO:KnowledgeRulesProcessor:Start
INFO:KnowledgeRulesProcessor:Register process_queue task with interval: 5 sec
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.rendezvous.community.RendezvousCommunity'>
INFO:TrackerManager:No tracker blacklist file found at /Users/user/.TriblerExperimental/tracker_blacklist.txt.
INFO:IPv8CommunityLoader:Loading overlay <class 'abc.TorrentCheckerComponent'>
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.tunnel.community.TriblerTunnelCommunity'>
INFO:TriblerTunnelCommunity:Exit settings: BT=False, IPv8=False
INFO:TriblerTunnelCommunity:Using DispatcherEndpoint with flags {8, 1}
INFO:IPv8CommunityLoader:Loading overlay <class 'tribler.core.content_discovery.community.ContentDiscoveryCommunity'>
INFO:ContentDiscoveryCommunity:Content Discovery Community initialized (peer mid b'c4535557c6dab66105be8f9927bcf002024db5bc')
INFO:IPv8CommunityLoader:Finished loading communities!
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8090 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8091 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8092 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8093 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8094 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8095 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8096 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8097 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8098 (Address already in use (os error 48)). Retrying now.
[2024-04-18T13:29:29Z ERROR rust_endpoint::util] Failed to bind to 0.0.0.0:8099 (Address already in use (os error 48)). Retrying now.
INFO:RESTManager:Starting RESTManager...
INFO:RESTManager:Remove head
apispec/ext/marshmallow/openapi.py:135: UserWarning: Multiple schemas resolved to the name File. The name has been modified. Either manually add each of the schemas with a different name or provide a custom schema_name_resolver.
INFO:RESTManager:Http enabled
INFO:RESTManager:Starting HTTP REST API server on port 56030...
INFO:DownloadManager:Load checkpoints...
INFO:DownloadManager:Checkpoints are loaded
ERROR:RESTManager:Can't start HTTP REST API on port 56030: OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 56030): address already in use
Traceback (most recent call last):
  File "tribler/core/restapi/rest_manager.py", line 153, in start_http_site
  File "aiohttp/web_runner.py", line 119, in start
  File "asyncio/base_events.py", line 1463, in create_server
OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 56030): address already in use
Traceback (most recent call last):
  File "run_tribler.py", line 73, in <module>
  File "run_tribler.py", line 65, in main
  File "tribler/core/start_core.py", line 42, in run_core
  File "asyncio/runners.py", line 43, in run
  File "asyncio/base_events.py", line 616, in run_until_complete
  File "tribler/core/start_core.py", line 21, in run_session
  File "tribler/core/session.py", line 119, in start
  File "tribler/core/restapi/rest_manager.py", line 137, in start
  File "tribler/core/restapi/rest_manager.py", line 153, in start_http_site
  File "aiohttp/web_runner.py", line 119, in start
  File "asyncio/base_events.py", line 1463, in create_server
OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1', 56030): address already in use
[25089] Failed to execute script run_tribler
thread 'tokio-runtime-worker' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.20.3/src/gil.rs:199:21:
assertion `left != right` failed: The Python interpreter is not initialized and the `auto-initialize` feature is not enabled.

Consider calling `pyo3::prepare_freethreaded_python()` before attempting to use Python APIs.
  left: 0
 right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@egbertbouman
Copy link
Collaborator

To me it looks like the interpreter has already shut down for another reason ("address already in use"), but the rust module is still trying to call Python. I'm not sure how a fix would look like.

Restarting the interpreter seems like a bad idea, and there doesn't seem to be a PyO3 function that checks if there's an interpreter running.

My Windows machine seems fine. Is this on MacOS?

@qstokkink
Copy link
Owner

The port claiming has been fixed in #16. If the Rust binding is only making the pre-existing crash worse, it seems valid to close this issue now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants