Skip to content

Commit

Permalink
more async boilerplate
Browse files Browse the repository at this point in the history
- we need buffers in the deserialization methods, so i want ahead
and added them to the serialization methods too
- `boxed` in the `and_then` chain apparently makes both runtime
  performance and compile time usable, see: [here]()rust-lang/rust#38528
  • Loading branch information
phdavis1027 committed Apr 9, 2024
1 parent fe8cda3 commit 22cee67
Show file tree
Hide file tree
Showing 12 changed files with 506 additions and 163 deletions.
68 changes: 68 additions & 0 deletions rustc-ice-2024-04-09T14_06_17-134811.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
thread 'rustc' panicked at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/compiler/rustc_middle/src/hir/mod.rs:145:21:
no entry found for key
stack backtrace:
0: 0x7fcf19e9315f - std::backtrace_rs::backtrace::libunwind::trace::h24a2eb3edb39d0f3
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x7fcf19e9315f - std::backtrace_rs::backtrace::trace_unsynchronized::h2a6cfa369f34ca40
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fcf19e9315f - std::backtrace::Backtrace::create::he4097149dffcff63
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/backtrace.rs:331:13
3: 0x7fcf19e930a0 - std::backtrace::Backtrace::force_capture::h4fbf37356422879b
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/backtrace.rs:312:9
4: 0x7fcf16af2bff - std[7b1098677428ad7b]::panicking::update_hook::<alloc[b42fcc1188132ddd]::boxed::Box<rustc_driver_impl[1cafe3f95b91c698]::install_ice_hook::{closure#0}>>::{closure#0}
5: 0x7fcf19eadf80 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3ba55c6055e52deb
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2030:9
6: 0x7fcf19eadf80 - std::panicking::rust_panic_with_hook::h98b728a1b3f62701
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:783:13
7: 0x7fcf19eadcc2 - std::panicking::begin_panic_handler::{{closure}}::h3998c72d5aeca2ca
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:657:13
8: 0x7fcf19eab216 - std::sys_common::backtrace::__rust_end_short_backtrace::h4da7fe95a2aa1e6f
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/sys_common/backtrace.rs:171:18
9: 0x7fcf19ead9f4 - rust_begin_unwind
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:645:5
10: 0x7fcf19ef81a5 - core::panicking::panic_fmt::h9fa2a341c4c930d8
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:72:14
11: 0x7fcf19ef8371 - core::panicking::panic_display::hb0daeb4d8a55ebdb
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:196:5
12: 0x7fcf19ef7f5b - core::panicking::panic_str::h7da754877680053d
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:171:5
13: 0x7fcf19ef7f5b - core::option::expect_failed::h37e7e230e23c00db
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/option.rs:1995:5
14: 0x7fcf1813c9fa - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::hir_owner_parent::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 8usize]>>
15: 0x7fcf185f35b2 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::VecCache<rustc_hir[e53c57ff7720ddf2]::hir_id::OwnerId, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
16: 0x7fcf185f2bc6 - rustc_query_impl[989e693435676dda]::query_impl::hir_owner_parent::get_query_incr::__rust_end_short_backtrace
17: 0x7fcf18137a90 - <rustc_middle[ade751d8927c8096]::lint::ShallowLintLevelMap>::lint_level_id_at_node
18: 0x7fcf1813717f - <rustc_middle[ade751d8927c8096]::ty::context::TyCtxt>::lint_level_at_node
19: 0x7fcf17fdc966 - rustc_hir_analysis[52302576a26a05ff]::check_unused::check_unused_traits
20: 0x7fcf17fdc2b3 - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::check_unused_traits::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 0usize]>>
21: 0x7fcf18bc0839 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::SingleCache<rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
22: 0x7fcf18bbfdda - rustc_query_impl[989e693435676dda]::query_impl::check_unused_traits::get_query_incr::__rust_end_short_backtrace
23: 0x7fcf186ded58 - rustc_hir_analysis[52302576a26a05ff]::check_crate
24: 0x7fcf18a83d2f - rustc_interface[f4d51a78b9b290f0]::passes::analysis
25: 0x7fcf18a83999 - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 1usize]>>
26: 0x7fcf18b6ebe2 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::SingleCache<rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
27: 0x7fcf18b6e7dc - rustc_query_impl[989e693435676dda]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
28: 0x7fcf18b794b6 - rustc_interface[f4d51a78b9b290f0]::interface::run_compiler::<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}
29: 0x7fcf18dddfa3 - std[7b1098677428ad7b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_with_globals<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_pool_with_globals<rustc_interface[f4d51a78b9b290f0]::interface::run_compiler<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>
30: 0x7fcf18ddddd0 - <<std[7b1098677428ad7b]::thread::Builder>::spawn_unchecked_<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_with_globals<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_pool_with_globals<rustc_interface[f4d51a78b9b290f0]::interface::run_compiler<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#1} as core[7eee5d0e4a486ee0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
31: 0x7fcf19eb7955 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha3a4cbec15749b2e
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2016:9
32: 0x7fcf19eb7955 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd028220884208def
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2016:9
33: 0x7fcf19eb7955 - std::sys::pal::unix::thread::Thread::new::thread_start::h5ade3076536764ff
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/sys/pal/unix/thread.rs:108:17
34: 0x7fcf13894ac3 - start_thread
at ./nptl/pthread_create.c:442:8
35: 0x7fcf13926850 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
36: 0x0 - <unknown>


rustc version: 1.78.0-nightly (878c8a2a6 2024-02-29)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [hir_owner_parent] getting HIR parent of `msg::startup_pack::<impl at src/msg/startup_pack.rs:64:1: 64:67>::borrowing_xml_serialize::{closure#0}::{closure#4}::{use#0}`
#1 [check_unused_traits] checking unused trait imports in crate
#2 [analysis] running analysis passes on this crate
end of query stack
68 changes: 68 additions & 0 deletions rustc-ice-2024-04-09T14_06_17-134812.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
thread 'rustc' panicked at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/compiler/rustc_middle/src/hir/mod.rs:145:21:
no entry found for key
stack backtrace:
0: 0x7fb57cf7515f - std::backtrace_rs::backtrace::libunwind::trace::h24a2eb3edb39d0f3
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x7fb57cf7515f - std::backtrace_rs::backtrace::trace_unsynchronized::h2a6cfa369f34ca40
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fb57cf7515f - std::backtrace::Backtrace::create::he4097149dffcff63
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/backtrace.rs:331:13
3: 0x7fb57cf750a0 - std::backtrace::Backtrace::force_capture::h4fbf37356422879b
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/backtrace.rs:312:9
4: 0x7fb57fef2bff - std[7b1098677428ad7b]::panicking::update_hook::<alloc[b42fcc1188132ddd]::boxed::Box<rustc_driver_impl[1cafe3f95b91c698]::install_ice_hook::{closure#0}>>::{closure#0}
5: 0x7fb57cf8ff80 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3ba55c6055e52deb
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2030:9
6: 0x7fb57cf8ff80 - std::panicking::rust_panic_with_hook::h98b728a1b3f62701
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:783:13
7: 0x7fb57cf8fcc2 - std::panicking::begin_panic_handler::{{closure}}::h3998c72d5aeca2ca
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:657:13
8: 0x7fb57cf8d216 - std::sys_common::backtrace::__rust_end_short_backtrace::h4da7fe95a2aa1e6f
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/sys_common/backtrace.rs:171:18
9: 0x7fb57cf8f9f4 - rust_begin_unwind
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/panicking.rs:645:5
10: 0x7fb57cfda1a5 - core::panicking::panic_fmt::h9fa2a341c4c930d8
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:72:14
11: 0x7fb57cfda371 - core::panicking::panic_display::hb0daeb4d8a55ebdb
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:196:5
12: 0x7fb57cfd9f5b - core::panicking::panic_str::h7da754877680053d
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/panicking.rs:171:5
13: 0x7fb57cfd9f5b - core::option::expect_failed::h37e7e230e23c00db
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/core/src/option.rs:1995:5
14: 0x7fb58153c9fa - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::hir_owner_parent::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 8usize]>>
15: 0x7fb5819f35b2 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::VecCache<rustc_hir[e53c57ff7720ddf2]::hir_id::OwnerId, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
16: 0x7fb5819f2bc6 - rustc_query_impl[989e693435676dda]::query_impl::hir_owner_parent::get_query_incr::__rust_end_short_backtrace
17: 0x7fb581537a90 - <rustc_middle[ade751d8927c8096]::lint::ShallowLintLevelMap>::lint_level_id_at_node
18: 0x7fb58153717f - <rustc_middle[ade751d8927c8096]::ty::context::TyCtxt>::lint_level_at_node
19: 0x7fb5813dc966 - rustc_hir_analysis[52302576a26a05ff]::check_unused::check_unused_traits
20: 0x7fb5813dc2b3 - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::check_unused_traits::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 0usize]>>
21: 0x7fb581fc0839 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::SingleCache<rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
22: 0x7fb581fbfdda - rustc_query_impl[989e693435676dda]::query_impl::check_unused_traits::get_query_incr::__rust_end_short_backtrace
23: 0x7fb581aded58 - rustc_hir_analysis[52302576a26a05ff]::check_crate
24: 0x7fb581e83d2f - rustc_interface[f4d51a78b9b290f0]::passes::analysis
25: 0x7fb581e83999 - rustc_query_impl[989e693435676dda]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[989e693435676dda]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 1usize]>>
26: 0x7fb581f6ebe2 - rustc_query_system[96bc39006273a395]::query::plumbing::try_execute_query::<rustc_query_impl[989e693435676dda]::DynamicConfig<rustc_query_system[96bc39006273a395]::query::caches::SingleCache<rustc_middle[ade751d8927c8096]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[989e693435676dda]::plumbing::QueryCtxt, true>
27: 0x7fb581f6e7dc - rustc_query_impl[989e693435676dda]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
28: 0x7fb581f794b6 - rustc_interface[f4d51a78b9b290f0]::interface::run_compiler::<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}
29: 0x7fb5821ddfa3 - std[7b1098677428ad7b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_with_globals<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_pool_with_globals<rustc_interface[f4d51a78b9b290f0]::interface::run_compiler<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>
30: 0x7fb5821dddd0 - <<std[7b1098677428ad7b]::thread::Builder>::spawn_unchecked_<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_with_globals<rustc_interface[f4d51a78b9b290f0]::util::run_in_thread_pool_with_globals<rustc_interface[f4d51a78b9b290f0]::interface::run_compiler<core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>, rustc_driver_impl[1cafe3f95b91c698]::run_compiler::{closure#0}>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7eee5d0e4a486ee0]::result::Result<(), rustc_span[7b9278f8b55d71be]::ErrorGuaranteed>>::{closure#1} as core[7eee5d0e4a486ee0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
31: 0x7fb57cf99955 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha3a4cbec15749b2e
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2016:9
32: 0x7fb57cf99955 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd028220884208def
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/alloc/src/boxed.rs:2016:9
33: 0x7fb57cf99955 - std::sys::pal::unix::thread::Thread::new::thread_start::h5ade3076536764ff
at /rustc/878c8a2a62d49ca5c454547ad67290a1df746cb5/library/std/src/sys/pal/unix/thread.rs:108:17
34: 0x7fb57cc94ac3 - start_thread
at ./nptl/pthread_create.c:442:8
35: 0x7fb57cd26850 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
36: 0x0 - <unknown>


rustc version: 1.78.0-nightly (878c8a2a6 2024-02-29)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [hir_owner_parent] getting HIR parent of `msg::startup_pack::<impl at src/msg/startup_pack.rs:64:1: 64:67>::borrowing_xml_serialize::{closure#0}::{closure#4}::{use#0}`
#1 [check_unused_traits] checking unused trait imports in crate
#2 [analysis] running analysis passes on this crate
end of query stack
Loading

0 comments on commit 22cee67

Please sign in to comment.