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 703467 - Need an option to retrieve kernel version from vmcore
Summary: Need an option to retrieve kernel version from vmcore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: crash
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Dave Anderson
QA Contact: Kernel Dump QE
URL:
Whiteboard:
Depends On:
Blocks: 694828
TreeView+ depends on / blocked
 
Reported: 2011-05-10 12:44 UTC by Denys Vlasenko
Modified: 2011-12-06 16:29 UTC (History)
2 users (show)

Fixed In Version: crash-5.1.7-1.el6
Doc Type: Bug Fix
Doc Text:
With this update, the new "--osrelease [dump_file]" command line option that displays the OSRELEASE vmcoreinfo string from a kdump dump file has been added.
Clone Of:
Environment:
Last Closed: 2011-12-06 16:29:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1648 0 normal SHIPPED_LIVE crash bug fix and enhancement update 2011-12-06 00:50:30 UTC

Description Denys Vlasenko 2011-05-10 12:44:49 UTC
GSS wants to have a way to hook vmcore analysis into abrt. abrt team is working on it.

One obstacle in this effort is that in order to process vmcore and extract useful information from it, crash tool needs corresponding debuginfo file.

In order to find/download this debuginfo, abrt needs to know the version of crashed kernel which produced vmcore.

This information is stored in RHEL6-produced vmcore. We just need a convenient way to extract it.

On Wed, 2011-04-27 at 14:23 -0400, Dave Anderson wrote:
> > But if the vmcore is an ELF kdump or a makedumpfile-generated
> > compressed dumpfile that has vmcoreinfo included (a fairly recent
> > innovation, but in RHEL6), then the strings check is totally valid,
> > because it shows the OSRELEASE= vmcoreinfo string:
> > 
> > $ strings vmcore | grep OSRELEASE=
> > OSRELEASE=2.6.32-15.el6.x86_64
> > $
> 
> Actually I'm guilty of overstating the need for needing the vmlinux 
> file *if* the vmcoreinfo OSRELEASE= string is all you need.  You could 
> conceivably do this:
> 
>   # crash -d1 vmcore | grep OSRELEASE
>                         OSRELEASE=2.6.32-132.el6.kdump.1.i686
>   # 
> 
> The -d1 flag will dump the contents of the dumpfile header,
> prior to failing because of no vmlinux argument.  And amongst
> the header contents will be the vmcoreinfo data if it exists.
> 
> It's a bit cleaner than "strings" I suppose...
> 
> But if you wanted to access the actual kernel data structure
> containing the OS release data (from which the vmcoreinfo data
> string was generated)
> 

I don't need that.

What I need it a way to find corresponding kernel debuginfo file
for RHEL6-generated vmcore. Not by hand, but with automated code.

I don't want to rely on heuristics such as "most likely current kernel
is the same one which crashed and generated thus vmcore" - this may be untrue. Similarly, I would rather not use "strings vmcore | grep OSRELEASE=" solution, since it can extract bogus OSRELEASE.

Since this information *is* recorded in RHEL6-generated vmcore, I would like a way to fetch it. I am ok with the restriction that it works only on makedumpfile-generated vmcore.

Parsing crash -d1 output is not a solution. -d1 is a debugging switch.
It may change its format over time. It may change its meaning.
It may be removed in later version, for all I know.

Comment 1 Dave Anderson 2011-05-10 13:18:19 UTC
It would also work on ELF kdumps as well.  The only reason that it works
with makedumpfile-generated vmcores is because the "vmcoreinfo" ELF note
exists in the /proc/vmcore ELF dumpfile, and it gets transferred to the
makedumpfile-generated vmcore.  It's just not available from "virsh dump"
generated kvmdump dumpfiles

Comment 2 Jiri Moskovcak 2011-06-02 15:32:09 UTC
Ping, any news on this? Since we're going to rebase ABRT in RHEL6.2 we need to provide the new packages before end of July and all features it depends on needs to be available sooner, so we can properly integrate them.

Comment 3 Dave Anderson 2011-06-02 15:43:15 UTC
It's going to included in the RHEL6.2 crash utility errata.

Comment 5 Dave Anderson 2011-07-13 15:32:53 UTC
$ file vmcore
vmcore: data
$ crash --osrelease vmcore
2.6.32-156.el6.x86_64
$

$ file vmcore
vmcore: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV), SVR4-style
$ crash --osrelease vmcore
2.6.32-1.el6.x86_64
$

Comment 8 Tomas Capek 2011-10-18 15:03:17 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
With this update, the new "--osrelease [dump_file]" command line option that displays the OSRELEASE vmcoreinfo string from a kdump dump file has been added.

Comment 9 errata-xmlrpc 2011-12-06 16:29:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1648.html


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