ram
ram

Reputation: 23

What happens internally when the core dump is generated

This question is mainly oriented towards Linux operating system. The below command enables core dump generation in the system.

ulimit -S -c unlimited

Can someone provide more details on what happens internally when any application crashes and when core dump is generated.

  1. Who tracks the termination of applications
  2. Who generates the core dump
  3. How it is generated ? Can we generate a core dump manually ?
  4. What are all the packages required for this purpose internally ?

Any references would be of great help.

Thanks in advance.

Upvotes: 2

Views: 420

Answers (1)

Number 9
Number 9

Reputation: 615

I created a short blog post a while back that aims to answer questions 1 and 2 and part of 3 here https://venshare.com/blog/what-is-a-core-dump

For the other part of 3 - You can manually generate a coredump by sending it a signal as documentented here https://man7.org/linux/man-pages/man7/signal.7.html

e.g. To send a signal such as SIGQUIT use the kill command

kill -3 [pid]
  1. You shouldn't need to install anything on the operating system just ensure that the ulimit is set and the kernel.core_pattern is set to a capture mechanism. You should also be aware of the suid_dumpable bit that can come into play with some processes. https://serverfault.com/questions/56800/on-redhat-what-does-kernel-suid-dumpable-1-mean

Updated from Ben's points below

Upvotes: 2

Related Questions