envoyproxy / envoy-wasm

*ATTENTION!: The content of this repo is merged into https://github.com/envoyproxy/envoy and future development is happening there.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

V8 is reporting bogus signature mismatches at runtime (after load).

jplevyak opened this issue · comments

After making unrelated changes, suddenly I am getting.

[ RUN ] Runtimes/WasmNetworkFilterTest.HappyPath/0
unknown file: Failure
C++ exception with description "Function: proxy_on_new_connection failed: Uncaught RuntimeError: function signature mismatch" thrown in the test body.
test/extensions/filters/network/wasm/wasm_filter_test.cc:73: Failure
Actual function call count doesn't match EXPECT_CALL(filter(), log_(spdlog::level::trace, Eq(absl::string_view("onNewConnection 2"))))...
Expected: to be called once
Actual: never called - unsatisfied and active
Stack trace:
0x31a4119: testing::internal::GoogleTestFailureReporter::ReportFailure()
0x14a7968: testing::internal::Expect()
0x31aabaf: testing::internal::UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()
0x4a5990: testing::internal::FunctionMocker<>::~FunctionMocker()
0x4b0d68: Envoy::Extensions::NetworkFilters::Wasm::TestFilter::~TestFilter()
0x4b0683: Envoy::Extensions::NetworkFilters::Wasm::TestFilter::~TestFilter()
0x4b06cc: Envoy::Extensions::NetworkFilters::Wasm::TestFilter::~TestFilter()
0x4a056f: std::default_delete<>::operator()()
0x469e53: std::unique_ptr<>::~unique_ptr()
0x469ed5: Envoy::Extensions::Common::Wasm::WasmNetworkFilterTestBase<>::~WasmNetworkFilterTestBase()
0x469938: Envoy::Extensions::NetworkFilters::Wasm::WasmNetworkFilterTest::~WasmNetworkFilterTest()
0x4655f8: Envoy::Extensions::NetworkFilters::Wasm::WasmNetworkFilterTest_HappyPath_Test::~WasmNetworkFilterTest_HappyPath_Test()
0x46561c: Envoy::Extensions::NetworkFilters::Wasm::WasmNetworkFilterTest_HappyPath_Test::~WasmNetworkFilterTest_HappyPath_Test()
0x318e85b: testing::Test::DeleteSelf_()
0x319cd44: testing::internal::HandleSehExceptionsInMethodIfSupported<>()
0x318df0e: testing::internal::HandleExceptionsInMethodIfSupported<>()
0x3178d08: testing::TestInfo::Run()
0x31793fc: testing::TestSuite::Run()
... Google Test internal frames ...

[ FAILED ] Runtimes/WasmNetworkFilterTest.HappyPath/0, where GetParam() = "v8" (263 ms)

The type of the function (wasm2wat) is

(type (;0;) (func (param i32) (result i32)))

extern "C" PROXY_WASM_KEEPALIVE FilterStatus proxy_on_new_connection(uint32_t context_id)

WasmCallWord<1> on_new_connection_;

They all match.

This is occurring in #538

This is going to be an upstream blocker.

Is there any update on this issue, or any idea as to what the problem is?

I believe this was fixed already, and was happening due to bad context cast inside Envoy.

cc @jplevyak to confirm and close this issue.