Bug #1954

leak in ZFS from metaslab_group_create and zfs_ereport_checksum

Added by George Wilson over 2 years ago. Updated about 2 years ago.

Status:Resolved Start date:2012-01-05
Priority:Normal Due date:
Assignee:George Wilson % Done:

0%

Category:- Spent time: -
Target version:-
Difficulty:Medium Tags:needs-triage

Description

Running findleaks on a zfs crash show leaks in metaslab_group_create and zfs_ereport_checksum:

::findleaks d
CACHE LEAKED BUFCTL CALLER
ffffff0189033508 1 ffffff01a70cb1d0 allocb+0x64
ffffff0189033008 1 ffffff01a41ea6e0 dblk_constructor+0x58
ffffff018902a008 2 ffffff0195f48580 impl_acc_hdl_alloc+0x34
ffffff0189027008 2 ffffff0195f41db8 impl_acc_hdl_alloc+0x4a
ffffff0189029008 2 ffffff0195f4dd88 impl_acc_hdl_alloc+0x64
ffffff0189029288 46 ffffff01a4d0e878 metaslab_group_create+0x2e
ffffff0189027a08 20 ffffff01a6640468 zfs_ereport_start_checksum+0x9f
ffffff0189027a08 294 ffffff01a5e19b80 zfs_ereport_start_checksum+0x9f
-----------------------------------------------------------------------

Total 368 buffers, 32208 bytes

...

kmem_alloc_128 leak: 46 buffers, 128 bytes each, 5888 bytes total
ADDR BUFADDR TIMESTAMP THREAD
CACHE LASTLOG CONTENTS
ffffff01a4d0e878 ffffff01a45d6300 328e0189de341 ffffff01990ee0a0
ffffff0189029288 ffffff0189ebbb80 ffffff018d951068
kmem_cache_alloc_debug+0x283
kmem_cache_alloc+0x115
kmem_zalloc+0x6a
metaslab_group_create+0x2e
vdev_alloc+0x4c8
spa_config_parse+0x4a
spa_config_parse+0xcb
spa_vdev_attach+0xa3
zfs_ioc_vdev_attach+0x73
zfsdev_ioctl+0x183
cdev_ioctl+0x45
spec_ioctl+0x5a
fop_ioctl+0x7b
ioctl+0x18e

kmem_alloc_80 leak: 20 buffers, 80 bytes each, 1600 bytes total
ADDR BUFADDR TIMESTAMP THREAD
CACHE LASTLOG CONTENTS
ffffff01a6640468 ffffff01a66033c0 321fc3de073d5 ffffff00076dac40
ffffff0189027a08 ffffff018acd1440 ffffff018cdc5fe8
kmem_cache_alloc_debug+0x283
kmem_cache_alloc+0x115
kmem_zalloc+0x6a
zfs_ereport_start_checksum+0x9f
zio_checksum_verify+0x8e
zio_execute+0xca
taskq_thread+0x29e
thread_start+8

kmem_alloc_80 leak: 294 buffers, 80 bytes each, 23520 bytes total
ADDR BUFADDR TIMESTAMP THREAD
CACHE LASTLOG CONTENTS
ffffff01a5e19b80 ffffff01a5a6ea28 325044f0b87d1 ffffff0007836c40
ffffff0189027a08 ffffff018ca6ac80 ffffff018e773af0
kmem_cache_alloc_debug+0x283
kmem_cache_alloc+0x115
kmem_zalloc+0x6a
zfs_ereport_start_checksum+0x9f
zio_checksum_verify+0x8e
zio_execute+0xca
zio_notify_parent+0xb9
zio_done+0x6ac
zio_execute+0xca
taskq_thread+0x29e
thread_start+8

History

Updated by Albert Lee over 2 years ago

  • Project changed from site to illumos gate

Updated by Eric Schrock about 2 years ago

  • Status changed from New to Resolved

changeset: 13574:d0fde6cacaac
tag: tip
user: George Wilson <>
date: Mon Jan 23 19:46:52 2012 -0800

description:
1951 leaking a vdev when removing an l2cache device
1952 memory leak when adding a file-based l2arc device
1954 leak in ZFS from metaslab_group_create and zfs_ereport_checksum
Reviewed by: Adam Leventhal <>
Reviewed by: Matt Ahrens <>
Reviewed by: Eric Schrock <>
Reviewed by: Bill Pijewski <>
Reviewed by: Dan McDonald <>
Approved by: Eric Schrock <>

modified:
usr/src/uts/common/fs/zfs/spa.c
usr/src/uts/common/fs/zfs/sys/vdev_impl.h
usr/src/uts/common/fs/zfs/vdev.c
usr/src/uts/common/fs/zfs/zfs_fm.c

Also available in: Atom PDF