The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Phantom Menace: memory leak that wasn't there

flakm.com
submitted
a year ago
byboredgamertoprogramming

Summary

The main character, the leaky program, is a legacy rust application. We are migrating it to Kubernetes. The migration went smoothly - we had a few hiccups, but nothing major. And then the hell broke loose.

In my previous blog post I wrote about heaptrack - a tool that can trace heap allocations. I’ve used it before and it has been an excellent tool for finding memory leaks in c/rust/C++ applications. I wanted to pinpoint the exact location of the leak. And fix it as soon as possible.

The application was running on a server at 127.0.0%. The data was in a file called /tmp/leaks. It was being used to create a heap profile and check for leaks or excessive memory usage.

Problems with the application are being fixed, but not yet fixed. The problem is with the way the data is calculated and the way it is displayed.

Do not trust your instincts. Don’t jump to conclusions. Don't give up - the problem is there; you must find it.

 oscilloscope scope cathode-ray oscilloscope CRO shoji monitor digital clock-0
11

5 Comments

3
joseph
a year ago
Memory leaks are some of the worst bugs to run into. It is never the first place you look and always something you won't think of until it's too late.
2
boredgamerOP
a year ago
I've had one, worst thing ever. it taught me to desperately check all new code for possible memory leaks and has worked well since.
2
justadev
a year ago
I almost always find them when working on something else. I try not to worry too much unless it's affecting something massive.
2
joseph
a year ago
Isn't there a name for something like that?
1
justadev
a year ago
I wouldn't know