Bug 1687596

Summary: [Intel 8.1 BUG][KVM][Crystal Ridge]object_get_canonical_path_component: assertion failed: (obj->parent != NULL)
Product: Red Hat Enterprise Linux 8 Reporter: Paul Lai (Intel) <plai>
Component: qemu-kvmAssignee: Paul Lai (Intel) <plai>
Status: CLOSED ERRATA QA Contact: Yumei Huang <yuhuang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: ddepaula, hhuang, jinzhao, knoel, mrezanin, rbalakri, virt-maint, xuelian.guo, yuhuang
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-2.12.0-66.module+el8.1.0+3038+1e4b50a7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1699072 (view as bug list) Environment:
Last Closed: 2019-11-05 20:48:05 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1654309, 1699072, 1710589    

Description Paul Lai (Intel) 2019-03-11 20:27:10 UTC
Copied from BZ 1628098

Description of problem:
Boot guest with nvdimm device backed by a regular file on host, set pmem=on, qemu core dumped.

Looks like the fix didn't make it into v3.1.0

commit 87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df
Author: Zhang Yi <yi.z.zhang.com>
Date:   Wed Oct 24 22:14:56 2018 +0800

    hostmem-file: remove object id from pmem error message



Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-14.el7

How reproducible:
always

Steps to Reproduce:
1. Boot qemu with pmem=on for memory backend backed by a regular file on host

# /usr/libexec/qemu-kvm  -object memory-backend-file,id=mem0,mem-path=/tmp/nv0,size=1G,share,pmem=on


Actual results:
ERROR:qom/object.c:1650:object_get_canonical_path_component: assertion failed: (obj->parent != NULL)
Aborted (core dumped)


Expected results:
No core dump.

Additional info:

Comment 1 Yumei Huang 2019-03-12 02:01:55 UTC
Well, seems qemu3.1 don't have the core dump issue.

Tested with qemu-kvm-3.1.0-18.module+el8+2834+fa8bb6e2,

# /usr/libexec/qemu-kvm  -object memory-backend-file,id=mem0,mem-path=/tmp/nv0,size=1G,share,pmem=on
qemu-kvm: -object memory-backend-file,id=mem0,mem-path=/tmp/nv0,size=1G,share,pmem=on: Lack of libpmem support while setting the 'pmem=on' of memory-backend-file '(null)'. We can't ensure data persistence.

Comment 2 Paul Lai (Intel) 2019-04-11 17:05:45 UTC
Copied from BZ 1628098

commit 111769e4a152fdb52f2b10fb957cdfec2fe7d4d2
Author: plai <plai>
Date:   Tue Jan 8 21:33:09 2019 +0100

    hostmem-file: remove object id from pmem error message

Comment 4 Danilo de Paula 2019-04-11 18:57:01 UTC
Hai, please confirm the ITR value for this bug.

Comment 6 Danilo de Paula 2019-04-15 21:53:59 UTC
Fix included in qemu-kvm-2.12.0-66.module+el8.1.0+3038+1e4b50a7

Comment 7 Danilo de Paula 2019-04-16 13:14:39 UTC
qa_ack+ it please.

Comment 9 Yumei Huang 2019-06-24 11:25:19 UTC
Verify:
qemu-kvm-2.12.0-78.module+el8.1.0+3434+46ed87c2
kernel-4.18.0-107.el8.x86_64

Tested following two scenarios, guest boot up well, no error in dmesg, and /dev/pmem0 is present in guest.

Guest dmesg:
[    2.400945] pmem0: detected capacity change from 0 to 2147483648


1) Using a regular file on host as nvdimm backend

# /usr/libexec/qemu-kvm -m 4G,maxmem=40G,slots= 8 -M pc,nvdimm /home/kvm_autotest_root/images/rhel810-64-virtio-scsi.qcow2  -object memory-backend-file,id=mem0,mem-path=/tmp/nv1test,size=2G,share,pmem=on -device nvdimm,id=dimm0,memdev=mem0 -monitor stdio -vnc :0 -serial tcp:0:1234,server,nowait


2) Using /dev/pmem emulated by adding memmap=4G!2G to kernel line
# /usr/libexec/qemu-kvm -m 4G,maxmem=40G,slots= 8 -M pc,nvdimm /home/kvm_autotest_root/images/rhel810-64-virtio-scsi.qcow2  -object memory-backend-file,id=mem0,mem-path=/tmp/nv1test,size=2G,share,pmem=on -device nvdimm,id=dimm0,memdev=mem0 -monitor stdio -vnc :0 -serial tcp:0:1234,server,nowait

Comment 11 errata-xmlrpc 2019-11-05 20:48:05 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.

https://access.redhat.com/errata/RHSA-2019:3345