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

Release 2022.10 #3763

Merged
merged 1 commit into from Jun 13, 2022
Merged

Release 2022.10 #3763

merged 1 commit into from Jun 13, 2022

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Jun 13, 2022

@cgwalters
Copy link
Member Author

 thread 'main' panicked at 'Must use `_os` lookups with `Arg::allow_invalid_utf8`', /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.1/src/parser/matches/arg_matches.rs:1651:13

uhhh 😕

jlebon
jlebon previously approved these changes Jun 13, 2022
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

CI failure looks unrelated. Looks like git main is failing with that too now.

@cgwalters
Copy link
Member Author

cgwalters commented Jun 13, 2022

Humm...what could have snuck through CI like this? I did cargo install --debug --root=target/cxxbridge cxxbridge-cmd --version 1.0.68 so I can get useful backtraces, then

$ gdb --args ./target/cxxbridge/bin/cxxbridge --include rpmostree-cxxrs.h rust/src/lib.rs
...
(gdb) b std::panicking::default_hook
Breakpoint 1 at 0x669b51: file library/std/src/panicking.rs, line 266.
(gdb) r
Starting program: /var/srv/walters/src/github/coreos/rpm-ostree/target/cxxbridge/bin/cxxbridge --include rpmostree-cxxrs.h rust/src/lib.rs
Breakpoint 1, std::panicking::default_hook () at library/std/src/panicking.rs:266
266	library/std/src/panicking.rs: No such file or directory.
Missing separate debuginfos, use: dnf debuginfo-install libgcc-12.0.1-0.12.fc36.x86_64
#0  std::panicking::default_hook () at library/std/src/panicking.rs:266
#1  0x0000555555bbe899 in std::panicking::rust_panic_with_hook () at library/std/src/panicking.rs:698
#2  0x0000555555bbe549 in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:586
#3  0x0000555555bbc674 in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> () at library/std/src/sys_common/backtrace.rs:138
#4  0x0000555555bbe299 in std::panicking::begin_panic_handler () at library/std/src/panicking.rs:584
#5  0x0000555555bdabf3 in core::panicking::panic_fmt () at library/core/src/panicking.rs:143
#6  0x000055555585975d in clap::parser::matches::arg_matches::unwrap_string (value=0x555555c1ef90) at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.1/src/parser/matches/arg_matches.rs:1651
#7  0x0000555555846805 in clap::parser::matches::arg_matches::unwrap_string () at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.1/src/parser/matches/arg_matches.rs:1647
#8  0x0000555555a694b8 in core::ops::function::FnMut::call_mut<fn(&clap::parser::matches::any_value::AnyValue) -> &str, (&clap::parser::matches::any_value::AnyValue)> () at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:150
#9  0x0000555555aad329 in core::ops::function::impls::{impl#4}::call_once<(&clap::parser::matches::any_value::AnyValue), fn(&clap::parser::matches::any_value::AnyValue) -> &str> (self=0x7fffffffced8, args=...) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:280
#10 0x0000555555ab7402 in core::option::Option<&clap::parser::matches::any_value::AnyValue>::map<&clap::parser::matches::any_value::AnyValue, &str, &mut fn(&clap::parser::matches::any_value::AnyValue) -> &str> (self=..., f=0x7fffffffced8) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/option.rs:906
#11 0x0000555555a9216d in core::iter::adapters::map::{impl#2}::next<&str, core::iter::adapters::flatten::Flatten<core::slice::iter::Iter<alloc::vec::Vec<clap::parser::matches::any_value::AnyValue, alloc::alloc::Global>>>, fn(&clap::parser::matches::any_value::AnyValue) -> &str> (self=0x7fffffffcea8) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/iter/adapters/map.rs:103
#12 0x0000555555a7153f in clap::parser::matches::arg_matches::{impl#16}::next (self=0x7fffffffcea8) at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.1/src/parser/matches/arg_matches.rs:1477
#13 0x00005555557c17f6 in core::iter::adapters::map::{impl#2}::next<cxxbridge::gen::include::Include, clap::parser::matches::arg_matches::Values, cxxbridge::app::from_args::{closure_env#0}> (self=0x7fffffffcea8) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/iter/adapters/map.rs:103
#14 0x0000555555807048 in alloc::vec::spec_from_iter_nested::{impl#0}::from_iter<cxxbridge::gen::include::Include, core::iter::adapters::map::Map<clap::parser::matches::arg_matches::Values, cxxbridge::app::from_args::{closure_env#0}>> (iterator=...) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/vec/spec_from_iter_nested.rs:26
#15 0x0000555555807e1c in alloc::vec::spec_from_iter::{impl#0}::from_iter<cxxbridge::gen::include::Include, core::iter::adapters::map::Map<clap::parser::matches::arg_matches::Values, cxxbridge::app::from_args::{closure_env#0}>> (iterator=...) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/vec/spec_from_iter.rs:33
#16 0x00005555558110ee in alloc::vec::{impl#17}::from_iter<cxxbridge::gen::include::Include, core::iter::adapters::map::Map<clap::parser::matches::arg_matches::Values, cxxbridge::app::from_args::{closure_env#0}>> (iter=...) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/vec/mod.rs:2552
#17 0x00005555557c48ec in core::iter::traits::iterator::Iterator::collect<core::iter::adapters::map::Map<clap::parser::matches::arg_matches::Values, cxxbridge::app::from_args::{closure_env#0}>, alloc::vec::Vec<cxxbridge::gen::include::Include, alloc::alloc::Global>> (self=...) at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/iter/traits/iterator.rs:1778
#18 0x00005555557ad762 in cxxbridge::app::from_args () at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/cxxbridge-cmd-1.0.68/src/app.rs:69
#19 0x00005555557705fc in cxxbridge::try_main () at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/cxxbridge-cmd-1.0.68/src/main.rs:71
#20 0x0000555555770399 in cxxbridge::main () at /var/home/walters/.cargo/registry/src/github.com-1ecc6299db9ec823/cxxbridge-cmd-1.0.68/src/main.rs:58
(gdb) 

cgwalters added a commit to cgwalters/cxx that referenced this pull request Jun 13, 2022
For some reason I don't yet fully understand, the build
of rpm-ostree started failing with a panic in `cxxbridge`:
coreos/rpm-ostree#3763 (comment)

What I haven't worked out is what changed to break this; my best
guess is something like compiler type inference?  AFAICS, the
code here hasn't changed in a long time, and neither has the lockfiles.

(Hmm...unless we're not using lockfiles for this...ah yes, that would
 explain it.  And https://crates.io/crates/clap/3.2.1 was just published.
 Will dig into this more)

Anyways, this is not an elegant fix; we just (correctly) ask clap
to give us `OsString` and not `String`.  The real fix is clearly
to stop using all the deprecated clap APIs, but I'm trying to make
the least invasive change for the moment.
@cgwalters
Copy link
Member Author

dtolnay/cxx#1057

@cgwalters
Copy link
Member Author

OK rebased 🏄

@jlebon jlebon enabled auto-merge June 13, 2022 22:51
@jlebon jlebon merged commit e496351 into coreos:main Jun 13, 2022
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.

None yet

2 participants