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

mem leak #143

Open
jackxia123 opened this issue Oct 27, 2023 · 3 comments
Open

mem leak #143

jackxia123 opened this issue Oct 27, 2023 · 3 comments

Comments

@jackxia123
Copy link

Describe the bug
we found our app is leaked out ,we use heaptrack to catch yyjson file exists leak mem

Your environment

  • OS: linux
  • Compiler: gcc 9.3 for arm

Additional context
if you want to know more , i will give you the stack traces logs

@ibireme
Copy link
Owner

ibireme commented Oct 27, 2023

Please share the code or steps to reproduce the issue.
If available, providing the stack trace logs would be helpful as well.

@tannerdsilva
Copy link

tannerdsilva commented Jun 30, 2024

I have a backend linux process that has been getting sigkill by the kernel for memory (much to my surprise). This is a repeated issue. As such, I've been prompted to shoehorn my linux process into a signed MacOS binary so that I can profile with the nice tools on that platform.

I came into the profile test fully expecting my binary target to have a leak (as I'm using Unmanaged and a lot of other stuff)....but the verdict is clear, yyjson is the leaker.

Screenshot 2024-06-29 at 9 47 21 PM

See column right, according to my tools and application context, the leak is squarely in this yyjson_mut_write_minify function.

There may be other leaks but this is the one I'm hitting in my application, now on MacOS and Linux.

@tannerdsilva
Copy link

update: upon further inspection, the leak here was my responsibility. so I have no evidence to contribute towards a memory leak in yyjson.

the yyjson header documentation made it clear how I needed to handle this memory and I failed to stay in line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants