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

Stratum error, thread 'stratum_server' panicked at 'called Option::unwrap() on a None value': #2414

Closed
rlinxy opened this issue Jan 18, 2019 · 4 comments

Comments

@rlinxy
Copy link

rlinxy commented Jan 18, 2019

Was running stratum for mining for 2 days without problem. But around 12 hours ago, got error as below, then all miners can not connect to the stratum.

20190118 14:45:37.270 ERROR grin_util::logger -
thread 'stratum_server' panicked at 'called Option::unwrap() on a None value': libcore/option.rs:355stack backtrace:
0: 0x55f48b7e79ed - backtrace::backtrace::trace::hd74837959dc31a2c
1: 0x55f48b7e6c02 - <backtrace::capture::Backtrace as core::default::Default>::default::hfbe03539066da14f
2: 0x55f48b7e6c79 - backtrace::capture::Backtrace::new::hd9d47426559d8b68
3: 0x55f48b770960 - grin_util::logger::send_panic_to_log::{{closure}}::h6b81febaf2dee014
4: 0x55f48b8b87b6 - std::panicking::rust_panic_with_hook::hde420d6fd4455550
at libstd/panicking.rs:480
5: 0x55f48b8b8301 - std::panicking::continue_panic_fmt::h8f394f3c578bcc76
at libstd/panicking.rs:390
6: 0x55f48b8b81e5 - rust_begin_unwind
at libstd/panicking.rs:325
7: 0x55f48b90225c - core::panicking::panic_fmt::hca5dc4e8b320bc56
at libcore/panicking.rs:77
8: 0x55f48b90218b - core::panicking::panic::hca17aeb7dac42859
at libcore/panicking.rs:52
9: 0x55f48b242bd9 - grin_servers::mining::stratumserver::StratumServer::handle_rpc_requests::h37641ad4ed0ad706
10: 0x55f48b2458ea - grin_servers::mining::stratumserver::StratumServer::run_loop::ha8ac7fd410c1993f
11: 0x55f48b2358d8 - std::sys_common::backtrace::__rust_begin_short_backtrace::h094e9a7f299b0a6b
12: 0x55f48b20e418 - std::panicking::try::do_call::h661125717ff9fb5c
13: 0x55f48b8ca859 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
14: 0x55f48b2181d7 - <F as alloc::boxed::FnBox>::call_box::hdc56abe3a22a6fdf
15: 0x55f48b8b4d3d - <alloc::boxed::Box<(dyn alloc::boxed::FnBox<A, Output=R> + 'a)> as core::ops::function::FnOnce>::call_once::h9d902c911a417e39
at liballoc/boxed.rs:682
- std::sys_common::thread::start_thread::h44127e03e78ca137
at libstd/sys_common/thread.rs:24
16: 0x55f48b8a00b5 - std::sys::unix::thread::Thread::new::thread_start::h8f17b97f2223146c
at libstd/sys/unix/thread.rs:90
17: 0x7fa72c73b6b9 - start_thread
18: 0x7fa72c25b41c - clone
19: 0x0 -

@rlinxy
Copy link
Author

rlinxy commented Jan 18, 2019

The system is Ubuntu 16.04
Have tried both the 'grin' executable download from 'release' here and the one complied by myself, version 1.0.0
Thanks.

@rlinxy
Copy link
Author

rlinxy commented Jan 18, 2019

Seems it happens when some 'specific' miners trying to connect to the stratum server. I guess the code is here from line 306 to 310, /grin/servers/src/mining/stratumserver.rs
Still trying to figure it out. We may have to block a worker if it sent wrong data.

@rlinxy
Copy link
Author

rlinxy commented Jan 18, 2019

By reading the code hours, I am thinking if this happens due to some rig sent wrong data, why not just block it. Is it really neccessary to use 'unwrap' other than 'unwrap_or()'?

@ignopeverell
Copy link
Contributor

Duplicate of #2421

@ignopeverell ignopeverell marked this as a duplicate of #2421 Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants