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
  • 143
  • 5

1 Answers1

1

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
  • 46,990
  • 12
  • 80
  • 129
  • Thanks für your fast reply. My ulimit is unlimited. My quota is not reached yet, i have about 100Gb left, while the program needs about 3Gb for everything, the actual Disk is far from beeing full. And as i wrote, most of the crahses of this same programm do write a core dump. – why.n0t Feb 20 '14 at 09:23
  • @Alex Let me rephrase: a core dump gives you an image of the whole memory. If your program is running setuid, then, by laying hands on the core you will have gained access to info to which you, as a regular user, should not be privy. What may happen is that, when the core is dumped, your program was not running setuid, and otherwise when the core is dumped. Many innocent looking commands like *ping* run setuid. Can you exclude that your program never runs setuid programs/commands/..? – MariusMatutiae Feb 20 '14 at 10:17
  • I can't exclude it. But i monitored the prozess for some time now with top, and the realUID and UID doesn't change. – why.n0t Feb 20 '14 at 11:39