User Process crash dump file creation.

Most of the time, it has been observed that the user process stops unexpectedly. It is difficult to conclude the root cause  by analyzing application log. In that case, there may be a chance that process gets crashed due to invalid read/write access violation. It is also known as segmentation fault.

Some time, it is difficult to understand why segmentation fault occur. To do analysis, you may need to debug dump(core) file. By default system will not create dump(core) file whenever the crash occur. User has to configure system so that whenever a user process crashed, OS will create dump file. Here is the steps to configure system to get dump(core) file whenever user process crash.

LINUX

In the Linux system, user has give below command in root privilege.

$ ulimit -c unlimited.

By default, core file name will be core for each process. To give proper name to core file with process name, PID etc., User has to modify “/proc/sys/kernel/core_pattern” . For information, refer “man core” page.

WINDOWS

To Enable the dump file creation whenever user process crash user has to create below registry using administrator privileges.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps 

User has to follow below steps to create above entry in registry.

  • Create a file with name as “dump.reg”.
  • Open “dump.reg” with notepad.
  • Add below content and save it.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
“DumpFolder”=hex(2):44,00,3a,00,5c,00,64,00,75,00,6d,00,70,00,00,00
“DumpCount”=dword:00000010
“DumpType”=dword:00000002
“CustomDumpFlags”=dword:00000000

  • Execute “dump.reg”. It will create a registry as “LocalDumps”. which can be confirmed by “regedit.exe” command.
  • Create a folder in C:\CrashDumps.

After above configure, if any user process crash, the dump file will be created in “C:\CrashDumps” location so that user can do analysis to find cause of crash.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: