Bug 1321676

Summary: kernel version detection fails with "virsh dump" of a kvm guest with 3.10.0-327.el7
Product: [Fedora] Fedora EPEL Reporter: Dave Wysochanski <dwysocha>
Component: retrace-serverAssignee: Michal Toman <michal.toman>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: jfilak, michal.toman, nobody, phelia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-21 15:27:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dave Wysochanski 2016-03-28 21:00:48 UTC
Description of problem:
Kernel version detection fails for a simple 'virsh dump' of a kvm guest running 3.10.0-327.el7
This may be a problem with kvm guests overall, or it may have something to do with the versions I'm running.
I can't say I noticed this before so it's possible at least RHEL7u2 guest has something to do with it.

Version-Release number of selected component (if applicable):
retrace-server-1.12-3.el6.noarch 
and
retrace-server-1.15-1.el6.noarch

kvm host: RHEL7.1 (3.10.0-229.7.2.el7)
kvm guest: RHEL7.2 (3.10.0-327.el7)

How reproducible:
every time

Steps to Reproduce:
1. virsh dump a kvm guest running 3.10.0-327.el7 (not sure if other kernels are affected)
2. submit vmcore to retrace-server without explicitly specifying the kernelver

Actual results:
retrace fails - unable to detect kernelver

Expected results:
able to detect kernelver

Additional info:
I noticed that 'crash --osrelease' returns 'unknown' for the vmcore.
Specifying the kernelver explicitly on the commandline makes the retrace succeed:
$ retrace-server-worker --restart --kernelver 3.10.0-327.el7.x86_64 --arch x86_64 708988336

Comment 1 Dave Wysochanski 2016-03-28 21:08:53 UTC
I just tried a "virsh dump" on a rhel6u4 and a rhel7u1 guest and retrace-server-1-12 had no issues.  So something in RHEL7u2 dumps must break the kernelver heuristic.

It looks like they all return 'unknown' from 'crash --osrelease' so it must be the old 'strings' based heuristic that is failing.

$ for f in *.bin; do echo $f; crash --osrelease $f; done
rhel6u4-node2-test-vmcore.bin
unknown
rhel7u1-node2-test-vmcore.bin
unknown
rhel7u2-node2-test-vmcore.bin
unknown

Comment 2 Dave Wysochanski 2016-09-21 15:27:20 UTC
I believe this is due to bugs in the "virsh dump" command and so has nothing to do with retrace-server.  For more info, see
https://bugzilla.redhat.com/show_bug.cgi?id=1304222
https://bugzilla.redhat.com/show_bug.cgi?id=1373088
https://bugzilla.redhat.com/show_bug.cgi?id=1267435

Comment 3 Dave Wysochanski 2016-09-21 15:44:58 UTC
I confirmed adding "--memory-only" at the end of the "virsh dump" command makes a vmcore that retrace/crash can recognize.