Core Analysis Fundamentals

Agenda

  • Basic knowledge about core
  • Practical examples

What is core

Core is a file created by the operating system when a program terminates unexpectedly, due to a bug, or a violation of the operating system's or hardware's protection mechanisms. The operating system kills the program and creates a core file that programmers can use to figure out what went wrong. It contains a detailed description of the state that the program was in when it died. Core, core file, core dump are the same thing.

OS configuration

  • Linux
    • Check whether core generation is enabled: ulimit -c
    • Enable core generation: ulimit -c unlimited
  • Windows
    • Install tool 'DebugDiag'

Play with the core

int main()
{
    int lIntegers[100000000];
    int lInteger = 0;
    int *lpInteger = 0;
    *lpInteger = lInteger;
}
  • Generate core with the code below

 

 

 

 

  • Load the core to check what is wrong

More practical examples

  • Server services
    • Synchronized
      • 3-tier command
      • Most XLM command
      • Most REST command
    • A-synchronized
      • Job

Thank You!

Core Analysis Fundamentals

By bawu

Core Analysis Fundamentals

  • 11