idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.51k stars 374 forks source link

chez/chez014 test fails #860

Open kozross opened 3 years ago

kozross commented 3 years ago

When I build (bootstrap from Chez), I get this:

chez/chez014: FAILURE
Expected:
Received: hello world!
Received: echo: hello world!
1/1: Building Echo (Echo.idr)
Main> Main> Bye for now!

Given:
[server] Failed to bind socket with error: 99
1/1: Building Echo (Echo.idr)
Main> Main> Bye for now!
gallais commented 3 years ago

Are you using arch by any chance? It looks like the libs are built out of order leading to this issue.

kozross commented 3 years ago

Yes, I am, but this doesn't just affect the AUR package. I got this same error when I cloned from Github and followed the instructions.

kozross commented 3 years ago

I've provided what additional info I thought necessary to move this along. Is there more I can provide so that this could be resolved, @gallais ?

gallais commented 3 years ago

Ah, I hadn't noticed you were the one who had posted the upstream issue. :sweat_smile: I know next to nothing about the network code so it's probably better if someone more knowledgeable steps in.

kozross commented 3 years ago

I can confirm this issue is still present on 0.3.0.

ShinKage commented 3 years ago

I don't know much about the network code, but the error is raised when the test code tries to bind a new socket on localhost:0 (which should mean a free port on localhost). Can you check if it is indeed possible to do so in your system?

kozross commented 3 years ago

@ShinKage Not a network expert - how would I check this?

ShinKage commented 3 years ago

@kozross Sorry, I must have involuntarily skipped the notification. I'm very far from a network expert myself but you can try to directly call the C primitives, simplifying all the checks done in the support library, in particular you can take a look at the two functions called by the test here and here. They will probably fail again, but maybe you can get more helpful error descriptions since the Idris2 support code does not propagate the exact error number.

kozross commented 3 years ago

99 is EADDRNOTAVAIL. What port is the server trying to start on in the test code?

gallais commented 3 years ago

Looks like 0

kozross commented 3 years ago

Binding to port 0 is not allowed, I'm pretty sure.

gallais commented 3 years ago

From what I gather 0 means "just give me any port you like".

kozross commented 3 years ago

Either way, this is extremely flaky.