Project

General

Profile

Actions

Bug #5222

closed

l2arc compression buffers "leak"

Added by Xin Li almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2014-10-09
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

I'm creating this issue on behalf of Andriy Gapon <> who initially reported it to openzfs developers and developed the patch so it don't get lost.

Initial FreeBSD discussion:

http://thread.gmane.org/gmane.os.freebsd.current/155757/focus=155781

Discussion on OpenZFS mailing list begins here:

http://lists.open-zfs.org/pipermail/developer/2014-January/000455.html

After adding several assertions, etc., he have discovered:

http://lists.open-zfs.org/pipermail/developer/2014-February/000523.html

To recap: after reports from FreeBSD ZFS users, I was able to capture two types of l2arc temporary compressions buffer leaks.

One was in arc_release() called from dbuf_dirty().

The other was in arc_hdr_destroy() called from arc_write_done() in the ZIO_FLAG_IO_REWRITE case. In both case the mentioned calls happened concurrently with l2arc writes and the corresponding buffers were in ARC_L2_WRITING state.

An earlier version of this patch has already been successfully tested by the original reporters. The patch also survives HybridCluster testing without any leaks or triggered assertions.

==

An earlier version of the patch is reviewed by Saso Kiselkov <> [1]; this version of patch is the same patch of Andriy Gapon <>'s updated one after Matthew's comments [2] and applied against Illumos tree and compile-tested in an illumos build environment. I (Xin Li <>) have reviewed the patch too.

It's the same patch we are currently shipping with FreeNAS.

[1] http://lists.open-zfs.org/pipermail/developer/2014-February/000524.html
[2] http://lists.open-zfs.org/pipermail/developer/2014-February/000525.html


Files

l2arc-leak-avg.diff (4.78 KB) l2arc-leak-avg.diff Patch adapted to Illumos Xin Li, 2014-10-09 05:04 AM

Related issues

Related to illumos gate - Bug #5497: lock contention on arcs_mtxClosedMatthew Ahrens2014-12-30

Actions
Actions

Also available in: Atom PDF