proxy-wasm-cpp-sdk icon indicating copy to clipboard operation
proxy-wasm-cpp-sdk copied to clipboard

Failed to load Wasm module

Open liuqi-sun opened this issue 3 years ago • 4 comments

[source/extensions/common/wasm/wasm_vm.cc:39] Failed to load Wasm module due to a missing import: env.pthread_rwlock_init

liuqi-sun avatar Mar 18 '21 09:03 liuqi-sun

Any more info? How do you build the Wasm module, and what is the version of envoy?

bianpengyuan avatar Mar 18 '21 16:03 bianpengyuan

Sounds like your C++ code is multi-threaded, and that's not currently supported in Wasm.

PiotrSikora avatar Mar 18 '21 18:03 PiotrSikora

Any more info? How do you build the Wasm module, and what is the version of envoy?

./bazel-bin/source/exe/envoy-static --version

./bazel-bin/source/exe/envoy-static version: 5c801b25cae04f06bf48248c90e87d623d7a6283/1.17.0/Modified/DEBUG/BoringSSL

liuqi-sun avatar Mar 23 '21 04:03 liuqi-sun

Sounds like your C++ code is multi-threaded, and that's not currently supported in Wasm. I use gflag library that may be is multi-threaded. it is ok after I delete gflag library

liuqi-sun avatar Mar 23 '21 04:03 liuqi-sun