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

Linux: thread 'main' panicked at src/speedtest.rs:284:10: #138

Open
iam-TJ opened this issue Sep 15, 2024 · 0 comments
Open

Linux: thread 'main' panicked at src/speedtest.rs:284:10: #138

iam-TJ opened this issue Sep 15, 2024 · 0 comments

Comments

@iam-TJ
Copy link

iam-TJ commented Sep 15, 2024

I run IPv6 only networks. When passing the --ipv6 parameter this crash occurs but without it the program executes correctly using IPv6!

$ cfspeedtest --version
cfspeedtest 1.2.6

$ RUST_LOG=debug RUST_BACKTRACE=full cfspeedtest --ipv6
Starting Cloudflare speed test
[2024-09-15T20:21:37Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
thread 'main' panicked at src/speedtest.rs:284:10:
failed to get response: reqwest::Error { kind: Request, url: "https://speed.cloudflare.com/__down?bytes=0", source: TimedOut }
stack backtrace:
0:     0x563c4bb2a375 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd736fd5964392270
1:     0x563c4bb5175b - core::fmt::write::hc6043626647b98ea
2:     0x563c4bb278ff - std::io::Write::write_fmt::h0d24b3e0473045db
3:     0x563c4bb2a14e - std::sys_common::backtrace::print::h45eb8174d25a1e76
4:     0x563c4bb2b4e9 - std::panicking::default_hook::{{closure}}::haf3f0170eb4f3b53
5:     0x563c4bb2b28a - std::panicking::default_hook::hb5d3b27aa9f6dcda
6:     0x563c4bb2b983 - std::panicking::rust_panic_with_hook::h6b49d59f86ee588c
7:     0x563c4bb2b864 - std::panicking::begin_panic_handler::{{closure}}::hd4c2f7ed79b82b70
8:     0x563c4bb2a839 - std::sys_common::backtrace::__rust_end_short_backtrace::h2946d6d32d7ea1ad
9:     0x563c4bb2b597 - rust_begin_unwind
10:     0x563c4b81da43 - core::panicking::panic_fmt::ha02418e5cd774672
11:     0x563c4b81ded6 - core::result::unwrap_failed::h55f86ada3ace5ed2
12:     0x563c4b836b32 - cfspeedtest::speedtest::fetch_metadata::he0ce9391ed3851c1
13:     0x563c4b8342e0 - cfspeedtest::speedtest::speed_test::h5b6956eae1f0e785
14:     0x563c4b8247f6 - cfspeedtest::main::h57ecd72add4d29d8
15:     0x563c4b822dd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb03a4ce4a2592ae6
16:     0x563c4b8238e9 - std::rt::lang_start::{{closure}}::hb2dbeb1682d5b494
17:     0x563c4bb2218d - std::rt::lang_start_internal::hcee5ed89fc25829a
18:     0x563c4b824965 - main
19:     0x7f3a8444724a - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
20:     0x7f3a84447305 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
21:     0x563c4b81e295 - _start
22:                0x0 - <unknown>

$ RUST_LOG=debug RUST_BACKTRACE=full cfspeedtest -d -m 25m --ipv6
Starting Cloudflare speed test
[2024-09-15T20:05:07Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
thread 'main' panicked at src/speedtest.rs:284:10:
failed to get response: reqwest::Error { kind: Request, url: "https://speed.cloudflare.com/__down?bytes=0", source: TimedOut }
stack backtrace:
0:     0x55691a9bc375 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd736fd5964392270
1:     0x55691a9e375b - core::fmt::write::hc6043626647b98ea
2:     0x55691a9b98ff - std::io::Write::write_fmt::h0d24b3e0473045db
3:     0x55691a9bc14e - std::sys_common::backtrace::print::h45eb8174d25a1e76
4:     0x55691a9bd4e9 - std::panicking::default_hook::{{closure}}::haf3f0170eb4f3b53
5:     0x55691a9bd28a - std::panicking::default_hook::hb5d3b27aa9f6dcda
6:     0x55691a9bd983 - std::panicking::rust_panic_with_hook::h6b49d59f86ee588c
7:     0x55691a9bd864 - std::panicking::begin_panic_handler::{{closure}}::hd4c2f7ed79b82b70
8:     0x55691a9bc839 - std::sys_common::backtrace::__rust_end_short_backtrace::h2946d6d32d7ea1ad
9:     0x55691a9bd597 - rust_begin_unwind
10:     0x55691a6afa43 - core::panicking::panic_fmt::ha02418e5cd774672
11:     0x55691a6afed6 - core::result::unwrap_failed::h55f86ada3ace5ed2
12:     0x55691a6c8b32 - cfspeedtest::speedtest::fetch_metadata::he0ce9391ed3851c1
13:     0x55691a6c62e0 - cfspeedtest::speedtest::speed_test::h5b6956eae1f0e785
14:     0x55691a6b67f6 - cfspeedtest::main::h57ecd72add4d29d8
15:     0x55691a6b4dd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb03a4ce4a2592ae6
16:     0x55691a6b58e9 - std::rt::lang_start::{{closure}}::hb2dbeb1682d5b494
17:     0x55691a9b418d - std::rt::lang_start_internal::hcee5ed89fc25829a
18:     0x55691a6b6965 - main
19:     0x7f239357124a - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
20:     0x7f2393571305 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
21:     0x55691a6b0295 - _start
22:                0x0 - <unknown>

Without --ipv6 it executes well but appears to hit a timeout on a 25MB Upload test:

$ RUST_LOG=debug RUST_BACKTRACE=full cfspeedtest
Starting Cloudflare speed test
[2024-09-15T20:22:38Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
City: London
Country: GB
Ip: 2a0d:3344:11e:1ff0::ff
Asn: 14593
Colo: LHR
latency test    [========----------------------][2024-09-15T20:22:38Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
latency test    [===========================---][2024-09-15T20:22:40Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
latency test    [==============================]
Avg GET request latency 44.71 ms (RTT excluding server processing time)

[2024-09-15T20:22:40Z DEBUG cfspeedtest::speedtest] getting payload iterations for max_payload_size M25
[2024-09-15T20:22:40Z DEBUG cfspeedtest::speedtest] running tests for payload_size 100000
Download 100KB  [==============================]    3.85 mbit/s | 100KB in  207ms -> status: 200 OK
[2024-09-15T20:22:43Z DEBUG cfspeedtest::speedtest] running tests for payload_size 1000000
Download 1MB    [==============================]   19.59 mbit/s |   1MB in  408ms -> status: 200 OK
[2024-09-15T20:22:49Z INFO  cfspeedtest::speedtest] Exceeded threshold
[2024-09-15T20:22:49Z DEBUG cfspeedtest::speedtest] running tests for payload_size 100000
Upload 100KB    [==============================]    3.95 mbit/s | 100KB in  202ms -> status: 200 OK
[2024-09-15T20:22:51Z DEBUG cfspeedtest::speedtest] running tests for payload_size 1000000
Upload 1MB      [==============================]    5.16 mbit/s |   1MB in 1551ms -> status: 200 OK
[2024-09-15T20:23:09Z INFO  cfspeedtest::speedtest] Exceeded threshold

Summary Statistics
Type     Payload |  min/max/avg in mbit/s
[2024-09-15T20:23:09Z DEBUG cfspeedtest::measurements] calc_stats for mbit_measurements [12.246415577489602, 7.904119708209146, 21.228657371274462, 29.715668596600292, 10.725077009069354, 46.603599568823505, 1.6359097736458106, 5.174808692335741, 11.488866971960329, 3.849527494319024]
Download  100KB  |  min 1.64    max 46.60   avg 15.06
[2024-09-15T20:23:09Z DEBUG cfspeedtest::measurements] calc_stats for mbit_measurements [11.344095160668278, 9.19194575745485, 13.512372585378289, 15.298056889958843, 15.92554083455185, 18.506198659337407, 17.295242248566986, 20.111887660144173, 24.06715011654743, 19.591721647323286]
Download  1MB    |  min 9.19    max 24.07   avg 16.48
[2024-09-15T20:23:09Z DEBUG cfspeedtest::measurements] calc_stats for mbit_measurements [3.1637613161019287, 3.6607311267117235, 4.838822892217065, 5.175536269983506, 5.769410078612755, 4.413203256006197, 4.284376863921502, 3.5729299995574033, 3.261766958851946, 3.9477344435625863]
Upload    100KB  |  min 3.16    max 5.77    avg 4.21
[2024-09-15T20:23:09Z DEBUG cfspeedtest::measurements] calc_stats for mbit_measurements [3.8861134334214635, 4.464745044864102, 5.209199803683491, 3.957150171503902, 4.14393592629695, 6.0001326914344375, 3.927061084384679, 4.644309485609912, 4.918096283741058, 5.155002416922883]
Upload    1MB    |  min 3.89    max 6.00    avg 4.63

$ RUST_LOG=debug RUST_BACKTRACE=full cfspeedtest -d -m 25m
Starting Cloudflare speed test
[2024-09-15T20:13:50Z DEBUG reqwest::connect] starting new connection: https://speed.cloudflare.com/
City: London
Country: GB
Ip: 2a0d:3344:11e:1ff0::ff
Asn: 14593
Colo: LHR
latency test    [==============================]
Avg GET request latency 37.17 ms (RTT excluding server processing time)

[2024-09-15T20:13:53Z DEBUG cfspeedtest::speedtest] getting payload iterations for max_payload_size M25
[2024-09-15T20:13:53Z DEBUG cfspeedtest::speedtest] running tests for payload_size 100000
Download 100KB  [==============================]   49.93 mbit/s | 100KB in   16ms -> status: 200 OK
[2024-09-15T20:13:54Z DEBUG cfspeedtest::speedtest] running tests for payload_size 1000000
Download 1MB    [==============================]   23.88 mbit/s |   1MB in  335ms -> status: 200 OK
[2024-09-15T20:13:57Z DEBUG cfspeedtest::speedtest] running tests for payload_size 10000000
Download 10MB   [==============================]   48.48 mbit/s |  10MB in 1650ms -> status: 200 OK
[2024-09-15T20:14:08Z DEBUG cfspeedtest::speedtest] running tests for payload_size 25000000
Download 25MB   [==============================]  108.82 mbit/s |  25MB in 1837ms -> status: 200 OK
[2024-09-15T20:14:32Z DEBUG cfspeedtest::speedtest] running tests for payload_size 100000
Upload 100KB    [==============================]    6.27 mbit/s | 100KB in  127ms -> status: 200 OK
[2024-09-15T20:14:33Z DEBUG cfspeedtest::speedtest] running tests for payload_size 1000000
Upload 1MB      [==============================]    8.63 mbit/s |   1MB in  926ms -> status: 200 OK
[2024-09-15T20:14:42Z DEBUG cfspeedtest::speedtest] running tests for payload_size 10000000
Upload 10MB     [==============================]    4.86 mbit/s |  10MB in 16454ms -> status: 200 OK
[2024-09-15T20:16:12Z DEBUG cfspeedtest::speedtest] running tests for payload_size 25000000
Upload 25MB     [===========================---]thread 'main' panicked at src/speedtest.rs:230:43:OK
failed to get response: reqwest::Error { kind: Request, url: "https://speed.cloudflare.com/__up", source: TimedOut }
stack backtrace:
0:     0x5646648f4375 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd736fd5964392270
1:     0x56466491b75b - core::fmt::write::hc6043626647b98ea
2:     0x5646648f18ff - std::io::Write::write_fmt::h0d24b3e0473045db
3:     0x5646648f414e - std::sys_common::backtrace::print::h45eb8174d25a1e76
4:     0x5646648f54e9 - std::panicking::default_hook::{{closure}}::haf3f0170eb4f3b53
5:     0x5646648f528a - std::panicking::default_hook::hb5d3b27aa9f6dcda
6:     0x5646648f5983 - std::panicking::rust_panic_with_hook::h6b49d59f86ee588c
7:     0x5646648f5864 - std::panicking::begin_panic_handler::{{closure}}::hd4c2f7ed79b82b70
8:     0x5646648f4839 - std::sys_common::backtrace::__rust_end_short_backtrace::h2946d6d32d7ea1ad
9:     0x5646648f5597 - rust_begin_unwind
10:     0x5646645e7a43 - core::panicking::panic_fmt::ha02418e5cd774672
11:     0x5646645e7ed6 - core::result::unwrap_failed::h55f86ada3ace5ed2
12:     0x5646645fff64 - cfspeedtest::speedtest::test_upload::h155f9c133d585604
13:     0x5646645ff8d8 - cfspeedtest::speedtest::run_tests::h48fb3b524bfac5e2
14:     0x5646645fe4de - cfspeedtest::speedtest::speed_test::h5b6956eae1f0e785
15:     0x5646645ee7f6 - cfspeedtest::main::h57ecd72add4d29d8
16:     0x5646645ecdd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb03a4ce4a2592ae6
17:     0x5646645ed8e9 - std::rt::lang_start::{{closure}}::hb2dbeb1682d5b494
18:     0x5646648ec18d - std::rt::lang_start_internal::hcee5ed89fc25829a
19:     0x5646645ee965 - main
20:     0x7fea4beb824a - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
21:     0x7fea4beb8305 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
22:     0x5646645e8295 - _start
23:                0x0 - <unknown>
```
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

No branches or pull requests

1 participant