envoy icon indicating copy to clipboard operation
envoy copied to clipboard

ext_proc: Stop timers during ExternalProcessing::Filter::onDestroy

Open ristewar opened this issue 3 years ago • 8 comments

Signed-off-by: Rick Stewart [email protected]

Commit Message: If a timer fires after onDestroy is called, the ext_proc filter may crash while trying to access invalid encoder or decoder filter callbacks. The documentation for StreamFilterBase::onDestroy() says, "Filters must not invoke either encoder or decoder filter callbacks after having onDestroy() invoked." [email protected] said it's OK to upstream this since ext_proc is marked alpha.

Additional Description: Risk Level: Low Testing: Unit tests added Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional API Considerations:]

ristewar avatar Aug 03 '22 15:08 ristewar

/assign @mpwarres @PiotrSikora

ristewar avatar Aug 03 '22 15:08 ristewar

You might also consider adding a test case to ext_proc_integration_test.cc similar to ExtProcIntegrationTest.ResponseMessageTimeout, but with the added element that the downstream disconnects before time is advanced.

mpwarres avatar Aug 03 '22 15:08 mpwarres

You might also consider adding a test case to ext_proc_integration_test.cc similar to ExtProcIntegrationTest.ResponseMessageTimeout, but with the added element that the downstream disconnects before time is advanced.

Done.

ristewar avatar Aug 04 '22 18:08 ristewar

/retest

ristewar avatar Aug 09 '22 18:08 ristewar

Retrying Azure Pipelines: Check envoy-presubmit didn't fail.

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22541#issuecomment-1209711139 was created by @ristewar.

see: more, trace.

/retest

ristewar avatar Aug 10 '22 00:08 ristewar

Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22541#issuecomment-1210017556 was created by @ristewar.

see: more, trace.

LGTM, thanks! CI seems to be in a bad state, can you take a look?

Thanks! I fixed the tests.

ristewar avatar Aug 11 '22 10:08 ristewar