[FreeBSD-Announce] FreeBSD Errata Notice FreeBSD-EN-16:04.hyperv

FreeBSD Errata Notices errata-notices at freebsd.org
Wed Mar 16 23:27:47 UTC 2016

Hash: SHA512

FreeBSD-EN-16:04.hyperv                                         Errata Notice
                                                          The FreeBSD Project

Topic:          Hyper-V KVP (Key-Value Pair) daemon indefinite sleep

Category:       core
Module:         hyperv
Announced:      2016-03-16
Credits:        Microsoft Open Source Technology Center(OSTC)
Affects:        FreeBSD 10.x
Corrected:      2015-12-18 14:52:12 UTC (stable/10, 10.2-STABLE)
                2016-03-16 22:31:04 UTC (releng/10.2, 10.2-RELEASE-p14)
                2016-03-16 22:30:56 UTC (releng/10.1, 10.1-RELEASE-p31)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit

I.   Background

Hyper-V is a native hypervisor running on Windows operating system. It can
run FreeBSD 10.x as guest in virtual machine.

Data Exchange is an integration service, also known as a key-value pair or  
KVP, that can be used to share information between virtual machines and the
Hyper-V host.  For more information, see

II.  Problem Description

The KVP driver code doesn't implement the KVP device's .d_poll callback
correctly: when there is no data available to the user-mode KVP daemon, the
driver forgets to remember the daemon and wake up the daemon later.  As a
result, the daemon can't be woken up in a predictable period of time, and
the host side's KVP query can hang for an unexpected period of time and get
timeout, and finally the host can think the VM is irresponsive or unhealthy.

III. Impact

When a FreeBSD 10.x virtual machine runs on Hyper-V, the host may not get the
expected response of a KVP query. When a virtual machine runs on Azure, the
host may try to recover the "irresponsive" virtual machine by killing it and
starting it later, causing unnecessary virtual machine downtime.

IV.  Workaround

Don't run the KVP daemon on a virtual machine.  With this, the host will know
that KVP functionality is not working at all, so the host won't try to send KVP
query to virtual machine.

V.   Solution

Perform one of the following:

1) Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.  Reboot is required.

2) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

Reboot is required.

3) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-16:04/hyperv.patch
# fetch https://security.FreeBSD.org/patches/EN-16:04/hyperv.patch.asc
# gpg --verify hyperv.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/10/                                                        r292438
releng/10.1/                                                      r296954
releng/10.2/                                                      r296955
- -------------------------------------------------------------------------

To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:

# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base

Or visit the following URL, replacing NNNNNN with the revision number:


VII. References


The latest revision of this advisory is available at


More information about the freebsd-announce mailing list