-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suspected memory leak with wazero.NewCircom2WZWitnessCalculator #22
Comments
… a method Close to Calculator interface. It calls the Close method on the underlying CalculatorImpl if one is supports optional io.Closer interface.
… a method Close to Calculator interface. It calls the Close method on the underlying CalculatorImpl if one is supports optional io.Closer interface.
Actually it was not required to call the I can confirm the memory leak. It turns out resources was not freed acquired by wasm compilation process. It seems was a bug in the wazero module. After upgrading it to the latest version it looks like everything works as expected. @syntrust could you check please that PR #23 works for you? |
…erface (#23) * Upgrade wazero module to v1.8.0, that fixes #22 memory leak. Also add a method Close to Calculator interface. It calls the Close method on the underlying CalculatorImpl if one is supports optional io.Closer interface. * Call the Close method on witness calculator * Upgrade golangci-lint version * Upgrade Go version we test witnesscalc from 1.21 to 1.23
@olomix Yes that works for me. |
Hello, I have followed the usage in the unit test sample
witness/test_wasm_impls/witness_test.go
when usingwazero.NewCircom2WZWitnessCalculator
in my project, and I noticed a continuous increase in memory usage while calculating witnesses usingCalculateWTNSBin
. I am not sure if it is a memory leak but, when I keep the unit test case running with pprof, it seems that the memory usage also increases.Please correct me if I am wrong, but is the
Close
method supposed to solve this issue? If so, when and how should it be used? Any feedback would be appreciated.The text was updated successfully, but these errors were encountered: