I have a core dump under Linux. The process went on memory allocation rampage and I need to find at least which library this happens in.
What tool do you suggest to get broad overview of where the memory is going? I know the problem is hard/unsolvable fully. Any tool that could at least give some clues would help.
[it's a python process, the suspicion is that the memory allocations are caused by one of the custom modules written in C]
With a core file, we can use the debugger (GDB) to inspect the state of the process at the moment it was terminated and to identify the line of code that caused the problem. That's a situation where a core dump file could be produced, but it's not by default.
In a terminal, run sleep 30 to start a process sleeping for 30 seconds. While it is running, press Ctrl + \ to force a core dump. You'll now see a core file in the directory you are in.
Try running linux perf tool on the python process with callgraph enabled. if its multi threaded process give all associated LWPs as arguments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With