Project

General

Profile

Actions

Bug #3995

closed

Memory leak of compressed buffers in l2arc_write_done

Added by Sašo Kiselkov almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2013-08-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

jimmyH from the ZFS on Linux project recently pointed out a memory leak in the l2arc_write_done code. The memory leak happens if we compressed a buffer and so b_tmp_cdata contains a memory buffer holding the compressed buffer representation, but if for reason the ARC hash lock acquisition in l2arc_write_done misses out, we won't ever release this. Release of the compressed buffer should be done prior to hash lock acquisition, since reading the contents of b_l2hdr is always safe for us (because the buffer had been scheduled for L2ARC writing).

Actions #1

Updated by Sašo Kiselkov almost 10 years ago

  • Assignee set to Sašo Kiselkov
Actions #3

Updated by Rich Lowe over 9 years ago

  • Project changed from site to illumos gate
Actions #4

Updated by Garrett D'Amore over 9 years ago

  • Category set to zfs - Zettabyte File System
  • Status changed from New to Resolved
  • % Done changed from 90 to 100
  • Tags deleted (needs-triage)

Integrated in:

commit 71cb1b742ca23532b844b6538d8f0997a900c62e
Author: Saso Kiselkov <>
Date: Fri Jan 17 10:13:26 2014 -0800

3995 Memory leak of compressed buffers in l2arc_write_done
Reviewed by: Matthew Ahrens &lt;&gt;
Reviewed by: Garrett D'Amore &lt;&gt;
Approved by: Garrett D'Amore &lt;&gt;
Actions

Also available in: Atom PDF