I run a program in C / C ++ on Linux servers to display a video. The main functionality of the program (for example, called Plugin) is to convert the video, and we deploy a separate Plugin process for each video request. But I have a strange problem for which sometimes the average server load becomes unexpectedly high. What I see from the top team at this stage is that there are some processes that work for a long time and take some huge processors.
When I debug this running program using gdb and backtrace stack, I found a damaged stack: "Previous frame inside this frame (damaged stack?)". I searched the network and found that this happens if the program receives a segmentation error.
But what I know, if the program receives a segmentation error, the program should fail and exit at that moment. But it is surprising that the program still works after segmentation failure.
What could be the reasons for this? I know that the program should have some big problems, but I just canโt figure out where to start fixing the problem ... It would be great if any of you could show me some lights ...
Thank you in advance
source share