Skip to content

WASM: wasm plugin will always create failed if base wasm is failed due to previous threadlocal wasm on_configure failed #514

@StarryVae

Description

@StarryVae

Title: WASM: wasm plugin will always create failed if base wasm is failed due to previous threadlocal wasm on_configure failed

Description:

envoyproxy/envoy#43751

If the on_configure method of a thread-local WASM handle fails during a previous configuration push, subsequent push of the WASM plugin configuration will be permanently rejected, because here if on_configure failed in thread-local WASM handle, it will set the state of base wasm handle to failed.

base_handle->wasm()->fail(FailState::ConfigureFailed,

but the base wasm handle has been cached, so if the same wasm plugin push again, it will hit the base wasm handle, and finally result create wasm plugin failed always.

auto it = base_wasms->find(vm_key);

https://github.com/envoyproxy/envoy/blob/4dc08b16cd8027df07e1f18ecc288acf0941076b/source/extensions/common/wasm/wasm.cc#L395

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions