Project

General

Profile

Actions

Bug #12267

closed

zfs '::abuf_find' dcmd is broken

Added by Jason King over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Attempting to use ::abuf_find 1 2 in mdb fails with:

> ::abuf_find 1 2
mdb: invalid or uninitialized list_t at 0xfffffffffc08b600
mdb: can't walk ARC_mru: failed to initialize walk

The problem is that arc_state_t no longer contains a list_t, but a multilist_t. Most likely changing the mdb command to use the multilist walker will fix this.
It appears this was broken by:

commit 244781f10dcd82684fd8163c016540667842f203
Author: Prakash Surya <prakash.surya@delphix.com>
Date:   Mon Jan 12 19:52:19 2015 -0800

    5497 lock contention on arcs_mtx


Related issues

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

Actions
Related to illumos gate - Bug #12269: mdb multilist walker should be a layered walkerClosedJason King

Actions
Is duplicate of illumos gate - Bug #7169: mdb '::abuf_find 1 2' - failedClosed2016-07-05

Actions
Actions #1

Updated by Jason King over 1 year ago

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

Updated by Jason King over 1 year ago

  • Related to Bug #12269: mdb multilist walker should be a layered walker added
Actions #3

Updated by Jason King over 1 year ago

To test, with the modified zfs mdb module loaded, I first found an arc_buf_hdr_t by walking the ARC MRU list:

> ARC_mru::print arc_state_t arcs_list
arcs_list = [ 0, 0xfffffe16d9ecd7e8, 0xfffffe16d9ecd808 ]
> 0xfffffe16d9ecd7e8::walk multilist ! head -1
0xfffffe174f26eb40
> 0xfffffe174f26eb40::print arc_buf_hdr_t b_dva
b_dva = {
    b_dva.dva_word = [ 0x10, 0x2f8f880 ]
}

Using the DVA, I then attempted to find it with ::abuf_find:

> ::abuf_find 10 2f8f880
0xfffffe174f26eb40

Without the change, mdb fails to find the arc_buf_hdr_t:

>  ::abuf_find 10 2f8f880
mdb: invalid or uninitialized list_t at 0xfffffffffc02c220
mdb: can't walk ARC_mru: failed to initialize walk

Actions #4

Updated by Electric Monk over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 8b06eaf6acc31eaadddc0fec3df9d1a4294b7cc2

commit  8b06eaf6acc31eaadddc0fec3df9d1a4294b7cc2
Author: Jason King <jason.king@joyent.com>
Date:   2020-02-04T00:01:07.000Z

    12267 zfs '::abuf_find' dcmd is broken
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Kody Kantor <kody@kkantor.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #5

Updated by Jason King over 1 year ago

  • Is duplicate of Bug #7169: mdb '::abuf_find 1 2' - failed added
Actions

Also available in: Atom PDF