◈ 9ce92808be498e9e05590ff27cbfdfe4
RNS 1.4.2 released https://pypi.org/project/rns/
Forum / Help / macOS autoconnect discovery tries to use BackboneInterface

macOS autoconnect discovery tries to use BackboneInterface

Started by ozCleric 1747e565d5d11f4c... ·

ozCleric 1747e565d5d11f4c...

Hello Mark,I think I've found a bug with interface discovery/autoconnect on macOS in RNS 1.4.2. I'm running RNS 1.4.2 installed with pipx on a Mac mini. RNS is using Python 3.12.13. I have: autoconnect_discovered_interfaces = 4 I'm getting errors when RNS tries to connect to discovered BackboneInterfaces: An interface error occurred for BackboneInterface[...]: module 'select' has no attribute 'epoll' I checked the Python environment RNS is actually running under and get: epoll available: False kqueue available: True I understand BackboneInterface itself isn't supported on macOS, so that's expected. The odd bit is that autoconnect seems to be trying to create a BackboneClientInterface on macOS anyway. I had a look through Discovery.py and BackboneInterface.py. Discovery.py seems to know about this limitation when generating discovered interface configs. It checks for Darwin and falls back to TCPClientInterface. But the autoconnect path looks like it uses the advertised interface type directly. If the remote advertises BackboneInterface it creates a BackboneClientInterface. That then ends up in BackboneInterface.ensure_epoll(), which calls select.epoll(), and fails on macOS. So I think the issue is specifically with autoconnect of discovered BackboneInterfaces on Darwin, rather than BackboneInterface not supporting macOS generally. For now I've set: autoconnect_discovered_interfaces = 0 and I'm using TCPClientInterface manually for backbone endpoints. It looks like autoconnect probably needs to check the local platform before creating BackboneClientInterface, or use TCPClientInterface on Darwin in the same way the discovered config generation already does. Happy to post the full logs/config if they're useful. ozCleric

ozCleric 1747e565d5d11f4c...

Oh I really should have checked the formatting for that post, oops sorry…

Anonymous

It does exactly the same thing on Windows last I checked, if you enable interface discovery it spams logs and fails to actually make any interfaces

ozCleric 1747e565d5d11f4c...

Correct. On Windows the autoconnect path bypasses the degradation logic: backbone_support = ( not RNS.vendor.platformutils.is_windows() and not RNS.vendor.platformutils.is_darwin() ) It then directly constructs BackboneClientInterface when the remote advertises itself as a BackboneInterface.

Anonymous

Perhaps nodes could just advertise themselves as TCPInterface so every other node knows it's compatible and can swap out TCPInterface and BackboneInterface

Post a Reply

Markdown

Supports Markdown: **bold**, *italic*, `code`, ```code blocks```, [links](url)

Log in to upload images

Proof of work verification for anonymous posting

Copied to clipboard