Debian: coredump files not generated in container regression tc test_coredump_file_creation

Bug #1972135 reported by Jiping Ma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Jiping Ma

Bug Description

Debian: coredumps unexpectedly not getting generated by tc
functional/z_containers/test_core_dump_creation.py::test_coredump_file_creation

Severity

standard

Steps to Reproduce

Run jenkins tc that kills process and looks for coredump files to be generated
/z_containers/test_core_dump_creation.py::test_coredump_file_creation

Repeats Kill the process operations
kubectl exec ng -n default – /bin/sh -c "kill -6 <processid>"
Then tries to find the coredump
'ls -l /var/lib/systemd/coredump | grep core.nginx.*.xz'

Expected Behavior

Expect that coredump file(s) will be generated
Actual Behavior

No coredump files were actually generated
E utils.exceptions.SSHExecCommandFailed: Failed to execute command via SSH.
E Details: Non-zero return code for cmd: ls -l /var/lib/systemd/coredump | grep core.nginx.*.xz. Output:

utils/clients/ssh.py:574: SSHExecCommandFailed

Reproducibility

yes

System Configuration+

simplex Debian
jn
Last Pass
The tc get further on centos (ie. actually creates the coredump files) but fails on the teardown

Timestamp/Logs
Lab: r730_1

System Type: AIO-SX
OpenStack Deployed: False
Ends at: 20220427 00:06:00
Session Tag: None
Session ID: 4789016f-d970-428f-96b9-3346273f2333
Software Version: 22.02

Alarms

Please indicate if there are any alarms observed.

If there are any alarms please list them here

Test Activity

Regression Testing (Debian)

Workaround

Describe workaround if available

Attachments

Jiping Ma (jma11)
Changed in starlingx:
assignee: nobody → Jiping Ma (jma11)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to utilities (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/utilities/+/841090

Changed in starlingx:
status: New → In Progress
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.debian
Changed in starlingx:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to utilities (master)

Reviewed: https://review.opendev.org/c/starlingx/utilities/+/841090
Committed: https://opendev.org/starlingx/utilities/commit/7d71d83678c58dcff63e6f02ce67647b67cbd3ab
Submitter: "Zuul (22348)"
Branch: master

commit 7d71d83678c58dcff63e6f02ce67647b67cbd3ab
Author: Jiping Ma <email address hidden>
Date: Sun May 8 18:04:12 2022 -0700

    Debian: Fix the issue coredump files can not be generated.

    Compares with v219 systemd(CentOS use this one), v247 systemd
    adds the parameter META_ARGV_HOSTNAME as the upstream commit:
    https://github.com/systemd/systemd/commit/f45b8015513d38ee5f7cc361db9c5b88c9aae704
    which was integrated in the v238 systemd that need be 7 arguments.
    But they are 6 arguments in our old config file, so there prints
    out the error information in kernel dmesg that caused coredump
    file can not be generated.

    systemd-coredump[1496]: Not enough arguments passed by the kernel
    (6, expected 7).

    This commit adds coredump-sysctl-debian.conf for debian that adds
    parameters as the code in src/coredump/coredump.c.
    https://github.com/systemd/systemd/blob/main/src/coredump/coredump.c.

    META_ARGV_PID, /* %P: as seen in the initial pid namespace */
    META_ARGV_UID, /* %u: as seen in the initial user namespace */
    META_ARGV_GID, /* %g: as seen in the initial user namespace */
    META_ARGV_SIGNAL, /* %s: number of signal causing dump */
    META_ARGV_TIMESTAMP, /* %t: time of dump, expressed as
    seconds since the Epoch (we expand this to µs granularity) */
    META_ARGV_RLIMIT, /* %c: core file size soft resource limit */
    META_ARGV_HOSTNAME,/* %h: hostname */
    _META_ARGV_MAX,

    The coredump-sysctl-debian.conf also includes default settings for
    enabling coredumps by default, as expected by StarlingX.

    Test Plan:
    PASS: Build debian ISO and boot up with qemu.
    PASS: Generate the coredump file after the fix.
       1. sleep 10 &
       2. killall -SIGSEGV sleep
       3. ls /var/lib/systemd/coredump/
        core.sleep.1878.df5133eec12a4ee2a158237c7b5b41a8.1746.1653040470000000.zst

    PASS: Build CentOS ISO and boot up in the lab.
    PASS: Generate the coredump file.

    Closes-bug: 1972135

    Signed-off-by: Jiping Ma <email address hidden>
    Change-Id: I5c9a4d820430d6cad51636cd94b3363fadef4748

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.