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

Tcp outgoing fails with "rapid fire" multiple requests (12+). #331

Closed
meowjesty opened this issue Sep 5, 2022 · 0 comments
Closed

Tcp outgoing fails with "rapid fire" multiple requests (12+). #331

meowjesty opened this issue Sep 5, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@meowjesty
Copy link
Member

Bug Description

With the MIRRORD_TCP_OUTGOING feature enabled, if you try to make multiple requests in quick succession (tested on node), one of the channels appear to close before some request is completed, breaking the whole thing.

Steps to Reproduce

  1. Enable MIRRORD_TCP_OUTGOING;
  2. Make multiple requests (reproduced with around 12 or more);
  3. ???
  4. ECONNRESET error.

Backtrace

>> www.google.com request failed with Error: socket hang up
file:///home/lanedraex/dev/metalbear/mirrord/tests/node-e2e/outgoing/test_outgoing_traffic_multiple_requests.mjs:33
    throw fail;
    ^

Error: socket hang up
    at connResetException (node:internal/errors:692:14)
    at TLSSocket.socketOnEnd (node:_http_client:478:23)
    at TLSSocket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1344:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET'
}

Node.js v18.0.0

Relevant Logs

2022-09-05T14:30:53.300557Z ERROR mirrord_layer: Error handling daemon message: SendErrorConnection(SendError([23, 3, 3, 0, 19, 127, 101, 127, 111, 194, 221, 230, 193, 252, 77, 138, 200, 99, 240, 32, 99, 33, 123, 17]))
2022-09-05T14:30:53.300794Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.300808Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.300859Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.300881Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 11
2022-09-05T14:30:53.300975Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301020Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 2
2022-09-05T14:30:53.301119Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301141Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 4
2022-09-05T14:30:53.301240Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301244Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301265Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 14
2022-09-05T14:30:53.301271Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301291Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 18
2022-09-05T14:30:53.300884Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 16
2022-09-05T14:30:53.301326Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301342Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 3
2022-09-05T14:30:53.301376Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301397Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 9
2022-09-05T14:30:53.301401Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301391Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301417Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 19
2022-09-05T14:30:53.301426Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 8
2022-09-05T14:30:53.301470Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301475Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301487Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 10
2022-09-05T14:30:53.301299Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 5
2022-09-05T14:30:53.301504Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301492Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 17
2022-09-05T14:30:53.301525Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 6
2022-09-05T14:30:53.301552Z  WARN mirrord_layer::tcp::outgoing: interceptor_task -> exiting due to remote stream closed!
2022-09-05T14:30:53.301569Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 0
2022-09-05T14:30:53.300865Z TRACE mirrord_layer::tcp::outgoing: interceptor_task done -> connection_id 12

Your operating system and version

Windows 10, running in Ubuntu-wsl

Local process

sample node js that makes multiple requests

Local process version

No response

Additional Info

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants