Project

General

Profile

Actions

Bug #4978

closed

ztest fails in get_metaslab_refcount()

Added by Christopher Siden about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2014-07-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

George Wilson:

Running zloop on my latest bits I hit a failure here:

> $c                                  
get_metaslab_refcount+0x4c(8521180, 4, 8047a58, 8055737, 8520cc0, fefc3330)
get_metaslab_refcount+0x8f(851f500, 8073700, 8047a78, 0, 0, 0)
verify_spacemap_refcounts+0x4c(8541000, 8047b14, 0, 8523fa0, 0, ffffffff)
dump_zpool+0x1f0(8541000, 805ed33, 2, ffffffff)
main+0x6fb(805e5ba, feffb0a4, 8047b64, 805555f, 0, 8047b70)
_start+0x83(5, 8047c4c, 8047c98, 8047c9b, 8047cb2, 8047cb6)

8521180::print vdev_t vdev_ms[]

Hmm, the vddv_ms array is NULL. This is causing this to fail:

nt
get_metaslab_refcount(vdev_t *vd)
{
        int refcount = 0;

        if (vd->vdev_top == vd) {
                for (int m = 0; m < vd->vdev_ms_count; m++) {
                        space_map_t *sm = vd->vdev_ms[m]->ms_sm;

<snip>

The root cause is that this vdev is being removed and vdev_ms has already been
cleared out. We should check for removing vdevs when making this check.

Actions

Also available in: Atom PDF