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

Demo: do not use glue code for accept4 #53

Closed
wants to merge 1 commit into from

Conversation

armanbilge
Copy link
Owner

@LeeTibbert following up on #50 (comment). I removed the @name to delegate directly to the method without the glue code.

Fails locally with:

==> X epollcat.TcpSuite.local and remote addresses 0.01s munit.ComparisonFailException: /workspace/epollcat/tests/shared/src/test/scala/epollcat/TcpSuite.scala:119
118:                assertEquals(clientRemote, serverLocal)
119:                assertEquals(serverRemote, clientLocal)
120:              }
values are not the same
=> Obtained
/A00:D032:0:0:0:0:0:0:0
=> Diff (- obtained, + expected)
-/A00:D032:0:0:0:0:0:0:0
+/0:0:0:0:0:0:0:1:53298

@armanbilge armanbilge mentioned this pull request Sep 13, 2022
@LeeTibbert
Copy link
Collaborator

Ah! The heavy weight of the past! I think I owe you a beverage for this one.

Just a day or two ago I wrote you a "heads up" that the sockaddr_in6 structure
is declared wrong (for overlay) in SN 0.4.n. I bet that is what is going on here.

Let me study it. Time taken to write tests sure pays off.

@armanbilge
Copy link
Owner Author

armanbilge commented Sep 13, 2022

Ah, now we come full circle 😂

Yes, I was aware of these issues, since you first mentioned them in scala-native/scala-native#2626 and said they required binary-breaking changes to fix. That is why I wrote in #3 that I believed IPv6 to be very broken in SN 0.4.x, both in Javalib and Posixlib. Please tell me that is not the case 😂

Edit: er, nvmd, I may be confusing issues, sorry 😕 in any case I hope we find a way to make this all work.

@LeeTibbert
Copy link
Collaborator

LeeTibbert commented Sep 13, 2022

I believe this PR can be closed, possibly with a note in the accept4 C code that it can go away
once 0.4.n is no longer supported.

Re: believed IPv6 to be very broken in SN 0.4.x, both in Javalib and Posixlib

With one small exception dealing with UDP methods, posixlib IPv6 should be healthy in 0.4.n
if you discover anything, I ought to fix it.

You are entirely correct that Javalib IPv6 is, IMO, busted beyond backport. We have been
living a lot of those reasons the past few days. epollcat has the liberty to implement some
things that are "too much change" for a stable release stream.

Your getting IPv6 to work in epollcat based on SN 0.4.n was pretty bold but seems
to be paying off.

@LeeTibbert
Copy link
Collaborator

An upcoming LLVM (15? just out) is going the support "randomize structures". Now
that ought to make life interesting. A pretty useless flag for user code, but
somebody is going to do it.

@armanbilge
Copy link
Owner Author

Phew, ok thanks for calming my fears :)

@armanbilge armanbilge closed this Sep 13, 2022
@armanbilge armanbilge deleted the ipv6-unglued-accept4 branch September 13, 2022 14:51
@LeeTibbert
Copy link
Collaborator

Well, one of them. You have so many irons in the fire it is a Good Life if you
have only one.

I am off to fix 0.4.n InetAddress.getByName returning IPv6 addresses. Then
I am diving into simplifying & correcting InetAddress itself. Talk about Fear!
The changes I am going to try are based on my suspicions before the fact
being confirmed by what you did in epollcat.

I am on reserve (and out of your hair) for a while. If I can be useful to epollcat
or the typelevel ecosystem. Now that I am a little trained up, that training
time might be put to good use.

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

Successfully merging this pull request may close these issues.

2 participants