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

[Issue] Gateway with embedded network requester crashes at common/nymsphinx/chunking/src/reconstruction.rs:108:26 #4429

Open
numbleroot opened this issue Feb 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working bug-needs-triage A bug that needs discussing and triage needs-triage qa Quality Assurance

Comments

@numbleroot
Copy link

Describe the issue

Setup and procedure are the same as for #4406, thus I've copied and modified the report text below.

On nym-binaries-v2023.5-rolo, when running a gateway with embedded network requester (initialized by adding flags --with-network-requester --open-proxy true) with at least 4 endpoints constantly sending HTTP requests towards this embedded network requester, the gateway sometimes crashes with the following panic:

thread 'tokio-runtime-worker' panicked at common/nymsphinx/chunking/src/reconstruction.rs:108:26:
index out of bounds: the len is X but the index is Y

with Y >= X, as these values differ across the instances I've observed.

I've seen this panic crash a gateway on at least 3 individual attempts at running my endpoints-to-embedded-network-requester setup. It can take quite a while to occur, but typically happens eventually.

Expected behaviour

The gateway should not panic.

Stack traces

thread 'tokio-runtime-worker' panicked at common/nymsphinx/chunking/src/reconstruction.rs:108:26:
index out of bounds: the len is X but the index is Y

with Y >= X, as these values differ.

Steps to reproduce

Initialize and run a Nym nym-binaries-v2023.5-rolo gateway with embedded network requester configured to act as an open proxy. Have 4 or more HTTP clients hooked up to their own independent nym-socks5-clients send constant HTTP requests (e.g., by iterating through a list of URLs) to this embedded network requester through Nym. I've set up all involved Nym endpoints to be registered with this one gateway (i.e., the embedded network requester and all nym-socks5-clients use this one gateway as their gateway, no other gateway involved). Wait for the panic to occur eventually, maybe after some panics of type #4406 (it seems the "index out of bounds" issue occurs less frequently than the "Tried to insert duplicate pending ack" issue). As a side note, I'm typically seeing gateway logs indicating around 300 concurrently ongoing proxies at the gateway when this error occurs.

Screenshots

n/a

Which area of Nym were you using?

  • Application: nym-gateway (with embedded network-requester), nym-socks5-client
  • OS: Ubuntu 22.04
  • Version: nym-binaries-v2023.5-rolo

Additional context

I currently have no theory for why this error occurs.

@numbleroot numbleroot added bug Something isn't working bug-needs-triage A bug that needs discussing and triage needs-triage qa Quality Assurance labels Feb 26, 2024
@octol
Copy link
Contributor

octol commented Mar 27, 2024

This looks like a bug, we need to fix this

@octol octol self-assigned this Apr 10, 2024
@octol
Copy link
Contributor

octol commented Apr 10, 2024

Self-assigning this to myself so we don't forget about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bug-needs-triage A bug that needs discussing and triage needs-triage qa Quality Assurance
Projects
None yet
Development

No branches or pull requests

3 participants