[FreeBSD-Announce] FreeBSD Errata Notice FreeBSD-EN-18:18.zfs

FreeBSD Errata Notices errata-notices at freebsd.org
Wed Dec 19 20:52:50 UTC 2018

Hash: SHA512

FreeBSD-EN-18:18.zfs                                            Errata Notice
                                                          The FreeBSD Project

Topic:          ZFS vnode reclaim deadlock

Category:       core
Module:         kernel
Announced:      2018-12-19
Credits:        Allan Jude	
Affects:        FreeBSD 11.2
Corrected:      2018-12-11 19:34:25 UTC (stable/11, 11.2-STABLE)
                2018-12-19 18:05:50 UTC (releng/11.2, 11.2-RELEASE-p7)

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

ZFS is one of several filesystems available on FreeBSD.  ZFS supports
many advanced features, including checksumming, transparent compression,
and snapshots.

ZFS saves synchronous writes to the ZFS Intent Log (ZIL), which may be a
separate log device (SLOG), so they can be replayed in the event of a
power failure or system crash. This ensures that the contents of write()
calls that succeeded will still be available after the system
unexpectedly reboots.

II.  Problem Description

There is a possible deadlock between zil_commit() and zfs_zget() during
the vnode reclaim process. If zfs_zget() is not able to take the vnode
exclusive lock, it will retry indefinately, blocking forward progress.

III. Impact

Processes may hang on the waitchan "zilog->zl_writer_lock".

IV.  Workaround

Increasing the maximum number of vnodes (kern.maxvnodes) may decrease
the frequency of this deadlock. Systems not using ZFS are not affected.

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.

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

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.

[FreeBSD 11.2]
# fetch https://security.FreeBSD.org/patches/EN-18:18/zfs.patch
# fetch https://security.FreeBSD.org/patches/EN-18:18/zfs.patch.asc
# gpg --verify zfs.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/11/                                                        r341828
releng/11.2/                                                      r342226
- -------------------------------------------------------------------------

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