Bug 614476 - Implement xen_panic_block notifier for RHEL6 Xen guests
Implement xen_panic_block notifier for RHEL6 Xen guests
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Don Dutile
Chao Ye
:
: 523132 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-14 10:55 EDT by Dave Anderson
Modified: 2011-01-12 05:20 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 11:10:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to provide xen dump when xen guest crashes (2.24 KB, patch)
2010-07-16 18:12 EDT, Don Dutile
no flags Details | Diff

  None (edit)
Description Dave Anderson 2010-07-14 10:55:00 EDT
Description of problem:

While implementing crash utility support for RHEL6 pvops/Xen guests running
on a RHEL5 Xen host (BZ #608779), I noticed that when a RHEL6 pvops/Xen
guest kernel crashed, it did not automatically trigger a "virsh dump" by
the RHEL5 Xen host.

Inspecting the RHEL6 sources, only the ia64 pvops architecture registers
the "xen_panic_block" notifier.  So it looks RHEL6 needs to implement
the xen_panic_block notifier both in the pvops/Xen infrastructure as
well as in the platform-pci module.  

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

kernel-2.6.32-44.el6

How reproducible:

Always.

Steps to Reproduce:
1. Panic the RHEL6 Xen guest kernel.
2.
3.
  
Actual results:

Guest kernel panics, but no corefile is created on the RHEL5 Xen host.

Expected results:

Automatic triggering of a "virsh dump" on the RHEL6 Xen host.

Additional info:
Comment 1 Chris Lalancette 2010-07-15 09:22:52 EDT
Dave and I went over this, and the above is exactly right.  In arch/x86/xen/enlighten.c, xen registers a crash_shutdown callback in the machine_ops structure.  However, the callback is only ever called *if* kexec is configured, which is not the case in a xen PV guest.  Therefore, we need to implement a panic notifier block; if crash_kexec() fails (which it will in the Xen PV case), then the panic notifier list will be run, at which point we will do the appropriate crash hypercall.

Note that this is analogous to the situation in RHEL-5, where a crash_kexec() and the panic notifier blocks behave similarly.

Chris Lalancette
Comment 2 Andrew Jones 2010-07-15 10:17:47 EDT
*** Bug 523132 has been marked as a duplicate of this bug. ***
Comment 3 RHEL Product and Program Management 2010-07-15 10:53:02 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 4 Don Dutile 2010-07-16 17:50:03 EDT
setting exception flag & rhel6.0.0 flags to ?

dont see blocker flag box to set to ? to get reviewed.

Posting (simple) patches shortly.
Comment 5 Don Dutile 2010-07-16 18:12:09 EDT
Created attachment 432516 [details]
Patch to provide xen dump when xen guest crashes

Posted patch attached
Comment 8 Aristeu Rozanski 2010-07-26 11:16:55 EDT
Patch(es) available on kernel-2.6.32-52.el6
Comment 11 Yufang Zhang 2010-08-09 01:03:40 EDT
QA verified this bug on RHEL5.5 Xen host with the latest RHEL6 guest(20100805.0).

xen and kernel-xen packages:
kernel-xen-devel-2.6.18-206.el5
xen-3.0.3-115.el5
xen-debuginfo-3.0.3-115.el5
xen-devel-3.0.3-115.el5
kernel-xen-2.6.18-206.el5
xen-libs-3.0.3-115.el5

RHEL6 guest kernel:
2.6.32-59.el6.i686

Steps:
(1) enable "enable-dump" in xend-config.sxp and restart xend
(2) In the guest(RHEL6 HVM 32 and 64 bit guest, RHEL6 PV 32 bit guest), 
    # echo c > /proc/sysrq-trigger
(3) The guest crashes with call trace

We could find core dump files in the directory /var/lib/xen/dump/ for the crashed guest. 
 
For RHEL6 64 bit PV guest, there is a bug(BZ#621846) which will result in guest crashing at boot time. So there is dump core file generated automatically whenever you try to create such a guest. 

Change this bug to VERIFIED.
Comment 12 releng-rhel@redhat.com 2010-11-11 11:10:40 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.