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

Prevent infinite loop in SV1-Test when the SV2 Pool fails to connect to the template provider #1094

Closed
pavlenex opened this issue Aug 13, 2024 · 2 comments · Fixed by #1099
Closed
Assignees
Milestone

Comments

@pavlenex
Copy link
Collaborator

While I was looking into #1001 and re-running tests I noticed that there are two tests that failed.

Link here https://github.com/stratum-mining/stratum/actions/runs/10367376623/job/28698642731?pr=1001

Screenshot 2024-08-13 at 18 49 11

pool-sri-test-reject-auth

STD ERR:      Running `target/llvm-cov-target/debug/pool_sv2 -c ../test/config/pool-config-sri-tp.toml`
STD OUT: 2024-08-13T09:44:26.795420Z  INFO pool_sv2: Pool INITIALIZING with config: "../test/config/pool-config-sri-tp.toml"
STD OUT: 2024-08-13T09:44:26.918168Z ERROR pool_sv2: Could not connect to Template Provider: I/O error: `Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }
PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" },
    ),
    location: Location {
        file: "src/net.rs",
        line: 60,
        col: 51,
    },
    can_unwind: true,
    force_no_backtrace: false,
}
STD ERR: 
thread 'main' panicked at src/main.rs:440:13:
TEST FAILED
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
STD ERR:     Finished report saved to target/pool-sri-test-reject-auth.xml
mg test failed
Error: Process completed with exit code 1.

SV1 Test

What @lorbax explained to me in #dev channel is that this basically means that SV2 Pool failed to connect to a TP.

Which then caused this test to run in the loop for 3 and a half hours before I manually had to cancel the workflow and re-run it

upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:32.973172Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:37.973623Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:42.975088Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:47.976605Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:52.978117Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:05:57.978631Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)
STD OUT: 2024-08-13T13:06:02.980188Z ERROR translator_sv2::lib::upstream_sv2::upstream: Failed to connect to Upstream role at 127.0.0.1:34254, retrying in 5s: Connection refused (os error 111)

@lorbax mentioned that the solution for this one is simple add a timeout to this Message Generator test.

@pavlenex
Copy link
Collaborator Author

pavlenex commented Aug 13, 2024

One open question that I have is should this be addressed since we're doing #1066 or added there as a to-do? cc @jbesraa @plebhash

Seems to me this can be done quickly as it's simple to be done and can even be a good first issue for 1.0.3, but up to you guys.

@average-gary
Copy link
Contributor

.

@pavlenex pavlenex added this to the 1.0.3 milestone Aug 13, 2024
@pavlenex pavlenex linked a pull request Aug 14, 2024 that will close this issue
@GitGab19 GitGab19 moved this from Todo 📝 to Ready For Review 🔍 in SV2 Roadmap 🛣️ Aug 20, 2024
@plebhash plebhash modified the milestones: 1.0.3, 1.1.0 Aug 20, 2024
@github-project-automation github-project-automation bot moved this from Ready For Review 🔍 to Done ✅ in SV2 Roadmap 🛣️ Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants