Project

General

Profile

Actions

Bug #8674

closed

mdb txg_list walker is not using CTF

Added by Robert Mustacchi about 5 years ago. Updated about 5 years ago.

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

100%

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

Description

Patrick Mooney was attempting to analyze a crash in thoth and discovered that the txg_list walker was not working:

> ffffd0df6df4f1c0::print -ta zilog_t zl_dmu_pool->dp_dirty_zilogs
ffffd0c57616f940 txg_list_t zl_dmu_pool->dp_dirty_zilogs = {
    ffffd0c57616f940 kmutex_t zl_dmu_pool->dp_dirty_zilogs.tl_lock = {
        ffffd0c57616f940 void *[1] _opaque = [ 0 ]
    }
    ffffd0c57616f948 size_t zl_dmu_pool->dp_dirty_zilogs.tl_offset = 0x2e8
    ffffd0c57616f950 spa_t *zl_dmu_pool->dp_dirty_zilogs.tl_spa =
0xffffd0c572466000
    ffffd0c57616f958 txg_node_t *[4] zl_dmu_pool->dp_dirty_zilogs.tl_head = [
0xffffd0df6df4f4a8, 0xffffd0da92d427e8, 0, 0 ]
}
> ffffd0c57616f940::walk txg_list
0xffffd0c572465d18
mdb: failed to read list element at 0x73656e6c92: no mapping for address

It appears with illumos#8063 verify that we do not attempt to access inactive txg, a field was added to txg_list_t which changed the offset of tl_head (since it's the last field) which is used in the txg_list mdb walker. The fix is to use the CTF data in the crash to read the data.

Actions #1

Updated by Robert Mustacchi about 5 years ago

Testing notes:

Without the updated zfs.so mdb module:

> ffffd0c57616f940::walk txg_list
0xffffd0c572465d18
mdb: failed to read list element at 0x73656e6c92: no mapping for address

With the updated module:

> ::unload zfs
> ::load /zfs.so
> ffffd0c57616f940::walk txg_list
0xffffd0df6df4f1c0
0xffffd0c582c42700
0xffffd0da504ece80
0xffffd0d59e42b380
0xffffd0d89099b580
0xffffd0e160b8c740
0xffffd0c57773d380
0xffffd0c9120d78c0
0xffffd0d8979a2500
0xffffd0da92d42500
0xffffd0da92d42500
0xffffd0d59e42b380
0xffffd0c582c42700
0xffffd0e160b8c740
0xffffd0c57773d380
0xffffd0c9120d78c0
> ffffd0c57616f940::walk txg_list | ::print -ta zilog_t zl_get_data
ffffd0df6df4f1e8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c582c42728 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0da504ecea8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0d59e42b3a8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0d89099b5a8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0e160b8c768 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c57773d3a8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c9120d78e8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0d8979a2528 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0da92d42528 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0da92d42528 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0d59e42b3a8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c582c42728 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0e160b8c768 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c57773d3a8 zil_get_data_t *zl_get_data = zfs_get_data
ffffd0c9120d78e8 zil_get_data_t *zl_get_data = zfs_get_data
Actions #2

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed

git commit 1393933c47415701a44c508d10d02147d5160297

commit  1393933c47415701a44c508d10d02147d5160297
Author: Jason King <jason.brian.king@gmail.com>
Date:   2017-10-31T15:19:32.000Z

    8674 mdb txg_list walker is not using CTF
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF