Sporadically GDB running interactively in a docker container terminates, caused by a supposed KeyboardInterrupt (though I didn't enter anything). Sometimes even when starting:
Reading symbols from ./Main...
Exception ignored in: <gdb._GdbOutputFile object at 0x7fb993b97880>
Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/__init__.py", line 43, in flush
def flush(self):
KeyboardInterrupt:
What might be the cause of this and how to fix it?
Seems to be the result of SIGTERM -- there's a bug report for it. In my case, the SIGTERM was coming from the out-of-memory killer, so it also seemed 'random' and unexpected.