Investigating Spontaneous Server Reboots on CentOS 7 via Kernel Crash Dumps
Infrastructure Baseline
A newly provisioned bare-metal host running containerized workloads experienced uncoordinated system restarts. The target environment operated on CentOS Linux 7.3 (Core) utilizing kernel 3.10.0-514.el7.x86_64 and Docker Engine 19.03.6. Initial diagnostics were required to isolate whether the instability stemmed from hardware faults, misconfigured services, or a kernel-level defect.
Diagnostic Workflow
The troubleshooting process followed a structured isolation path:
- System Log Review: Inspecting
/var/log/messagesconfirmed an abrupt halt followed by a clean boot approximately four minutes later. The standard syslog provided no pre-crash warnings or hardware fault indicators. - Hardware Validation: Platform telemetry and management controller logs were exported to the OEM to verify firmware compatibility and rule out physical memory or storage controller degradation.
- Memory Dump Analysis: Since traditional logs proved insufficient, the
kdumpfacility was leveraged to capture kernel state at the moment of panic.
Crash Dump Interpretation
Following the configuration of the crash recovery mechanism, a vmcore artifact was successfully written to /var/crash during a subsequent failure event. The dump was analyzed using the crash utility paired with the matching vmlinux debug binary:
crash /var/crash/127.0.0.1-2020-04-01-18:19:32/vmcore \
/usr/lib/debug/lib/modules/3.10.0-514.el7.x86_64/vmlinux
Upon initialization, the utility immediately surfaced the panic trigger:
PANIC: "kernel BUG at fs/xfs/xfs_aops.c:1062!"
PID: 92639
COMMAND: "kworker/u898:3"
STATE: TASK_RUNNING (PANIC)
Executing the backtrace command reconstructed the execution path leading to the failure:
crash> bt
...
[exception RIP: xfs_vm_writepage+1419]
RIP: ffffffffa052b2fb RSP: ffff880106fa7948 RFLAGS: 00010246
...
#12 [ffff880106fa7b88] xfs_vm_writepages at ffffffffa052a063 [xfs]
The instruction pointer resolved to the xfs_vm_writepage routine at an offset of +1419. This specific offset correlated with a known defect in the XFS writeback path documented by upstream maintainers and enterprise Linux vendors. The resolution required scheduling a controlled kernel upgrade to a patched release that addressed the page cache invalidation logic.
Diagnostic Toolchain Provisioning
To replicate this crash capture and analysis capability on similar systems, deploy the following configuraton sequence:
Core Utilities Installation
# Define target storage path for dump artifacts
DUMP_TARGET="/var/crash"
# Install memory analysis framework and kexec dependencies
yum install -y crash kexec-tools
# Update configuration and activate the capture daemon
sed -i "s|^path .*|path ${DUMP_TARGET}|" /etc/kdump.conf
systemctl enable --now kdump.service
Debug Symbol Registration
Accurate stack resolution requires exact-match symbol packages. Retrieve and install them directly from the distribution debug repository:
DEBUG_REPO="http://debuginfo.centos.org/7/x86_64"
COMMON_SYM="kernel-debuginfo-common-x86_64-3.10.0-514.el7.x86_64.rpm"
MAIN_SYM="kernel-debuginfo-3.10.0-514.el7.x86_64.rpm"
rpm -Uvh "${DEBUG_REPO}/${COMMON_SYM}"
rpm -Uvh "${DEBUG_REPO}/${MAIN_SYM}"