Closed Piturnah closed 11 months ago
I am also encountering the same error while using this tool on a personal/work project.
Happens also on MacOS. Tested versions 0.11.4, 0.11.5 and 0.11.6, not older.
cargo --version --verbose
cargo 1.71.0 (cfd3bbd8f 2023-06-08)
release: 1.71.0
commit-hash: cfd3bbd8fe4fd92074dfad04b7eb9a923646839f
commit-date: 2023-06-08
host: aarch64-apple-darwin
libgit2: 1.6.4 (sys:0.17.1 vendored)
libcurl: 8.1.2 (sys:0.4.61+curl-8.0.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1t 7 Feb 2023
os: Mac OS 14.0.0 [64-bit]
Same on Ubuntu 22.04 WSL2
$ cargo geiger --version
cargo-geiger 0.11.6
$ cargo --version --verbose
cargo 1.73.0-nightly (d78bbf4bd 2023-08-03)
release: 1.73.0-nightly
commit-hash: d78bbf4bde3c6b95caca7512f537c6f9721426ff
commit-date: 2023-08-03
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.2.1-DEV (sys:0.4.65+curl-8.2.1 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Ubuntu 22.04 (jammy) [64-bit]
Looks like the issue is affecting a wide number of users so probably not too much extra info here, but getting the same issue on Win11 so thought it would be good to complete the smorgasbord of targets.
PS C:\path> cargo geiger --version
cargo-geiger 0.11.6
PS C:\path> cargo --version --verbose
cargo 1.73.0-nightly (45782b6b8 2023-07-05)
release: 1.73.0-nightly
commit-hash: 45782b6b8afd1da042d45c2daeec9c0744f72cc7
commit-date: 2023-07-05
host: x86_64-pc-windows-msvc
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.1.2-DEV (sys:0.4.63+curl-8.1.2 vendored ssl:Schannel)
os: Windows 10.0.22621 (Windows 11 Core) [64-bit]
I am trying to run cargo-geiger on all my private unpublished crates in a workspace, not sure if this helps but alas. Running from the crate paths too not the root workspace path.
I'm also experiencing this
I am also having this issue
$ cargo --version --verbose
cargo 1.72.1 (103a7ff2e 2023-08-15)
release: 1.72.1
commit-hash: 103a7ff2ee7678d34f34d778614c5eb2525ae9de
commit-date: 2023-08-15
host: aarch64-apple-darwin
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 7.86.0 (sys:0.4.63+curl-8.1.2 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Mac OS 13.2.1 [64-bit]
And I tried using @fintelia's branch https://github.com/rust-secure-code/cargo-geiger/pull/480 with no luck.
I also tried #480 without it working.
I also run into the same issue :( Anyone resolves it?
I also run into the same issue :( Anyone resolves it?
try https://github.com/rust-secure-code/cargo-geiger/pull/480#issuecomment-1763223693 . It worked for me
Would be interested to know are people using --locked
on the cases considering our Cargo.lock is locked to 0.69.0 and the trouble seems to be with unlocked builds that get 0.69.1 hitting some type of compat thing / red herring that's been there.
Will have to figure out how, where and what caused that assert failure exactly.
Will also need to adjust install doc to say to use --locked
+ --release
and use binary builds which we'll need a pipeline.
fwiw - We are also getting rid of the cargo as library dependency later but we'll just bump the lib in the meantime.
OK when not using --locked
that gets 0.69.1 where as we lock to 0.69.0
This seems related on which cargo version is encountered in the runtime from $PATH w/ 0.69.1 unlocked dep
Nightly from $PATH - Fails
$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.73.0-nightly (03a119b0b 2023-08-07)
$ cargo geiger
thread 'main' panicked at /home/foobar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.69.1/src/cargo/core/package.rs:708:9:
assertion failed: self.pending_ids.insert(id)
Stable 1.71 - Fails
[foobar@localhost cargo-geiger]$ rustup default stable
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.71.1 (eb26296b5 2023-08-03)
$ cargo geiger
thread 'main' panicked at /home/foobar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.69.1/src/cargo/core/package.rs:708:9:
assertion failed: self.pending_ids.insert(id)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Stable 1.69.0 - OK
$ rustup default 1.69.0
info: using existing install for '1.69.0-x86_64-unknown-linux-gnu'
info: default toolchain set to '1.69.0-x86_64-unknown-linux-gnu'
1.69.0-x86_64-unknown-linux-gnu unchanged - rustc 1.69.0 (84c898d65 2023-04-16)
$ cargo geiger
Downloaded openssl-src v111.25.2+1.1.1t
Downloaded 1 crate (5.1 MB) in 1.33s
Stable - 1.70 OK
$ rustup default 1.70.0
info: using existing install for '1.70.0-x86_64-unknown-linux-gnu'
info: default toolchain set to '1.70.0-x86_64-unknown-linux-gnu'
1.70.0-x86_64-unknown-linux-gnu unchanged - rustc 1.70.0 (90c541806 2023-05-31)
$ cargo geiger
Compiling libc v0.2.140
Compiling proc-macro2 v1.0.54
This seems to be some kind of tricky side effect somewhere and hits the assert at download phase.
When using --locked
and we get cargo 0.69.0 as lib dependency (through Cargo.lock) it all works OK as suspected
$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.73.0-nightly (03a119b0b 2023-08-07)
$ cargo geiger
^C Cleaning [=================> ] 211/287: ct-codecs, 226 files/folders cleaned
Now need to hunt that side effect but will flick a quick instruction for people to use --locked
when installing the bin.
Still getting the same issue even though I installed using --locked
.
$ RUST_BACKTRACE=full cargo geiger
thread 'main' panicked at /home/sty/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.69.0/src/cargo/core/package.rs:708:9:
assertion failed: self.pending_ids.insert(id)
stack backtrace:
0: 0x55b0feefb4ac - std::backtrace_rs::backtrace::libunwind::trace::ha69d38c49f1bf263
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x55b0feefb4ac - std::backtrace_rs::backtrace::trace_unsynchronized::h93125d0b85fd543c
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55b0feefb4ac - std::sys_common::backtrace::_print_fmt::h8d65f438e8343444
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
3: 0x55b0feefb4ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h41751d2af6c8033a
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
4: 0x55b0fef2befc - core::fmt::rt::Argument::fmt::h5db2f552d8a28f63
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
5: 0x55b0fef2befc - core::fmt::write::h99465148a27e4883
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
6: 0x55b0feef70ae - std::io::Write::write_fmt::hee8dfd57bd179ab2
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
7: 0x55b0feefb294 - std::sys_common::backtrace::_print::h019a3cee3e814da4
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
8: 0x55b0feefb294 - std::sys_common::backtrace::print::h55694121c2ddf918
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
9: 0x55b0feefd3d3 - std::panicking::default_hook::{{closure}}::h29cbe3da3891b0b0
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
10: 0x55b0feefd0f4 - std::panicking::default_hook::h881e76b2b8c74280
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
11: 0x55b0feefd955 - std::panicking::rust_panic_with_hook::hcc36e25b6e33969c
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:731:13
12: 0x55b0feefd806 - std::panicking::begin_panic_handler::{{closure}}::ha415efb0f69f41f9
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:601:13
13: 0x55b0feefb9d6 - std::sys_common::backtrace::__rust_end_short_backtrace::h395fe90f99451e4e
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:170:18
14: 0x55b0feefd5a2 - rust_begin_unwind
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
15: 0x55b0fe6becc5 - core::panicking::panic_fmt::h452a83e54ecd764e
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
16: 0x55b0fe6bed63 - core::panicking::panic::h440670b29ba8362f
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:127:5
17: 0x55b0fe9b5f35 - cargo::core::package::Downloads::start::h1ec8de08cf572a3d
18: 0x55b0fe9b3d7b - cargo::core::package::PackageSet::get_many::hf19b0114330903ce
19: 0x55b0feb32261 - cargo::ops::cargo_clean::clean::h1c300acee69bd40b
20: 0x55b0fe6ea5f3 - cargo_geiger::scan::rs_file::resolve_rs_file_deps::h16442dc6c481f807
21: 0x55b0fe73825f - cargo_geiger::scan::default::scan::h6ca2f9b8772d972d
22: 0x55b0fe6e736c - cargo_geiger::scan::default::table::scan_to_table::hc7c08649c925b4d9
23: 0x55b0fe736833 - cargo_geiger::scan::default::scan_unsafe::h0bc164eae5cbe05a
24: 0x55b0fe70e4a3 - cargo_geiger::scan::scan::h00da78eca270efa2
25: 0x55b0fe6c8eb5 - cargo_geiger::main::h58112a9123b50bca
26: 0x55b0fe6c9953 - std::sys_common::backtrace::__rust_begin_short_backtrace::h66fc7834998de3cf
27: 0x55b0fe6c9969 - std::rt::lang_start::{{closure}}::had9432c4f4a3fc6c
28: 0x55b0feeee25b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h14c5f6d1cd70a60f
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:284:13
29: 0x55b0feeee25b - std::panicking::try::do_call::h2d02374ca451446a
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
30: 0x55b0feeee25b - std::panicking::try::h9f7922394bf57392
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
31: 0x55b0feeee25b - std::panic::catch_unwind::ha1600f9dd4ee7270
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
32: 0x55b0feeee25b - std::rt::lang_start_internal::{{closure}}::hfbd80e7d681b21a1
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:48
33: 0x55b0feeee25b - std::panicking::try::do_call::heacaa33dbdaa16e0
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
34: 0x55b0feeee25b - std::panicking::try::h637875f7c9db85ea
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
35: 0x55b0feeee25b - std::panic::catch_unwind::h4caa9c0c78cb4c19
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
36: 0x55b0feeee25b - std::rt::lang_start_internal::h2d6a60ec944b523d
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:20
37: 0x55b0fe6c9945 - main
38: 0x7f7848445cd0 - <unknown>
39: 0x7f7848445d8a - __libc_start_main
40: 0x55b0fe6bf4b5 - _start
41: 0x0 - <unknown>
Please provide more details 1) re: environment:
rustup show
And what 2) exact command was used to build & install.
It would help if 2) is the full command and it's output - provided by the build & install as that is the cause of these failures where as the runtime error is separate effect but not the root cause.
Thanks.
I've also encountered this error today. Maybe this is because 0.11.7
is not on crates.io and cargo install --locked cargo-geiger
installs 0.11.6
? Details:
This fixed the problem for me on macOS 13.6.3:
cargo install --locked --features vendored-openssl --force --git https://github.com/geiger-rs/cargo-geiger cargo-geiger
My macOS machine was installing 0.11.6. It seems that 0.11.7 is not on crates.io. The command above installs it from git. Now cargo-geiger is working great again!
pinkforest, Thanks so much for maintaining this tool.
Ran in the root directory for Gex, panicked:
Backtrace
```console thread 'main' panicked at 'assertion failed: self.pending_ids.insert(id)', /home/pit/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.69.1/src/cargo/core/package.rs:708:9 stack backtrace: 0: rust_begin_unwind at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5 1: core::panicking::panic_fmt at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14 2: core::panicking::panic at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5 3: cargo::core::package::Downloads::start 4: cargo::core::package::PackageSet::get_many 5: cargo::ops::cargo_clean::clean 6: cargo_geiger::scan::rs_file::resolve_rs_file_deps 7: cargo_geiger::scan::default::scan 8: cargo_geiger::scan::default::table::scan_to_table 9: cargo_geiger::scan::default::scan_unsafe 10: cargo_geiger::scan::scan 11: cargo_geiger::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ```Environment
OS: NixOS 23.05