deepflow icon indicating copy to clipboard operation
deepflow copied to clipboard

[BUG] wasm 插件 memory overflow 导致agent pod 重启

Open wuzongling opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

DeepFlow Component

Agent

What you expected to happen

in_fn: "vm_read_ctx_base" memory overflow, mem size is 3221225472 but bias to -2073970768

企业微信截图_1d1fde7b-1972-4718-95ae-093b704d63d1

How to reproduce

No response

DeepFlow version

No response

DeepFlow agent list

No response

Kubernetes CNI

No response

Operation-System/Kernel version

No response

Anything else

No response

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

wuzongling avatar Apr 28 '24 03:04 wuzongling

The pointer addresses passed in the wasm plugin should have a value range of uint64.

img_v3_02ae_06e7c307-70c7-41a7-80db-dbbb5479112g

After calling the import method of the wasm plugin, deepflow-agent will check the memory boundary and perform check_memory. The memory limit in wasm is 4G (the limit for 32-bit programs). When we perform check_memory, we receive a pointer address, the original parameter type is i32, but it should actually be u32.

img_v3_02ae_82c7e0b7-94df-4272-ae0d-77f38858aa9g

sharang avatar Apr 30 '24 07:04 sharang