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

Add JDC/S initializers in integration tests #1226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Oct 18, 2024

resolves #1223

Copy link
Contributor

🐰 Bencher Report

Branch1226/merge
Testbedsv1

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client-submit-serialize📈 view plot
⚠️ NO THRESHOLD
6,613.90
client-submit-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
7,497.90
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
8,129.50
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
980.32
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
755.27
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
⚠️ NO THRESHOLD
248.42
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
⚠️ NO THRESHOLD
157.00
client-sv1-get-submit📈 view plot
⚠️ NO THRESHOLD
6,405.30
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
⚠️ NO THRESHOLD
275.49
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
824.72
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
715.34
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
⚠️ NO THRESHOLD
211.26
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

🐰 Bencher Report

Branch1226/merge
Testbedsv1

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
get_authorize📈 view plot
⚠️ NO THRESHOLD
8,515.00📈 view plot
⚠️ NO THRESHOLD
3,772.00📈 view plot
⚠️ NO THRESHOLD
5,295.00📈 view plot
⚠️ NO THRESHOLD
7.00📈 view plot
⚠️ NO THRESHOLD
91.00
get_submit📈 view plot
⚠️ NO THRESHOLD
95,430.00📈 view plot
⚠️ NO THRESHOLD
59,522.00📈 view plot
⚠️ NO THRESHOLD
85,510.00📈 view plot
⚠️ NO THRESHOLD
45.00📈 view plot
⚠️ NO THRESHOLD
277.00
get_subscribe📈 view plot
⚠️ NO THRESHOLD
8,034.00📈 view plot
⚠️ NO THRESHOLD
2,848.00📈 view plot
⚠️ NO THRESHOLD
3,984.00📈 view plot
⚠️ NO THRESHOLD
12.00📈 view plot
⚠️ NO THRESHOLD
114.00
serialize_authorize📈 view plot
⚠️ NO THRESHOLD
12,298.00📈 view plot
⚠️ NO THRESHOLD
5,343.00📈 view plot
⚠️ NO THRESHOLD
7,458.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
137.00
serialize_deserialize_authorize📈 view plot
⚠️ NO THRESHOLD
24,897.00📈 view plot
⚠️ NO THRESHOLD
9,920.00📈 view plot
⚠️ NO THRESHOLD
14,017.00📈 view plot
⚠️ NO THRESHOLD
34.00📈 view plot
⚠️ NO THRESHOLD
306.00
serialize_deserialize_handle_authorize📈 view plot
⚠️ NO THRESHOLD
30,435.00📈 view plot
⚠️ NO THRESHOLD
12,097.00📈 view plot
⚠️ NO THRESHOLD
17,140.00📈 view plot
⚠️ NO THRESHOLD
55.00📈 view plot
⚠️ NO THRESHOLD
372.00
serialize_deserialize_handle_submit📈 view plot
⚠️ NO THRESHOLD
126,589.00📈 view plot
⚠️ NO THRESHOLD
73,363.00📈 view plot
⚠️ NO THRESHOLD
105,189.00📈 view plot
⚠️ NO THRESHOLD
115.00📈 view plot
⚠️ NO THRESHOLD
595.00
serialize_deserialize_handle_subscribe📈 view plot
⚠️ NO THRESHOLD
28,017.00📈 view plot
⚠️ NO THRESHOLD
9,666.00📈 view plot
⚠️ NO THRESHOLD
13,677.00📈 view plot
⚠️ NO THRESHOLD
61.00📈 view plot
⚠️ NO THRESHOLD
401.00
serialize_deserialize_submit📈 view plot
⚠️ NO THRESHOLD
115,479.00📈 view plot
⚠️ NO THRESHOLD
68,223.00📈 view plot
⚠️ NO THRESHOLD
97,934.00📈 view plot
⚠️ NO THRESHOLD
65.00📈 view plot
⚠️ NO THRESHOLD
492.00
serialize_deserialize_subscribe📈 view plot
⚠️ NO THRESHOLD
23,439.00📈 view plot
⚠️ NO THRESHOLD
8,225.00📈 view plot
⚠️ NO THRESHOLD
11,589.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
333.00
serialize_submit📈 view plot
⚠️ NO THRESHOLD
99,827.00📈 view plot
⚠️ NO THRESHOLD
61,566.00📈 view plot
⚠️ NO THRESHOLD
88,352.00📈 view plot
⚠️ NO THRESHOLD
48.00📈 view plot
⚠️ NO THRESHOLD
321.00
serialize_subscribe📈 view plot
⚠️ NO THRESHOLD
11,375.00📈 view plot
⚠️ NO THRESHOLD
4,195.00📈 view plot
⚠️ NO THRESHOLD
5,840.00📈 view plot
⚠️ NO THRESHOLD
15.00📈 view plot
⚠️ NO THRESHOLD
156.00
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

🐰 Bencher Report

Branch1226/merge
Testbedsv2

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
2,087.00📈 view plot
⚠️ NO THRESHOLD
473.00📈 view plot
⚠️ NO THRESHOLD
737.00📈 view plot
⚠️ NO THRESHOLD
4.00📈 view plot
⚠️ NO THRESHOLD
38.00
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
8,204.00📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
3,159.00📈 view plot
⚠️ NO THRESHOLD
36.00📈 view plot
⚠️ NO THRESHOLD
139.00
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
6,289.00📈 view plot
⚠️ NO THRESHOLD
1,750.00📈 view plot
⚠️ NO THRESHOLD
2,549.00📈 view plot
⚠️ NO THRESHOLD
20.00📈 view plot
⚠️ NO THRESHOLD
104.00
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
14,640.00📈 view plot
⚠️ NO THRESHOLD
4,694.00📈 view plot
⚠️ NO THRESHOLD
6,760.00📈 view plot
⚠️ NO THRESHOLD
43.00📈 view plot
⚠️ NO THRESHOLD
219.00
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
27,472.00📈 view plot
⚠️ NO THRESHOLD
10,585.00📈 view plot
⚠️ NO THRESHOLD
15,402.00📈 view plot
⚠️ NO THRESHOLD
83.00📈 view plot
⚠️ NO THRESHOLD
333.00
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
4,387.00📈 view plot
⚠️ NO THRESHOLD
1,461.00📈 view plot
⚠️ NO THRESHOLD
2,157.00📈 view plot
⚠️ NO THRESHOLD
12.00📈 view plot
⚠️ NO THRESHOLD
62.00
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
13,936.00📈 view plot
⚠️ NO THRESHOLD
5,064.00📈 view plot
⚠️ NO THRESHOLD
7,331.00📈 view plot
⚠️ NO THRESHOLD
33.00📈 view plot
⚠️ NO THRESHOLD
184.00
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
22,707.00📈 view plot
⚠️ NO THRESHOLD
8,027.00📈 view plot
⚠️ NO THRESHOLD
11,672.00📈 view plot
⚠️ NO THRESHOLD
79.00📈 view plot
⚠️ NO THRESHOLD
304.00
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
4,677.00📈 view plot
⚠️ NO THRESHOLD
1,502.00📈 view plot
⚠️ NO THRESHOLD
2,277.00📈 view plot
⚠️ NO THRESHOLD
11.00📈 view plot
⚠️ NO THRESHOLD
67.00
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
16,106.00📈 view plot
⚠️ NO THRESHOLD
5,963.00📈 view plot
⚠️ NO THRESHOLD
8,666.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
207.00
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
35,504.00📈 view plot
⚠️ NO THRESHOLD
14,855.00📈 view plot
⚠️ NO THRESHOLD
21,819.00📈 view plot
⚠️ NO THRESHOLD
98.00📈 view plot
⚠️ NO THRESHOLD
377.00
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

🐰 Bencher Report

Branch1226/merge
Testbedsv2

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
44.93
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
73.41
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
14.65
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
263.69
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,012.20
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
147.40
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
295.29
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
485.48
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
164.91
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
474.25
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,092.60
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.36%. Comparing base (b8e7715) to head (2d23c27).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1226   +/-   ##
=======================================
  Coverage   19.36%   19.36%           
=======================================
  Files         164      164           
  Lines       10811    10811           
=======================================
  Hits         2094     2094           
  Misses       8717     8717           
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.65% <ø> (ø)
binary_sv2-coverage 5.46% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.29% <ø> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 8.13% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.51% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.35% <ø> (ø)
pool_sv2-coverage 1.38% <ø> (ø)
protocols 24.72% <ø> (ø)
roles 6.63% <ø> (ø)
roles_logic_sv2-coverage 8.06% <ø> (ø)
sv1-mining-device-coverage 0.00% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.61% <ø> (ø)
utils 25.13% <ø> (ø)
v1-coverage 2.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@GitGab19 GitGab19 left a comment

Choose a reason for hiding this comment

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

LGTM. Why have you had to create all those new config structs? How was it working before?

Comment on lines +286 to +290
pub async fn start_jdc(
pool_address: SocketAddr,
tp_address: SocketAddr,
jds_address: SocketAddr,
) -> SocketAddr {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please see #1234

jdc_address
}

pub async fn start_jds(tp_address: SocketAddr) -> SocketAddr {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please see #1234

@plebhash
Copy link
Collaborator

I pulled this branch and tried to do some quick experimentation, where my goal was to put a sniffer between JDC and JDS to look into the messages they are exchanging.

Here's my test:

#[tokio::test]
async fn sniff_jdc_jds() {
    let sniffer_addr = common::get_available_address();
    let tp_addr = common::get_available_address();
    let _jdc_addr = common::get_available_address();
    let jds_addr = common::get_available_address();
    let pool_addr = common::get_available_address();
    let _tp = common::start_template_provider(tp_addr.port()).await;
    let _pool = common::start_pool(Some(pool_addr), Some(tp_addr)).await;
    let _jds = common::start_jds(tp_addr).await;
    let sniffer = common::start_sniffer(sniffer_addr, jds_addr).await;
    let _jdc = common::start_jdc(pool_addr, tp_addr, sniffer_addr).await;

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);
}

but when I tried to run it, I got a nasty panic... did I make some mistake on the test above, or is there something wrong with the APIs?

The log line that really stand out is:

Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }

which is coming from common::start_jdc.

anyways, here's the full panic logs:

$ RUST_BACKTRACE=1 cargo t sniff_jdc_jds -- --nocapture
   Compiling integration-test v0.1.0 (/Users/plebhash/develop/stratum/roles/tests-integration)
    Finished test [optimized + debuginfo] target(s) in 0.84s
     Running unittests tests/common/mod.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/integration_test-18118a7d259fdca5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/pool_integration.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21)

running 1 test
thread 'sniff_jdc_jds' panicked at tests-integration/tests/common/sniffer.rs:79:18:
Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
   3: core::result::Result<T,E>::expect
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1034:23
   4: pool_integration::common::sniffer::Sniffer::start::{{closure}}
             at ./tests/common/sniffer.rs:77:13
   5: pool_integration::common::start_sniffer::{{closure}}::{{closure}}
             at ./tests/common/mod.rs:200:31
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
   7: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
   8: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
   9: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  10: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  11: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  12: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  13: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  14: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  15: tokio::runtime::task::harness::poll_future
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  16: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  17: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  18: tokio::runtime::task::LocalNotified<S>::run
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  19: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  20: tokio::runtime::coop::with_budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  21: tokio::runtime::coop::budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  22: tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  23: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  24: tokio::runtime::scheduler::current_thread::Context::run_task
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  26: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  27: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  28: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  29: std::thread::local::LocalKey<T>::try_with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  30: std::thread::local::LocalKey<T>::with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  31: tokio::runtime::context::set_scheduler
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  32: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  33: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  34: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  35: tokio::runtime::context::runtime::enter_runtime
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  36: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  37: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  38: tokio::runtime::runtime::Runtime::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  39: pool_integration::sniff_jdc_jds
             at ./tests/pool_integration.rs:59:5
  40: pool_integration::sniff_jdc_jds::{{closure}}
             at ./tests/pool_integration.rs:43:25
  41: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  42: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'sniff_jdc_jds' panicked at library/std/src/panicking.rs:135:9:
cannot modify the panic hook from a panicking thread
stack backtrace:
   0:        0x1044a3420 - std::backtrace_rs::backtrace::libunwind::trace::h2966c6fbfac9d426
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:        0x1044a3420 - std::backtrace_rs::backtrace::trace_unsynchronized::h8a5f4aefe890b7c5
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x1044a3420 - std::sys_common::backtrace::_print_fmt::h7574dd98fd39c257
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:        0x1044a3420 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h298c9ab285ff3934
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:        0x1044c4a74 - core::fmt::rt::Argument::fmt::hf9661447f7b99899
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:        0x1044c4a74 - core::fmt::write::h4e276abdb6d0c2a1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:        0x10449f90c - std::io::Write::write_fmt::hd421848f5f0bf9d0
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:        0x1044a325c - std::sys_common::backtrace::_print::h09e653c6686dbd70
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:        0x1044a325c - std::sys_common::backtrace::print::hd8bd9ecab1f94b94
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:        0x1044a4d14 - std::panicking::default_hook::{{closure}}::h520eeb743fc98fb4
  10:        0x1044a4a5c - std::panicking::default_hook::ha6550ffe49b63df1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:        0x1044a513c - std::panicking::rust_panic_with_hook::hddb0e884a202de7c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:779:13
  12:        0x1044a5018 - std::panicking::begin_panic_handler::{{closure}}::hd2798398a2fd9077
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:649:13
  13:        0x1044a3888 - std::sys_common::backtrace::__rust_end_short_backtrace::h9201cc364dbb8a23
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  14:        0x1044a4dd8 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  15:        0x1044e5358 - core::panicking::panic_fmt::h4d5168028d4c43c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  16:        0x1044a4528 - std::panicking::set_hook::h7e0b88293aa60115
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:135:9
  17:        0x10406df28 - <pool_integration::common::sniffer::Sniffer as core::ops::drop::Drop>::drop::h4f9b32744e297af4
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:433:9
  18:        0x10406df28 - core::ptr::drop_in_place<pool_integration::common::sniffer::Sniffer>::h4c16a79764da6aa1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ptr/mod.rs:498:1
  19:        0x1040a12f0 - pool_integration::common::sniffer::Sniffer::start::{{closure}}::hb90fde3a39d2eb28
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:71:30
  20:        0x1040a12f0 - pool_integration::common::start_sniffer::{{closure}}::{{closure}}::hd413aa5f6f08a766
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/mod.rs:200:31
  21:        0x1040a12f0 - <core::pin::Pin<P> as core::future::future::Future>::poll::h3a6af33d99c0d7c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
  22:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::{{closure}}::h67416b5194bd8ea1
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
  23:        0x1040825d8 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::had125f885be69651
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
  24:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::h88e399dd156265df
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  25:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::{{closure}}::hff1035ada82c4042
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  26:        0x1040cf4e4 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h194e8a46ba6c134c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  27:        0x1040cf4e4 - std::panicking::try::do_call::hfa059d7bbe5f74da
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  28:        0x1040cf4e4 - std::panicking::try::h5e6f67912e5e74c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  29:        0x1040cf4e4 - std::panic::catch_unwind::h894555e4802d6241
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  30:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::h9c6fc42a8ad4dda3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  31:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll_inner::h5e8ccef60996f844
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  32:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll::hf1d96cc44106cc2d
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  33:        0x1040640d8 - tokio::runtime::task::LocalNotified<S>::run::h910c378ca7799873
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  34:        0x1040640d8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::h7fd3c9a9992df3c0
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  35:        0x1040640d8 - tokio::runtime::coop::with_budget::ha8eea9b55311be09
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  36:        0x1040640d8 - tokio::runtime::coop::budget::h686e5071d2ebf508
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  37:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}::ha17898b3395133c3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  38:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::enter::h244755fd5f4fea9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  39:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::h14b25fb646033519
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  40:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::h9de2cdad3aab94d7
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  41:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}::hb89c57f45d371a75
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  42:        0x1040da7e8 - tokio::runtime::context::scoped::Scoped<T>::set::hcfcdab6918b71f15
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  43:        0x1040bc7f8 - tokio::runtime::context::set_scheduler::{{closure}}::h3aa378b85f754d73
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  44:        0x1040bc7f8 - std::thread::local::LocalKey<T>::try_with::hb8e9a3e2d7975e28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  45:        0x1040bc7f8 - std::thread::local::LocalKey<T>::with::h5e3cce2c79ba2e1c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  46:        0x10406429c - tokio::runtime::context::set_scheduler::h1f5c32157d356ff3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  47:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::enter::hdd9d2a9a4be2cdce
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  48:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h59e72995de799888
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  49:        0x1040bcd54 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}::h5c86b1193a959b3c
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  50:        0x1040bcd54 - tokio::runtime::context::runtime::enter_runtime::h5dc7d9cfd8e2fb9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  51:        0x1040b8878 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::hd4c5ce3ad4989144
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  52:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on_inner::hcb273d97fa3c4752
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  53:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on::h760ebfa37e3fe329
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  54:        0x104072324 - pool_integration::sniff_jdc_jds::h690654147fdeb18f
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:59:5
  55:        0x104072324 - pool_integration::sniff_jdc_jds::{{closure}}::h5ce01b1ba43151ec
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:43:25
  56:        0x104072324 - core::ops::function::FnOnce::call_once::hcfcd9a51a9123644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  57:        0x10412c6bc - core::ops::function::FnOnce::call_once::he7c46f18244e22ba
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  58:        0x10412c6bc - test::__rust_begin_short_backtrace::hf05961ebc6f8d3a3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:628:18
  59:        0x10412b688 - test::run_test_in_process::{{closure}}::h3be023be3e470e24
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:60
  60:        0x10412b688 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h045822bb433f4fa3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  61:        0x10412b688 - std::panicking::try::do_call::he686b452df9e6b8a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  62:        0x10412b688 - std::panicking::try::hc2f6216ead8eae6f
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  63:        0x10412b688 - std::panic::catch_unwind::h02265fe17265fda2
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  64:        0x10412b688 - test::run_test_in_process::h5250a48154d3e8a7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:27
  65:        0x10412b688 - test::run_test::{{closure}}::h26897ddc37b2966c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:574:43
  66:        0x1040fec14 - test::run_test::{{closure}}::h5c8976010d262547
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:602:41
  67:        0x1040fec14 - std::sys_common::backtrace::__rust_begin_short_backtrace::h14e0bf2ff6bde926
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  68:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h41c404ebec5fd0f9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:529:17
  69:        0x104103408 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h9bea6ba67aceee28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  70:        0x104103408 - std::panicking::try::do_call::h681e7ac0e901b900
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  71:        0x104103408 - std::panicking::try::hc0aa288ce3642911
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  72:        0x104103408 - std::panic::catch_unwind::he941ae36032548bf
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  73:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::h03cf06ae2f75ecc3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:528:30
  74:        0x104103408 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9410c0b28133a970
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  75:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he407efbeff8db698
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  76:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h15f2f0818ccedd2c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  77:        0x1044a9d68 - std::sys::unix::thread::Thread::new::thread_start::h9b6324e2391e6ebb
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
  78:        0x18365ef94 - __pthread_joiner_wake
thread 'sniff_jdc_jds' panicked at library/core/src/panicking.rs:144:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
error: test failed, to rerun pass `--test pool_integration`

Caused by:
  process didn't exit successfully: `/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21 sniff_jdc_jds --nocapture` (signal: 6, SIGABRT: process abort signal)

@jbesraa jbesraa changed the title Addd JDC/S initializers in integration tests Add JDC/S initializers in integration tests Oct 28, 2024
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.

Add JDS and JDC initializers in tests-integration
3 participants