Application core file name generated does not match kernel.core_pattern set, name truncated

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 4 and 5

Issue

  • Application core file name generated does not match kernel.core_pattern set in this format:

     kernel.core_pattern =  /san/runtime/data/core/core.%e.%p.%h.%u.%g.%t

  • Generated core is truncated with %t

Resolution

  • The core_pattern in RHEL4 and RHEL5 has a limit of 64 characters, so the last parts were probably truncated due to this limit.
  • As this is a kernel limit, I'm afraid it wont be easy to change.
  • As a workaround, can you try to create a sym link like "ln -s /san/runtime/data/core/ /core".

Root Cause

From kernel Documentation/kernel/sysctl.txt

core_pattern:

core_pattern is used to specify a core dumpfile pattern name.
.  max length 64 characters; default value is "core"
. core_pattern is  used as a pattern template for the output filename;
  certain string  patterns (beginning with '%') are substituted with
  their actual  values.
. backward compatibility with core_uses_pid:
        If  core_pattern does not include "%p" (default does not)
        and  core_uses_pid is set, then .PID will be appended to
        the  filename.
. corename format specifiers:
        %<NUL>  '%'  is dropped
        %%      output one '%'
        %p      pid
        %u      uid
        %g      gid
        %s      signal  number
        %t      UNIX time of dump
        %h      hostname
        %e      executable filename
        %<OTHER> both are  dropped

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.