-
Notifications
You must be signed in to change notification settings - Fork 6
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
"local and remote addresses" test fails on macOS 11 #88
Comments
@LeeTibbert if you have a chance to take a look at this as well I would be much obliged. I am a bit at a loss what to do next, besides disabling this test in CI. |
@armanbilge I suggest you disable, but not delete, the test whilst I study this. Sorry that it is wasting your time. Don't you just love intermittent failures? Unfortunately, sometimes they are the most informative.
I suspect some form of Anyway, as you surmise, a fix is probably days, not hours away. |
Thank you, this is a small comfort :) |
By "by never see" I mean that it is used in InetAddress* internally. By my reading it is the second assert which is failing
if that is true, I need to look My plan is to clone the epollcat repository onto my macM1 and see if I can |
I've now identified this is a regression in SN 0.4.8. If I take my debug commit 8afb7be and revert the SN update, I now consistently get this as output.
|
Glad this bug is not a University final exam question. |
I am finding that I can avoid having to do a total reboot by "sbt> testsNative/clean" and then re-running my More by the light of day, my brain is totally confuzzled. |
One of the many changes in InetAddress* that happened between SN 0.4.7 and 0.4.8 is that I am still tracing trying to figure out what is going on here and what should be going on here. |
A quick note as I end my sprint. The reported bug also occurs on macOS 12.6 M1 hardware. It happens intermittently, almost always as It looks like the fix in SN 0.4.8 to follow ScalaJVM java behavior in preferring "localhost" as an IPv4mapped IPv6 It appears that macOS I have not tried on Linux or other operating systems. I also need to check I have a provisional fix to epollcat SocketHelpers#toInet6SocketAddress which I hope to Even though this appears to be a macOS quirk, my current thinking is to enable the I had been suspecting |
Thanks for all your investigating!
I see. A "quick" seems appropriate indeed. I look forward to seeing your fix :) Could I am also curious if or how other libraries work around this quirk, or even the JDK itself. |
There is a rat's nest of applicable and obsoleted RFC's and drafts (which may
Section 2.5.5.2 goes on the describe the "IPv4-Mapped IPv6 Address" (::FFFF:127.0.0.1) These days, the ::0000:127.0.0.1 is almost always considered a mistake.
As I think you demonstrated earlier, one can create them explicitly and they are not forced to
If we want to maintain that behavior, and I think we do and I think your last entry What do you think (beyond, "I am glad I never became a network engineer. And I thought async was |
Ok, thanks, so if I understand correctly the single unique interpretation of Thanks for quoting the RFC. That was helpful. I think 😅 Your "quick quirk correction" sounds good to me! |
Fix #88: make epollcat more robust to macOS IPv6 getsockname quirk
This has becoming a recurring issue. I first observed it in #85 (comment).
So far I've only seen this test failure on macOS, and possibly only macOS 11, but I am less certain of that.
The issue seems to be that
getsockname
on a client socket sometimes returns0:0:0:0:0:0:7F00:1
. (Is this a valid address for localhost?)I believe it is should be returning
127.0.0.1
aka0:0:0:0:0:FFFF:7F00:1
.I've pushed a commit that adds debug logging for the output of
getsockname
in 8afb7be. When I run it, I frequently (but not always) get a test failure like this:The text was updated successfully, but these errors were encountered: