angr/archr

MacOS Support

ConnorNelson opened this issue · 6 comments

Networking for docker containers on MacOS is bad. We either need to perform networking via another container on the same network as the target container, or forward ports to the host.

We need to make shellphish_qemu optional, since MacOS cannot install it.

Exposing to the host is an issue, because the socket becomes unusable if we connect before the port is available, with no way to detect the failure.

Can you elaborate on what the issue with docker networking on macos is?

By default, when you start up a docker container, it gets its own network namespace and is assigned it's own IP address. MacOS's docker implementation does not allow you to talk to this IP address. As far as I can tell, the only options are to either forward the port from the host, or to create another container in the same network namespace / network and communicate via that container.

Unfortunately, forwarding the port from the host seems to create a really strange issue where socket connections don't fail to connect when the port isn't yet being bound by the target. This results in a socket that python lets you send data to without complaint, and receives an empty string back (both without any exceptions). However, archr relies on exceptions when connecting to continuously retry connections until the service has actually fully started.

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

This issue has been closed due to inactivity.