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

aquatic_http: peer addr should already have been extracted by now #197

Closed
zmiguel opened this issue Apr 13, 2024 · 6 comments
Closed

aquatic_http: peer addr should already have been extracted by now #197

zmiguel opened this issue Apr 13, 2024 · 6 comments

Comments

@zmiguel
Copy link

zmiguel commented Apr 13, 2024

Installed as per the docs here, tested on both x86_64 and arm64

After starting with ./target/release/aquatic_http -c "aquatic-http-config.toml" and giving it some traffic it will always crash after a few minutes with a socket worker panic with the message peer addr should already have been extracted by now.

I've tried playing around with the memlock and also running it as root, but no change, it always ends up crashing after some time.

Here's error with RUST_BACKTRACE=full :

02:21:41 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce?info_hash=%0b%10%0d%3f%da%a5%3c%3d%c6%98%10%02KTr%96%0a%2a8%c8&peer_id=-UT360W-%c4%b7%04%c9%e0%12%e6CX%ac%91%1c&port=44290&uploaded=0&downloaded=9006958060&left=0&corrupt=0&key=1CAD4AAF&numwant=200&compact=1&no_peer_id=1
02:21:41 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: corrupt
02:21:41 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: no_peer_id
02:21:42 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /scrape?info_hash=%0b%10%0d%3f%da%a5%3c%3d%c6%98%10%02KTr%96%0a%2a8%c8
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce?info_hash=%cf%bd%f1%a4%e08%19%b6Q%9b%af%27%84%bd%9b%c7A%f5%ff%8a&peer_id=-Tp0000-.pmdNGaF2t-r&port=39277&uploaded=0&downloaded=44040192&left=2104235913&corrupt=0&key=9C6413F0&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: corrupt
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: no_peer_id
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: supportcrypto
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: redundant
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce
02:21:43 [DEBUG] (socket-01) aquatic_http::workers::socket::connection: Failed parsing request: no query string
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce?info_hash=%13%b2%91%0aVy%a4%0a%5c%ac%df%ab6%dd%ae%91%28UPP&peer_id=-UT360W-%c4%b7%04%c9%e0%12%e6CX%ac%91%1c&port=44290&uploaded=10797056&downloaded=1393622563&left=0&corrupt=0&key=1CAD4AAF&numwant=200&compact=1&no_peer_id=1
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: corrupt
02:21:43 [DEBUG] (socket-01) aquatic_http_protocol::request: ignored unrecognized key: no_peer_id
02:21:44 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /scrape?info_hash=%13%b2%91%0aVy%a4%0a%5c%ac%df%ab6%dd%ae%91%28UPP
02:21:45 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce
02:21:45 [DEBUG] (socket-01) aquatic_http::workers::socket::connection: Failed parsing request: no query string
02:21:45 [DEBUG] (socket-01) aquatic_http_protocol::request: request GET path: /announce
02:21:45 [DEBUG] (socket-01) aquatic_http::workers::socket::connection: Failed parsing request: no query string
thread 'socket-01' panicked at crates/http/src/workers/socket/connection.rs:446:18:
peer addr should already have been extracted by now
stack backtrace:
   0:     0xb4a18c199960 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hece1148e1500c9a2
   1:     0xb4a18c065e90 - core::fmt::write::hb4e3acbf271edb44
   2:     0xb4a18c196804 - std::io::Write::write_fmt::h8ca942adea865c1e
   3:     0xb4a18c19978c - std::sys_common::backtrace::print::h2b12b67a16e9135f
   4:     0xb4a18c19ac58 - std::panicking::default_hook::{{closure}}::hf72040aae8f7970a
   5:     0xb4a18c19a98c - std::panicking::default_hook::hff2a626330bfd796
   6:     0xb4a18c19b0c4 - std::panicking::rust_panic_with_hook::hdbe957ea7e1caf24
   7:     0xb4a18c19af94 - std::panicking::begin_panic_handler::{{closure}}::h5f3c13bf100f9a71
   8:     0xb4a18c199e34 - std::sys_common::backtrace::__rust_end_short_backtrace::hd8a0426804ef2ca9
   9:     0xb4a18c19ad34 - rust_begin_unwind
  10:     0xb4a18bf6cfc0 - core::panicking::panic_fmt::heae5498d3da202ba
  11:     0xb4a18bf6cf90 - core::option::expect_failed::h39c56eaa3bce6881
  12:     0xb4a18c00847c - aquatic_http::workers::socket::connection::run_connection::{{closure}}::h8c46d45577788a16
  13:     0xb4a18c008c34 - aquatic_http::workers::socket::run_socket_worker::{{closure}}::{{closure}}::{{closure}}::he8c6f8133edad29d
  14:     0xb4a18c001624 - <futures_lite::future::Race<F1,F2> as core::future::future::Future>::poll::hd7072edc84899fd5
  15:     0xb4a18bfdcf10 - <core::pin::Pin<P> as core::future::future::Future>::poll::h6bbae0ecb7f29323
  16:     0xb4a18bfaa0d8 - glommio::task::raw::RawTask<F,R,S>::run::hc26468ae5081c969
  17:     0xb4a18c0ad5ac - glommio::executor::LocalExecutor::run_task_queues::h85fe1fdb72baac06
  18:     0xb4a18bfc02ac - scoped_tls::ScopedKey<T>::set::ha1615bc524603fc0
  19:     0xb4a18bfe81b0 - std::sys_common::backtrace::__rust_begin_short_backtrace::h942b8cc9ce563b57
  20:     0xb4a18c00cc34 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h60de96789818e5fe
  21:     0xb4a18c19d494 - std::sys::pal::unix::thread::Thread::new::thread_start::h1a4b48df802ee0a8
  22:     0xe06961b4d5c8 - <unknown>
  23:     0xe06961bb5edc - <unknown>
  24:                0x0 - <unknown>
Error: Socket worker 1 panicked
@greatest-ape
Copy link
Owner

Thanks. I've pushed a change that I think should fix the issue, could you please try pulling and building again?

@zmiguel
Copy link
Author

zmiguel commented Apr 14, 2024

@greatest-ape I'll keep this running, but at first glance seems to be fixed, and yes it was running behind a reverse-proxy

@greatest-ape
Copy link
Owner

Ok, great!

@greatest-ape
Copy link
Owner

Does it seem like the issue was fixed?

@zmiguel
Copy link
Author

zmiguel commented Apr 16, 2024

yeah it's been running without any issues since.

Closing

@zmiguel zmiguel closed this as completed Apr 16, 2024
@greatest-ape
Copy link
Owner

Great, thanks.

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

2 participants