Project

General

Profile

Bug #5222

l2arc compression buffers "leak"

Added by Xin Li about 5 years ago. Updated over 4 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

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_mtxClosed2014-12-30

Actions

History

#1

Updated by Prakash Surya almost 5 years ago

The fix for this was merged and landed in this commit:

commit 244781f10dcd82684fd8163c016540667842f203
Author: Prakash Surya <>
Date: Mon Jan 12 19:52:19 2015 -0800

5497 lock contention on arcs_mtx
Reviewed by: George Wilson &lt;&gt;
Reviewed by: Matthew Ahrens &lt;&gt;
Reviewed by: Richard Elling &lt;&gt;
Approved by: Dan McDonald &lt;&gt;
#2

Updated by Xin Li almost 5 years ago

Prakash Surya wrote:

The fix for this was merged and landed in this commit:

commit 244781f10dcd82684fd8163c016540667842f203
Author: Prakash Surya <>
Date: Mon Jan 12 19:52:19 2015 -0800

5497 lock contention on arcs_mtx

I think you meant another ticket?

#3

Updated by Prakash Surya over 4 years ago

Sorry for the delay, I'm not getting email updates for comments here.

Xin, I pulled the fix you linked to for this issue, into the fix that I landed for 5497. So that patch will include the fix for this issue.

#4

Updated by Matthew Ahrens over 4 years ago

  • Status changed from In Progress to Closed
#5

Updated by Alek Pinchuk almost 3 years ago

  • Related to Bug #5497: lock contention on arcs_mtx added

Also available in: Atom PDF