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

gnirehtet relay will IO error if binary built with Rust 1.64.0+ #475

Closed
cho-m opened this issue Dec 2, 2022 · 4 comments · Fixed by NixOS/nixpkgs#207990
Closed

gnirehtet relay will IO error if binary built with Rust 1.64.0+ #475

cho-m opened this issue Dec 2, 2022 · 4 comments · Fixed by NixOS/nixpkgs#207990

Comments

@cho-m
Copy link

cho-m commented Dec 2, 2022

In Homebrew, we currently need to rebuild gnirehtet due to an issue with our Linux pre-built binary, but all recent rebuild attempts result in a binary that doesn't work correctly.

Doing some debugging locally, I noticed that the binary built with Rust 1.64.0 or 1.65.0 will error:

gnirehtet relay
2022-12-01 18:27:56.744 INFO Main: Starting relay server on port 31416...
2022-12-01 18:27:56.745 ERROR Main: Execution error: IO error: Address family not supported by protocol family (os error 47)

Experimenting with a few different versions of Rust, I found that the last version that didn't error was 1.63.0:

gnirehtet relay
2022-12-01 18:34:53.803 INFO Main: Starting relay server on port 31416...
2022-12-01 18:34:53.804 INFO Relay: Relay server started

I assume gnirehtet is not compatible with changes introduced with new Rust versions.

@quantenzitrone
Copy link

quantenzitrone commented Dec 25, 2022

i have this on NixOS too
works with rust 1.60 (gnirehted from nixos-22.05)
doesn't work with rust 1.65 (from unstable)

@rom1v
Copy link
Collaborator

rom1v commented Dec 26, 2022

I can reproduce:

2022-12-26 14:13:55.287 ERROR Main: Execution error: IO error: Invalid argument (os error 22)

On this line:

let server = TcpListener::bind(&addr)?;

        let localhost = Ipv4Addr::new(127, 0, 0, 1).into();
        let addr = SocketAddr::new(localhost, port);
        let server = TcpListener::bind(&addr)?;

This is not expected to fail, a breaking change probably occurred in Rust 1.64.

To be investigated.

@rom1v rom1v mentioned this issue Dec 26, 2022
@rom1v
Copy link
Collaborator

rom1v commented Dec 26, 2022

Please confirm that it works with #478.

@chenrui333
Copy link

I can confirm it builds/runs fine with #478, tested out in my local against rust 1.66.0.

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 a pull request may close this issue.

4 participants