2

We have an application foo, which I installed manually on a Ubuntu machine (packaging is not an option). foo is called from a script. Now, when this application crashes, I do get an entry in /var/crash, but no core dump gets created. So from reading up on this I did the following:

  • Disabled apport (in /etc/default/apport).
  • Disable system soft dump limit (* soft core unlimited to /etc/security/limits.conf)
  • Put ulimit -Sc unlimited and ulimit -Hc unlimited before call to foo.

Still, I do not get a core dump (would expect it to appear in the same directory as foo).

Could someone please tell me, what I am missing.

  • Q1: What does your /proc/sys/kernel/core_pattern look like? This determines how kernel handles core dumps. See man7.org/linux/man-pages/man5/core.5.html. Do you still see pipe to apport in your core pattern? If yes, then you need to understand what the enable=0 in /etc/default/apport actually means to apport. And please, when finding the answer, do answer your own question, as this apport beast really seems badly documented. – FooF Nov 18 '15 at 3:00
  • 1
    Q2: Just to make sure, after setting limits, does ulimit -Sc show unlimited as output? I.e. did you verify that you really succeeded setting the limit at the time with the user account you were using. – FooF Nov 18 '15 at 3:06
2

Perhaps you've gone about it the wrong way - by default, apport doesn't have to be disabled to handle unpackaged binaries, it will just log a few lines in its log file (/var/log/apport.log) and fall through to the default kernel behavior - write the core file to the current directory.

If this did not work for you, it probably wasn't about apport, it's more likely you didn't have some other prerequisite, such as the directory of foo not being writable to the user running the binary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.