When I run gdb on my binary inside kubernetes pod in container it starts loading symbol after that it suddenly gets terminated with SIGTERM and exit code 137. I checked for describe pod it shows reason Error. I have added ptrace capabilities in yaml. Can someone help me with this.
Exit code 137 means that the process was killed by signal 9 (137=128+9). Most likely reason is that container was running out of memory and gdb was killed by OOM Killer. Check dmesg
output for any messages from OOM Killer.