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

0.15 not compatible with 1.63 despite rust-version hint #574

Closed
davidhewitt opened this issue Oct 11, 2024 · 2 comments
Closed

0.15 not compatible with 1.63 despite rust-version hint #574

davidhewitt opened this issue Oct 11, 2024 · 2 comments

Comments

@davidhewitt
Copy link
Contributor

Related to #571 / #572

On PyO3's MSRV CI runs (also 1.63, which hashbrown has in its Cargo.toml) we are getting runtime panics from atomic orderings incompatible with 1.63.

It looks like the root cause is the new foldhash dependency, which does not have any rust-version in its Cargo.toml. The code in question has existed since the first release of foldhash, so I can only conclude that crate does not support 1.63 at all, and thus hashbrown can't either.

https://github.com/PyO3/pyo3/actions/runs/11271186265/job/31344727179#step:18:957

thread 'conversions::hashbrown::tests::test_extract_hashbrown_hashset' panicked at 'a failure ordering can't be stronger than a success ordering', /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/sync/atomic.rs:2700:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
   2: core::sync::atomic::atomic_compare_exchange_weak
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/sync/atomic.rs:2700:18
   3: core::sync::atomic::AtomicU8::compare_exchange_weak
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/sync/atomic.rs:1937:21
   4: foldhash::seed::global::GlobalSeed::init_slow
             at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/foldhash-0.1.3/src/seed.rs:277:23
   5: foldhash::seed::global::GlobalSeed::new
             at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/foldhash-0.1.3/src/seed.rs:263:17
   6: <foldhash::seed::fast::RandomState as core::default::Default>::default
             at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/foldhash-0.1.3/src/seed.rs:72:30
   7: <hashbrown::set::HashSet<T,S,A> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.15.0/src/set.rs:1271:44
@cuviper
Copy link
Member

cuviper commented Oct 12, 2024

That ordering restriction was removed by rust-lang/rust#98383 in Rust 1.64.

So yes, the default hasher from foldhash is going to be limited by that. However, hashbrown itself will still work on 1.63 with default-features = "false", if you choose a different hasher for your use.

@davidhewitt
Copy link
Contributor Author

Ah, makes sense. I hadn't considered the feature combination 👍

Thanks for clarifying that. I think let's close this given the MSRV testing seems to be incoming in #572

@davidhewitt davidhewitt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2024
adamcavendish added a commit to adamcavendish/pyo3 that referenced this issue Oct 13, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown limited to 0.14.5: rust-lang/hashbrown#574
Indexmap is limited to 2.5.0 to be compatible with hashbrown 0.14.5
adamcavendish added a commit to adamcavendish/pyo3 that referenced this issue Oct 13, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown limited to 0.14.5: rust-lang/hashbrown#574
Indexmap is limited to 2.5.0 to be compatible with hashbrown 0.14.5
adamcavendish added a commit to adamcavendish/pyo3 that referenced this issue Oct 13, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown limited to 0.14.5: rust-lang/hashbrown#574
Indexmap is limited to 2.5.0 to be compatible with hashbrown 0.14.5
adamcavendish added a commit to adamcavendish/pyo3 that referenced this issue Oct 13, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre min-version is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown min-version is limited to 0.14.5:
  rust-lang/hashbrown#574
Indexmap min-version is limited to 2.5.0 to be compatible with hashbrown 0.14.5
github-merge-queue bot pushed a commit to PyO3/pyo3 that referenced this issue Oct 18, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre min-version is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown min-version is limited to 0.14.5:
  rust-lang/hashbrown#574
Indexmap min-version is limited to 2.5.0 to be compatible with hashbrown 0.14.5
github-merge-queue bot pushed a commit to PyO3/pyo3 that referenced this issue Oct 18, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.10 => 0.11

Eyre min-version is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown min-version is limited to 0.14.5:
  rust-lang/hashbrown#574
Indexmap min-version is limited to 2.5.0 to be compatible with hashbrown 0.14.5
adamcavendish added a commit to adamcavendish/pyo3 that referenced this issue Oct 20, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.6 => 0.10

Eyre min-version is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown min-version is limited to 0.14.5:
  rust-lang/hashbrown#574
Indexmap min-version is limited to 2.5.0 to be compatible with hashbrown 0.14.5
github-merge-queue bot pushed a commit to PyO3/pyo3 that referenced this issue Oct 20, 2024
- eyre: 0.4 => 0.6.8
- hashbrown: 0.9 => 0.14.5
- indexmap: 1.6 => 2.5.0
- num-complex: 0.2 => 0.4.6
- chrono-tz: 0.6 => 0.10

Eyre min-version is limited to 0.6.8 to be compatible with MSRV 1.63
Hashbrown min-version is limited to 0.14.5:
  rust-lang/hashbrown#574
Indexmap min-version is limited to 2.5.0 to be compatible with hashbrown 0.14.5
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

No branches or pull requests

2 participants