Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 614476

Summary: Implement xen_panic_block notifier for RHEL6 Xen guests
Product: Red Hat Enterprise Linux 6 Reporter: Dave Anderson <anderson>
Component: kernelAssignee: Don Dutile (Red Hat) <ddutile>
Status: CLOSED CURRENTRELEASE QA Contact: Chao Ye <cye>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: clalance, drjones, lwang, phan, qcai, syeghiay, yuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 16:10:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to provide xen dump when xen guest crashes none

Description Dave Anderson 2010-07-14 14:55:00 UTC
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 13:22:52 UTC
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 14:17:47 UTC
*** Bug 523132 has been marked as a duplicate of this bug. ***

Comment 3 RHEL Program Management 2010-07-15 14:53:02 UTC
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 (Red Hat) 2010-07-16 21:50:03 UTC
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 (Red Hat) 2010-07-16 22:12:09 UTC
Created attachment 432516 [details]
Patch to provide xen dump when xen guest crashes

Posted patch attached

Comment 8 Aristeu Rozanski 2010-07-26 15:16:55 UTC
Patch(es) available on kernel-2.6.32-52.el6

Comment 11 Yufang Zhang 2010-08-09 05:03:40 UTC
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 16:10:40 UTC
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.