Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S32-io/IO-Socket-Async.t incorrectly fails when IPv6 is disabled on a host #684

Open
vrurg opened this issue Oct 9, 2020 · 5 comments
Open
Assignees

Comments

@vrurg
Copy link
Contributor

vrurg commented Oct 9, 2020

When IPv6 is system-wide off on a Linux host then the test fails with:

# host=::1
Failed to resolve host name '::1' with family 0.
Error: Address family for hostname not supported
  in block  at t/spec/S32-io/IO-Socket-Async.t line 221
  in block <unit> at t/spec/S32-io/IO-Socket-Async.t line 101

Unfortunately, a quick look into the issue did not reveal a concise and accurate way to resolve it:

  • the exception is thrown from within VM (moar in particular), thus it is X::AdHoc
  • apparently, Raku does not provide a resolver interface, so it is not possible to try to resolve ::1 and test for outcome

The latter is especially surprising to me. I'd expect some basic resolving functionality be provided by the core.

@Kaiepi
Copy link
Contributor

Kaiepi commented Oct 13, 2020

Roast currently assumes that both IPv4 and IPv6 loopback interfaces exist, which is not ideal. If we had a way of working with networking interfaces, then we could determine whether or not any 127.0.0.1 or ::1 addresses exist before attempting to use them. I'm not sure how else you could determine if IPv6 is supported or not by a system without winding up with false positives from issues with DNS resolution or sockets themselves as things currently stand.

With the solution for Raku/problem-solving#111 I'm working on, there would exist resolver interfaces. Whether or not IPv6 addresses can be resolved when it isn't supported by a system is backend-dependent behaviour though.

@vrurg
Copy link
Contributor Author

vrurg commented Oct 14, 2020

I hope that backend-specific issues we'd be able to resolve using conditionals. Otherwise you confirm the conclusions I made after investigating the matter.

Looking forward for your success on the problems-solving issue!

@niner
Copy link
Contributor

niner commented Oct 14, 2020 via email

@AlexDaniel
Copy link
Member

I wonder how much of an issue this is? Systems without v6 should become rarer and rarer. How many of those will want to run roast? OTOH this has been reported, so it is at least one...

Actually pretty common. There were at least two different occasions in the last few years I had to disable ipv6 on my machines because things were misbehaving. I have little reason to change it back given that the connection I have doesn't support ipv6 anyway. Although, the test is passing for me so I guess I reinstalled the system during that time, so locally it is enabled again.

@Kaiepi
Copy link
Contributor

Kaiepi commented Apr 2, 2021

This will be fixable with my solution for https://github.com/Raku/problem-solving/111. PR will be up soon-ish.

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

No branches or pull requests

4 participants