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 603142 - [RHEL6] crash needs to support (or distinguish between) both upstream version 9 and RHEL5 version 9
Summary: [RHEL6] crash needs to support (or distinguish between) both upstream version...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: crash
Version: 6.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dave Anderson
QA Contact: Han Pingtian
URL:
Whiteboard:
Depends On: 603026 603027
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-11 16:34 UTC by Dave Anderson
Modified: 2010-12-31 07:00 UTC (History)
7 users (show)

Fixed In Version: crash-5.0.0-19.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 603027
Environment:
Last Closed: 2010-11-10 20:04:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dave Anderson 2010-06-11 16:34:08 UTC
+++ This bug was initially created as a clone of Bug #603027 +++

+++ This bug was initially created as a clone of Bug #603026 +++

Commit a82c8e4d836121cec49ccd9031438a3110f2e192 bumped the CPU version to 9, however the format is very different from the version 9 of upstream QEMU.  This causes problems in crash, which uses QEMU's savefiles as kvm core dumps.

Until now, the differences did nothing problematic, but for version 9 upstream does this:

                int32_t pending_irq = (int32_t) get_be32 (fp);
                if (pending_irq >= 0)
                        dx86->kvm.int_bitmap[pending_irq / 64] |=

instead of this:

                for (i = 0; i < 4; i++)
                        dx86->kvm.int_bitmap[i] = get_be64 (fp);

(Source code from qemu-load.c in git://git.engineering.redhat.com/users/pbonzini/qemu-reader.git).  In other words, the first 32 bits of the bitmap are treated as an index, causing an out-of-bounds access.

Of course, adding a "<= 255" check is easily done, but it's only a matter of time until RHEL5's version will hit 12 and we'll have serious problems handling both RHEL5 and RHEL6 dumps.

I suggest adding a fake __rhel5 section in the dumps for 5.5.z and 5.6, so that we can look for that in crash.  I'll attach the patch soon.

--- Additional comment from pbonzini on 2010-06-11 07:45:06 EDT ---

Created an attachment (id=423247)
patch to add support for RHEL5.6 and RHEL6

This patch is relative to crash5.0.4p12, and it adds complete support for RHEL5.6 and RHEL6.

With this patch it is also possible to load the registers for all CPUs, which may be useful---maybe crash can show the values to the user?

--- Additional comment from pbonzini on 2010-06-11 07:46:22 EDT ---

Created an attachment (id=423248)
incremental RHEL5-only patch

This patch, on top of the previous, is suitable for RHEL5.5.z, RHEL5.6, and RHEL6 as it allows reading dumps that do not have a __rhel5 marker.  It is not suitable for upstream.

--- Additional comment from pbonzini on 2010-06-11 07:51:01 EDT ---

Created an attachment (id=423250)
patch to add support for RHEL5.6 and RHEL6

fixed version of attachment 423247 [details]

--- Additional comment from anderson on 2010-06-11 12:32:57 EDT ---

> This patch, on top of the previous, is suitable for RHEL5.5.z, RHEL5.6, and
> RHEL6 as it allows reading dumps that do not have a __rhel5 marker.  It is not
> suitable for upstream.

In off-line discussions, it's been noted that the upstream version of crash
should *always* work with RHEL dumpfiles, so both patches will be applied
upstream, and the RHEL5 and RHEL6 versions of crash will follow upstream.

I have tested the patches against a RHEL5 KVM guest dumpfile taken from
a RHEL6 host, and it works OK.

I do not have a sample RHEL5 KVM guest dumpfile taken from a RHEL5 host, 
but Paolo has indicated that he will make one available to me for testing.

When that dumpfile is available for testing, I'll devel_ack this BZ and continue
the process.

I'll also clone this BZ for RHEL6.

Thanks,
  Dave

Comment 1 Dave Anderson 2010-06-11 16:37:22 UTC
The supplied patch-set has been successfully tested with a RHEL6 KVM guest
running on a RHEL6 host.

Comment 2 Dave Anderson 2010-06-11 16:38:36 UTC
(In reply to comment #1)
> The supplied patch-set has been successfully tested with a RHEL6 KVM guest
> running on a RHEL6 host.    

That should read: 

  successfully tested with a RHEL5 KVM guest running on a RHEL6 host.

Comment 3 RHEL Program Management 2010-06-11 16:52:55 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 Han Pingtian 2010-09-03 06:48:43 UTC
Verified with -23.el6:

[hpt@hpt 603142]$ strings 23/bin/crash|grep __rhel
__rhel5

Comment 7 releng-rhel@redhat.com 2010-11-10 20:04:19 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.


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