Skip to content

Extproc tap 1.27 upport patch#10

Closed
nfuden wants to merge 6 commits intorelease/v1.27-backportedforkfrom
extproc-tap-1.27-upport-patch
Closed

Extproc tap 1.27 upport patch#10
nfuden wants to merge 6 commits intorelease/v1.27-backportedforkfrom
extproc-tap-1.27-upport-patch

Conversation

@nfuden
Copy link
Copy Markdown

@nfuden nfuden commented Nov 30, 2023

No description provided.

ashishb-90 and others added 4 commits November 28, 2023 17:58
On this branch, I created a diff of all commits that we created on top of Envoy
1.26 for extproc and tap.

The last commit from upstream envoy was
dbbe864, off of which the first extproc commit
(b1e99e5) was written. Several extproc commits
ensued, and then on top of the last extproc commit was a single commit
(4d15e7f) to backport upstream tap changes
onto the v1.26.x + extproc branch.

Given this, I created a patch by running

    git diff --patch dbbe864...4d15e7f > extproc-tap.patch

This resulted in a single large patch file which I applied on top of `v1.27.1`,
which is where this branch starts. Tap merged fine (1 merge conflict), while
extproc was more difficult - lots of merge conflicts in the following files:

    api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto
    changelogs/current.yaml
    source/common/runtime/runtime_features.cc
    source/extensions/filters/common/expr/evaluator.cc
    source/extensions/filters/http/ext_proc/ext_proc.h
    source/extensions/filters/http/ext_proc/processor_state.h
    source/extensions/transport_sockets/tap/config.cc
    test/extensions/filters/http/ext_proc/config_test.cc
    test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc
    test/extensions/filters/http/ext_proc/filter_test.cc

I tried to resolve them myself, and to be frank, I think I did a pretty damn
good job. But there are still a few compile errors that I don't know how to
resolve, so I'm going to push this branch from here and see if I can pull in
some help.

The good news is that a lot of it compiles - everything in `source/` compiles
successfully, including `//source/exe:envoy-static`!

The bad news is that some tests don't compile, and I also cannot be assured
that any of the extproc tests will pass. (I could write a fancy bazel command
to run some of the tests that _do_ compile, but I'd rather enjoy my evening.)
The tests were some of the hardest conflicts to resolve, and clearly there is
still some work here left to be done, so this part remains a work in progress.
The tests compile now. Not sure if this is the correct fix though so a second
pair of eyes would be great here.
The fix was to simply copy the builder initialisation code from
`createFilterFactoryFromProtoTyped` into
`createFilterFactoryFromProtoWithServerContextTyped`
@nfuden nfuden closed this Nov 30, 2023
ben-taussig-solo pushed a commit that referenced this pull request Jan 29, 2024
Commit Message: the probing socket is released when port migration fails. If this happens in response to an incoming packet during an I/O event, the follow socket read could cause use-after-free.

[2024-01-08 16:30:53.386][12][critical][backtrace] [./source/server/backtrace.h:104] Caught Segmentation fault, suspect faulting address 0x0
[2024-01-08 16:30:53.387][12][critical][backtrace] [./source/server/backtrace.h:91] Backtrace (use tools/stack_decode.py to get line numbers):
[2024-01-08 16:30:53.387][12][critical][backtrace] [./source/server/backtrace.h:92] Envoy version: 0/1.29.0-dev/test/DEBUG/BoringSSL
[2024-01-08 16:30:53.413][12][critical][backtrace] [./source/server/backtrace.h:96] #0: Envoy::SignalAction::sigHandler() [0x55bb876d499e]
[2024-01-08 16:30:53.413][12][critical][backtrace] [./source/server/backtrace.h:98] #1: [0x7f55fbf92510]
[2024-01-08 16:30:53.440][12][critical][backtrace] [./source/server/backtrace.h:96] #2: Envoy::Network::Utility::readPacketsFromSocket() [0x55bb875de0ef]
[2024-01-08 16:30:53.466][12][critical][backtrace] [./source/server/backtrace.h:96] #3: Envoy::Quic::EnvoyQuicClientConnection::onFileEvent() [0x55bb8663e1eb]
[2024-01-08 16:30:53.492][12][critical][backtrace] [./source/server/backtrace.h:96] #4: Envoy::Quic::EnvoyQuicClientConnection::setUpConnectionSocket()::$_0::operator()() [0x55bb8663f192]
[2024-01-08 16:30:53.518][12][critical][backtrace] [./source/server/backtrace.h:96] #5: std::__invoke_impl<>() [0x55bb8663f151]
[2024-01-08 16:30:53.544][12][critical][backtrace] [./source/server/backtrace.h:96] #6: std::__invoke_r<>() [0x55bb8663f0e2]
[2024-01-08 16:30:53.569][12][critical][backtrace] [./source/server/backtrace.h:96] #7: std::_Function_handler<>::_M_invoke() [0x55bb8663efc2]
[2024-01-08 16:30:53.595][12][critical][backtrace] [./source/server/backtrace.h:96] #8: std::function<>::operator()() [0x55bb85cb8f44]
[2024-01-08 16:30:53.621][12][critical][backtrace] [./source/server/backtrace.h:96] #9: Envoy::Event::DispatcherImpl::createFileEvent()::$_5::operator()() [0x55bb8722560f]
[2024-01-08 16:30:53.648][12][critical][backtrace] [./source/server/backtrace.h:96] #10: std::__invoke_impl<>() [0x55bb872255c1]
[2024-01-08 16:30:53.674][12][critical][backtrace] [./source/server/backtrace.h:96] #11: std::__invoke_r<>() [0x55bb87225562]
[2024-01-08 16:30:53.700][12][critical][backtrace] [./source/server/backtrace.h:96] #12: std::_Function_handler<>::_M_invoke() [0x55bb872253e2]
[2024-01-08 16:30:53.700][12][critical][backtrace] [./source/server/backtrace.h:96] #13: std::function<>::operator()() [0x55bb85cb8f44]
[2024-01-08 16:30:53.726][12][critical][backtrace] [./source/server/backtrace.h:96] #14: Envoy::Event::FileEventImpl::mergeInjectedEventsAndRunCb() [0x55bb872358ec]
[2024-01-08 16:30:53.752][12][critical][backtrace] [./source/server/backtrace.h:96] #15: Envoy::Event::FileEventImpl::assignEvents()::$_1::operator()() [0x55bb87235ed1]
[2024-01-08 16:30:53.778][12][critical][backtrace] [./source/server/backtrace.h:96] #16: Envoy::Event::FileEventImpl::assignEvents()::$_1::__invoke() [0x55bb87235949]
[2024-01-08 16:30:53.804][12][critical][backtrace] [./source/server/backtrace.h:96] #17: event_persist_closure [0x55bb87fab72b]
[2024-01-08 16:30:53.830][12][critical][backtrace] [./source/server/backtrace.h:96] #18: event_process_active_single_queue [0x55bb87faada2]
[2024-01-08 16:30:53.856][12][critical][backtrace] [./source/server/backtrace.h:96] #19: event_process_active [0x55bb87fa56c8]
[2024-01-08 16:30:53.882][12][critical][backtrace] [./source/server/backtrace.h:96] #20: event_base_loop [0x55bb87fa45cc]
[2024-01-08 16:30:53.908][12][critical][backtrace] [./source/server/backtrace.h:96] #21: Envoy::Event::LibeventScheduler::run() [0x55bb8760a59f]
Risk Level: low
Testing: new unit test
Docs Changes: N/A
Release Notes: Yes
Platform Specific Features: N/A

Signed-off-by: Dan Zhang <danzh@google.com>
Co-authored-by: Dan Zhang <danzh@google.com>
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

Successfully merging this pull request may close these issues.

2 participants