You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the constant coalesce pass is broken, it crashes the plot both on chungus2 and on mpu8.
This pull request fixes this issue and also simplifies the constant coalesce pass by only having 1 constant node instead of 1 for each signal strength
Stack trace
`ERROR mchprs_core::server: plot panicked at /home/bram/.cargo/registry/src/index.crates.io-6f17d22bba15001f/petgraph-0.7.1/src/graph_impl/stable_graph/mod.rs:402:17:
StableGraph::add_edge: node index 235438 is not a node in the graph
0: mchprs_core::server::MinecraftServer::run::{{closure}}
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/server.rs:142:29
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1986:9
std::panicking::rust_panic_with_hook
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:809:13
2: std::panicking::begin_panic_handler::{{closure}}
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:674:13
3: std::sys::backtrace::__rust_end_short_backtrace
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/sys/backtrace.rs:170:18
4: rust_begin_unwind
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:665:5
5: core::panicking::panic_fmt
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/core/src/panicking.rs:76:14
6: petgraph::graph_impl::stable_graph::StableGraph<N,E,Ty,Ix>::add_edge
at /home/bram/.cargo/registry/src/index.crates.io-6f17d22bba15001f/petgraph-0.7.1/src/graph_impl/stable_graph/mod.rs:402:17
7: <mchprs_redpiler::passes::constant_coalesce::ConstantCoalesce as mchprs_redpiler::passes::Pass>::run_pass
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/redpiler/src/passes/constant_coalesce.rs:56:17
8: mchprs_redpiler::passes::PassManager::run_passes
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/redpiler/src/passes/mod.rs:73:13
9: mchprs_redpiler::Compiler::compile
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/redpiler/src/lib.rs:135:21
10: mchprs_core::plot::Plot::start_redpiler::{{closure}}::{{closure}}
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:697:17
std::sys::backtrace::rust_begin_short_backtrace
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
11: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:561:17
<core::panic::unwind_safe::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
std::panicking::try::do_call
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
std::panicking::try
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
std::panic::catch_unwind
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
std::thread::Builder::spawn_unchecked::{{closure}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
core::ops::function::FnOnce::call_once{{vtable.shim}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
12: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1972:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1972:9
std::sys::pal::unix::thread::Thread::new::thread_start
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/sys/pal/unix/thread.rs:105:17
13: start_thread
at ./nptl/pthread_create.c:442:8
14: __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0
2025-02-05T18:53:55.869953Z ERROR mchprs_core::server: plot panicked at crates/core/src/plot/mod.rs:695:9:
a scoped thread panicked
0: mchprs_core::server::MinecraftServer::run::{{closure}}
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/server.rs:142:29
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1986:9
std::panicking::rust_panic_with_hook
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:809:13
2: std::panicking::begin_panic_handler::{{closure}}
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:667:13
3: std::sys::backtrace::__rust_end_short_backtrace
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/sys/backtrace.rs:170:18
4: rust_begin_unwind
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:665:5
5: core::panicking::panic_fmt
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/core/src/panicking.rs:76:14
6: std::thread::scoped::scope
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/scoped.rs:162:13
7: mchprs_core::plot::Plot::start_redpiler
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:695:9
8: mchprs_core::plot::commands::::handle_redpiler_command
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/commands.rs:189:17
mchprs_core::plot::commands::::handle_command
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/commands.rs:403:17
mchprs_core::plot::Plot::handle_commands
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:843:20
9: mchprs_core::plot::Plot::update
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:1066:9
10: mchprs_core::plot::Plot::run
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:1213:17
11: mchprs_core::plot::Plot::load_and_run::{{closure}}
at /home/bram/SynologyDrive/sync/coding/mchprs/MCHPRS/crates/core/src/plot/mod.rs:1259:37
std::sys::backtrace::rust_begin_short_backtrace
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
12: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:561:17
<core::panic::unwind_safe::AssertUnwindSafe as core::ops::function::FnOnce<()>>::call_once
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
std::panicking::try::do_call
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
std::panicking::try
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
std::panic::catch_unwind
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
std::thread::Builder::spawn_unchecked::{{closure}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
core::ops::function::FnOnce::call_once{{vtable.shim}}
at /home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
13: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1972:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/alloc/src/boxed.rs:1972:9
std::sys::pal::unix::thread::Thread::new::thread_start
at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/sys/pal/unix/thread.rs:105:17
14: start_thread
at ./nptl/pthread_create.c:442:8
15: __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81:0`
BramOtte
changed the title
simplify constant_coalesce pass
Simplify constant_coalesce pass
Feb 5, 2025
The crash this PR fixes is already resolved in another PR and the simplification is also already present in #222
Since there is no urgency for this fix the simplification can simply come with PR 222 thus I am closing this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the constant coalesce pass is broken, it crashes the plot both on chungus2 and on mpu8.
This pull request fixes this issue and also simplifies the constant coalesce pass by only having 1 constant node instead of 1 for each signal strength