2

First of all: I have core dumps enabled and they work most of the time.

So one programm crashes every now and then and generates a core dump. But sometimes it crashes without a core dump. Which is very frustrating.

Are there any crashes which are so heavy that they cause no core dump?

why.n0t
  • 145

1 Answers1

2

There is a small number of reasons for a crash producing no core dump, the first one of which I guess does not apply to you:

1) ulimit has not been set to unlimited: you should issue

  ulimit -c unlimited

2) There is not enough disk space left, or you are not allowed to write to the directory from which you issued the command that crashes, or you might be overwriting an existing file;

3) The program requires some setxid program, in which case data is not dumped because of security concerns. The dump might contain some confidential data which would be made available to unauthorized users. To circumvent this, issue, as sudo,

 echo 2 >/proc/sys/fs/suid_dumpable

Please notice the unusual flag, 2: 1 means drop all security to allow debugging system as a whole. 2 is more restricted.

If you have access to the code, you may try enabling setrlimit inside the code, or make a call to prctl(PR_SET_DUMPABLE, 1).

MariusMatutiae
  • 48,517
  • 12
  • 86
  • 136