on 05/02/2014 00:33 Saso Kiselkov said the following:
> Ah, now I understand what's going on. The application is dirtying a dbuf
> who's backing ARC buffer is currently in-flight into the L2ARC, so it
> needs to be discarded. Instead of going through arc_evict, it calls
> arc_release directly to dispose of the buffer, but it doesn't clear the
> in-flight compressed data.
>
> So the solution would be obvious: if there's a compressed buffer, call
> l2arc_release_cdata_buf to clear it.
Another type of leak is detected:
Unread portion of the kernel message buffer:
panic: solaris assert: l2hdr->b_compress == ZIO_COMPRESS_OFF ||
l2hdr->b_tmp_cdata == NULL, file:
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c,
line: 1767
panic() at panic+0x21c/frame 0xffffff9de0740570
assfail() at assfail+0x1d/frame 0xffffff9de0740580
arc_hdr_destroy() at arc_hdr_destroy+0x13e/frame 0xffffff9de07405b0
arc_write_done() at arc_write_done+0x221/frame 0xffffff9de0740600
zio_done() at zio_done+0x8b1/frame 0xffffff9de0740670
zio_execute() at zio_execute+0x215/frame 0xffffff9de07406d0
zio_notify_parent() at zio_notify_parent+0x101/frame 0xffffff9de0740710
zio_done() at zio_done+0x930/frame 0xffffff9de0740780
zio_execute() at zio_execute+0x215/frame 0xffffff9de07407e0
zio_notify_parent() at zio_notify_parent+0x101/frame 0xffffff9de0740820
zio_done() at zio_done+0x930/frame 0xffffff9de0740890
zio_execute() at zio_execute+0x215/frame 0xffffff9de07408f0
zio_notify_parent() at zio_notify_parent+0x101/frame 0xffffff9de0740930
zio_done() at zio_done+0x930/frame 0xffffff9de07409a0
zio_execute() at zio_execute+0x215/frame 0xffffff9de0740a00
taskq_run() at taskq_run+0x72/frame 0xffffff9de0740a30
taskqueue_run_locked() at taskqueue_run_locked+0xf4/frame 0xffffff9de0740a80
taskqueue_thread_loop() at taskqueue_thread_loop+0x50/frame 0xffffff9de0740aa0
This is the ZIO_FLAG_IO_REWRITE case in arc_write_done().
(kgdb) fr 4
#4 0xffffffff81add19e in arc_hdr_destroy (hdr=0xfffffe048f5efa40) at
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:1766
1766 ASSERT(l2hdr->b_compress == ZIO_COMPRESS_OFF ||
(kgdb) p *hdr
$1 = {b_dva = {dva_word = {32, 1611918896}}, b_birth = 7082159, b_cksum0 =
478912857163, b_freeze_lock = {lock_object = {lo_name = 0xffffffff81c14bf4
"buf->b_freeze_lock", lo_flags = 40960000, lo_data = 0, lo_witness = 0x0},
sx_lock = 1}, b_freeze_cksum = 0xfffffe01e5936460, b_thawed = 0x0,
b_hash_next = 0x0, b_buf = 0xfffffe02d388f2d0, b_flags = 73824, b_datacnt = 1,
b_acb = 0x0, b_cv = {cv_description = 0xffffffff81c14be8 "buf->b_cv)",
cv_waiters = 0}, b_type = ARC_BUFC_METADATA, b_size = 16384, b_spa =
16484669438200947777, b_state = 0xffffffff81c2db00, b_arc_node = {list_next =
0x0, list_prev = 0x0}, b_arc_access = 4495273, b_refcnt = {rc_mtx = {
lock_object = {lo_name = 0xffffffff81c18ca7 "rcmtx", lo_flags = 16973824,
lo_data = 0, lo_witness = 0x0}, mtx_lock = 4}, rc_tracked = 0, rc_list =
{list_size = 40, list_offset = 0, list_head = {
list_next = 0xfffffe048f5efb30, list_prev = 0xfffffe048f5efb30}},
rc_removed = {list_size = 40, list_offset = 0, list_head = {list_next =
0xfffffe048f5efb50, list_prev = 0xfffffe048f5efb50}}, rc_count = 0,
rc_removed_count = 0}, b_l2hdr = 0xfffffe01e57a7000, b_l2node = {list_next =
0x0, list_prev = 0x0}}
(kgdb) p *l2hdr
$2 = {b_dev = 0xfffffe002f1d6300, b_daddr = 9025232896, b_compress =
ZIO_COMPRESS_LZ4, b_asize = 4096, b_tmp_cdata = 0xffffff8efbdb6000}
(kgdb) fr 5
#5 0xffffffff81ae14b1 in arc_write_done (zio=0xfffffe0f4d2e3388) at
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:3838
3838 arc_hdr_destroy(exists);
(kgdb) list
3833 panic("bad overwrite, hdr=%p
exists=%p",
3834 (void *)hdr, (void
*)exists);
3835
ASSERT(refcount_is_zero(&exists->b_refcnt));
3836 arc_change_state(arc_anon, exists,
hash_lock);
3837 mutex_exit(hash_lock);
3838 arc_hdr_destroy(exists);
3839 exists = buf_hash_insert(hdr,
&hash_lock);
3840 ASSERT3P(exists, ==, NULL);
3841 } else if (zio->io_flags & ZIO_FLAG_NOPWRITE) {
3842 /* nopwrite */
(kgdb) p/x zio->io_flags
$3 = 0x100000
--
Andriy Gapon
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer