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

Allows build on Solaris (#1877) #1916

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

psumbera
Copy link
Contributor

@psumbera psumbera commented Jul 8, 2024

This allows build on Solaris. Unfortunately at this moment tests are failing like this:

     Running unittests src/lib.rs (target/debug/deps/quinn-94a8797a83ab1c78)

running 18 tests
test work_limiter::tests::limit_work ... ok
test tests::local_addr ... ok
test tests::close_endpoint ... ok
test tests::handshake_timeout ... ok
test tests::zero_rtt ... FAILED
test tests::export_keying_material ... FAILED
test tests::rebind_recv ... FAILED
test tests::stress_stream_receive_window ... FAILED
test tests::echo_v4 ... FAILED
test tests::stress_both_windows ... FAILED
test tests::read_after_close ... FAILED
test tests::echo_v6 ... FAILED
test tests::stress_receive_window ... FAILED
test tests::echo_dualstack ... FAILED
test tests::ip_blocking ... FAILED
test tests::multiple_conns_with_zero_length_cids ... FAILED
test tests::stream_id_flow_control has been running for over 60 seconds
test tests::two_datagram_readers has been running for over 60 seconds
^C

@psumbera
Copy link
Contributor Author

psumbera commented Jul 8, 2024

(Note that there might be some problems with tokio and/or mio as mio on Solaris is using poll() interface).

@djc
Copy link
Member

djc commented Jul 8, 2024

Can you add a separate commit that bumps the MSRV?

@djc
Copy link
Member

djc commented Jul 8, 2024

Thanks!

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! What happened to the FFI definitions drafted in libc that were thought to be necessary?

Unfortunately at this moment tests are failing like this

That's unfortunate. Is there an upstream issue open for the behavior in tokio or mio that you suspect is responsible?

Regardless, the most important question is whether the quinn-udp tests pass. Do they?

quinn-udp/src/unix.rs Outdated Show resolved Hide resolved
@psumbera psumbera force-pushed the solaris-build branch 2 times, most recently from aad1909 to 951e2f5 Compare July 11, 2024 12:26
@psumbera
Copy link
Contributor Author

Thanks! What happened to the FFI definitions drafted in libc that were thought to be necessary?

I'm keeping libc changes separately in my ws:

--- a/quinn-udp/Cargo.toml
+++ b/quinn-udp/Cargo.toml
@@ -19,8 +19,8 @@ default = ["log"]
 log = ["tracing/log"]

 [dependencies]
-libc = "0.2.113"
-socket2 = { workspace = true }
+libc = { git = "https://github.com/psumbera/libc.git", branch = "quinn4" }
+socket2 = { git = "https://github.com/psumbera/socket2.git", branch = "quinn" }
 tracing = { workspace = true }

 [target.'cfg(windows)'.dependencies]

Note that use of modified socket2 is also because of libc.

This is because I had to include to libc changes the use of __xnet_* socket functions:
rust-lang/libc@8281157
and this required me to rebuild whole Rust and socket2 had to use this modified libc as well.

Unfortunately at this moment tests are failing like this

That's unfortunate. Is there an upstream issue open for the behavior in tokio or mio that you suspect is responsible?

With use of __xnet_* functions in libc it's better now:

running 18 tests
test work_limiter::tests::limit_work ... ok
test tests::local_addr ... ok
test tests::close_endpoint ... ok
test tests::echo_v6 ... FAILED
test tests::ip_blocking ... ok
test tests::two_datagram_readers ... ok
test tests::export_keying_material ... ok
test tests::rebind_recv ... ok
test tests::multiple_conns_with_zero_length_cids ... ok
test tests::stream_id_flow_control ... ok
test tests::read_after_close ... ok
test tests::echo_v4 ... ok
test tests::zero_rtt ... ok
test tests::handshake_timeout ... ok                                                                                              test tests::echo_dualstack ... ok                                                                                                 test tests::stress_both_windows has been running for over 60 seconds                                                              test tests::stress_receive_window has been running for over 60 seconds                                                            test tests::stress_stream_receive_window has been running for over 60 seconds                                                     ^C                                               

Regardless, the most important question is whether the quinn-udp tests pass. Do they?

I had to disable some tests the same way NetBSD and OpenBSD do and it now passes like this:

running 3 tests
test gso ... ignored
test basic ... ok
test ecn_v6 ... ok

@Ralith
Copy link
Collaborator

Ralith commented Jul 11, 2024

I'm keeping libc changes separately in my ws:

If the definitions introduced/altered in the libc PR are necessary for the quinn-udp changes to work, then please vendor them in this PR, as mentioned in #1877 (comment). Once the libc change is merged and released, we can drop the vendored definitions.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Do you know of any good ways to test Solaris in CI?

@psumbera
Copy link
Contributor Author

Now with libc 0.2.158 everything should be ok.

@psumbera
Copy link
Contributor Author

Thanks! Do you know of any good ways to test Solaris in CI?

Unfortunately no. There is Solaris CBE release which could be used (https://blogs.oracle.com/solaris/post/announcing-the-first-oracle-solaris-114-cbe). But I don't know how this could be used for CI...

@djc
Copy link
Member

djc commented Aug 20, 2024

The vmactions org (whose Action we use for FreeBSD) appears to also have a Solaris action:

https://github.com/vmactions/solaris-vm

@mxinden
Copy link
Collaborator

mxinden commented Aug 20, 2024

For what it is worth, here is the equivalent FreeBSD workflow mentioned above:

test-freebsd:
# see https://github.com/actions/runner/issues/385
# use https://github.com/vmactions/freebsd-vm for now
name: test on freebsd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test on freebsd
uses: vmactions/freebsd-vm@v1
with:
usesh: true
mem: 4096
copyback: false
prepare: |
pkg install -y curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
echo "~~~~ rustc --version ~~~~"
$HOME/.cargo/bin/rustc --version
echo "~~~~ freebsd-version ~~~~"
freebsd-version
run: $HOME/.cargo/bin/cargo build --all-targets && $HOME/.cargo/bin/cargo test && $HOME/.cargo/bin/cargo test --manifest-path fuzz/Cargo.toml

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! CI coverage would be a great follow-up.

@Ralith Ralith added this pull request to the merge queue Aug 20, 2024
Merged via the queue into quinn-rs:main with commit a003e10 Aug 20, 2024
10 checks passed
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.

4 participants