Skip to content
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

Find and fix memory leaks #4939

Open
justinchuby opened this issue Feb 24, 2023 · 5 comments
Open

Find and fix memory leaks #4939

justinchuby opened this issue Feb 24, 2023 · 5 comments
Labels
better engineering Improve engineering quality of the project contributions welcome good first issue Good for getting started

Comments

@justinchuby
Copy link
Contributor

Enable ASan and fix memory leaks following #4823

@jcwchen @gramalingam

@zhenhuaw-me
Copy link
Member

Hi @justinchuby, if there is instruction about how to enable ASan/LSan in ONNX and run?

We recently see more segfault reports of tools that are built on ONNX package. They usually stuck or crash in protobuf's CopyFrom() function which is invoked by onnx.save(). And the system memory (hundreds of GB) are all taken by the process.

cc @kevinch-nv

@justinchuby justinchuby added the good first issue Good for getting started label Jul 31, 2023
@justinchuby
Copy link
Contributor Author

I don’t think we have an option yet. https://github.com/onnx/onnx/blob/main/CMakeLists.txt is what we will have to edit. @jcwchen is that right?

Contribution/help would be much appreciated!

@justinchuby
Copy link
Contributor Author

This is a previously failed attempt: #5053

@jcwchen
Copy link
Member

jcwchen commented Jul 31, 2023

I don’t think we have an option yet. https://github.com/onnx/onnx/blob/main/CMakeLists.txt is what we will have to edit. @jcwchen is that right?

I can confirm that currently there is no predefined build option to enable memory check. To enable it, developers need to manually add sanitizer options into DCMAKE_CXX_FLAGS. For example, https://github.com/onnx/onnx/pull/4823/files.

@justinchuby justinchuby added better engineering Improve engineering quality of the project and removed infrastructure labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better engineering Improve engineering quality of the project contributions welcome good first issue Good for getting started
Projects
Development

No branches or pull requests

3 participants