Bug 1892805

Summary: NVDIMM: qemu warning is logged when running VM with NVDIMM device.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Milan Zamazal <mzamazal>
Status: CLOSED WONTFIX QA Contact: Nisim Simsolo <nsimsolo>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4.3.8CC: ahadas, bugs, nsimsolo
Target Milestone: ---Flags: pm-rhel: ovirt-4.5?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-09 15:54:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1855336    
Bug Blocks:    
Attachments:
Description Flags
engine.log
none
vdsm.log
none
qemu log none

Description Nisim Simsolo 2020-10-29 16:50:51 UTC
Description of problem:
When running VM with NVDIMM device, the next warning is logged in qemu.log:
2020-10-29 16:03:11.880+0000: Domain id=8 is tainted: custom-hypervisor-feature
Warning: requesting persistence across crashes for backend file /dev/pmem0 failed. Proceeding without persistence, data might become corrupted in case of host crash.

Not sure what is the impact of this warning. 

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.3.8-0.1.el8ev
vdsm-4.40.35-1.el8ev.x86_64
libvirt-daemon-6.6.0-6.module+el8.3.0+8125+aefcf088.x86_64
qemu-kvm-5.1.0-13.module+el8.3.0+8382+afc3bbea.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Add NVDIMM device to VM.
2. Run VM
3.

Actual results:
Warning is logged in qemu.log:
Warning: requesting persistence across crashes for backend file /dev/pmem0 failed. Proceeding without persistence, data might become corrupted in case of host crash.

Expected results:


Additional info:
vdsm.log (vm started at 2020-10-29 12:03:09,906-0400 INFO  (jsonrpc/0) [api.virt] START create), engine.log and qemu.log attached.

Comment 1 Nisim Simsolo 2020-10-29 16:53:28 UTC
Created attachment 1725110 [details]
engine.log

Comment 2 Nisim Simsolo 2020-10-29 16:54:25 UTC
Created attachment 1725111 [details]
vdsm.log

Comment 3 Nisim Simsolo 2020-10-29 16:55:15 UTC
Created attachment 1725112 [details]
qemu log

Comment 4 Milan Zamazal 2020-11-02 13:31:12 UTC
According to QEMU documentation, https://github.com/qemu/qemu/blob/2c6605389c1f76973d92b69b85d40d94b8f1092c/docs/nvdimm.txt#L153, host-crash-proof persistence is available only when using a DAX backing device: 

  Though QEMU supports multiple types of vNVDIMM backends on Linux,
  the only backend that can guarantee the guest write persistence is:

  A. DAX device (e.g., /dev/dax0.0, ) or
  B. DAX file(mounted with dax option)

  ...

  If these conditions are not satisfied i.e. if either 'pmem' or 'share'
  are not set, if the backend file does not support DAX or if MAP_SYNC
  is not supported by the host kernel, write persistence is not
  guaranteed after a system crash. For compatibility reasons, these
  conditions are ignored if not satisfied.

That means that in this case, where fsdax mode was probably used on the host NVDIMM device, the persistence cannot be guaranteed (and it cannot be currently guaranteed at all, since DAX host device mode doesn't work due to Bug 1855336). Note that it concerns only a host crash, as cited above and in the warning, not a regular flow.

We should document this persistence limitation. Arik, I'll update the feature page, how to handle the downstream documentation? Should I file a doc bug?

Comment 5 Arik 2020-11-03 11:58:57 UTC
(In reply to Milan Zamazal from comment #4)
> We should document this persistence limitation. Arik, I'll update the
> feature page, how to handle the downstream documentation? Should I file a
> doc bug?

Yes please

Comment 6 Milan Zamazal 2020-11-03 13:56:08 UTC
Documentation bug: BZ 1894067

Comment 7 Milan Zamazal 2021-01-04 13:21:50 UTC
Just waiting for the bugs this one depends on.

Comment 8 Arik 2022-01-09 15:54:25 UTC
Closing as per bz 1855336