Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5871

RFE: let the admin configure the coredump naming

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • High
    • rhel-plumbers
    • ssg_core_services
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      On RHEL8, the coredump naming in /var/lib/systemd/coredump is hardcoded to "core.<COMM>.<UID>.<bootid>.<PID>.<TS>000000"

      This needs to be enhanced to let the admin name the coredumps as he needs to, typically adding the <HOSTNAME> (hostname or container name), which is initially available when systemd-coredump executes through kernel.core_pattern.

      This would help a lot analyzing OCP issues for examples.

      Version-Release number of selected component (if applicable):

      systemd-239 but also Upstream (looks like at least, from reading the code)

      How reproducible:

      ALWAYS

      Steps to Reproduce:
      1. Create a miniroot to execute "bash"

      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      1. yum -y install --installroot=/tmp/test --releasever=/ bash
                    • 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      2. Spawn a container and crash bash in the container

      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      1. systemd-nspawn -D /tmp/test bash
        Spawning container test on /tmp/test.
        Press ^] three times within 1s to kill container.

      bash-4.4# ulimit -c unlimited
      bash-4.4# function foo {
      foo
      }
      bash-4.4# foo
      Container test terminated by signal SEGV.
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      3. Check the core filename (it doesn't show the container name, which would be useful)

      Actual results:

      ------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      1. ls /var/lib/systemd/coredump
        core.bash.0.33efdaea7a3c4cce86184cbbb6c28368.2343.1605715274000000
                    • 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Expected results:

      Some custom naming based on available properties

              systemd-maint systemd maint mailing list
              rhn-support-rmetrich Renaud Métrich
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: