Skip to content

TSIv3 breaks networking (at least) on a MacOS host due to AF_UNIX inclusion #105

@ggoodman

Description

@ggoodman

When using a kernel build with TSIv3 and libkrun, I'm unable to perform certain simple operations in the guest:

  1. curl https://google.com
  2. ps aux
  3. /bin/bash

Both of these hang with no output. Enabling libkrun logs show that both of these make indirect use of DNS and result in the use of /var/run/nscd/socket. On the host, libkrun errors, with the message: AFUNIX sockets aren't yet supported on MacOS. AFAICT, this failure doesn't seem to get propagated back to the guest because the guest remains in a hung state on failures of this sort.

I have been able to demonstrate to myself that AF_UNIX hijacking is the culprit. I modified the 0010-tsi-allow-hijacking-sockets-tsi_hijack.patch to skip hijacking AF_UNIX. Doing so allowed these basic operations to work.

When doing curl https://google.com in such a setup, I notice that I get whole bunch of ERROR level devices::virtio::vsock::tsi_stream logs with the message EventSet::OUT while not connecting.

Perhaps an interesting middle-ground would be TSIv3 where there's an extra config to opt into / out of AF_UNIX hijacking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions