tursodatabase / tursodatabase/libsql
WASM UDF Memory Leak
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
It looks like there's a memory leak in the wasm udf implementation. I built v0.2.2 in a docker container, and created a very simple function, but invoking it will cause the memory usage of the container to increase, remaining until the container is restarted.
basic docker implementation: https://github.com/uname-n/libsql-wasm
#[libsql_bindgen::libsql_bindgen]
pub fn hello_world() -> f64 {
return 1.0;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WASM UDF implementation and reproduce the leak using the linked Docker setup and the Rust hello_world function. Measure container memory across repeated invocations, then identify the allocation lifetime involved. Done means the reproduction no longer shows unbounded memory growth and a regression test or equivalent verification covers the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust, wasm
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100