bulwark
bulwark copied to clipboard
Connection resets aren't handled gracefully
There's an issue with how ungracefully connection resets are handled.
INFO handle request [ 6.65ms | 0.00% / 100.00% ]
INFO ┕━ route request [ 6.65ms | 0.00% / 100.00% ]
TRACE ┝━ 📍 [trace]: get_request_header_message (ProcessingRequest)
INFO ┝━ i [info]: "process request" | method: "GET" | uri: "/hello"
INFO ┝━ execute on_init [ 205µs | 3.08% ]
INFO ┝━ execute on_request [ 226µs | 3.40% ]
INFO ┝━ execute on_request_decision [ 6.22ms | 93.52% ]
INFO │ ┕━ i [info]: "plugin decision" | name: "known_offensive_tools" | accept: 0.0 | restrict: 0.0 | unknown: 1.0 | score: 0.5 | weight: 1.0
INFO ┝━ i [info]: "combine decision" | accept: 0.0 | restrict: 0.0 | unknown: 1.0 | score: 0.5 | outcome: "accepted" | observe_only: true | tags: ""
TRACE ┝━ 📍 [trace]: send_allow_request_message (ProcessingResponse)
ERROR ┝━ 🚨 [error]: "send error: send failed because receiver is gone"
TRACE ┝━ 📍 [trace]: get_response_headers_message (ProcessingRequest)
ERROR ┕━ 🚨 [error]: "response error: missing envoy headers"
Once send_allow_request_message failed, it seems likely get_response_headers_message shouldn't still have been called since it was presumably guaranteed to fail at that point?
Notably this is an issue that was identified in the api-refactor branch, but may also exist in the main branch. This issue should be tackled after that branch is merged since this area of the code is changed substantially in the api-refactor branch.