|
Description
|
When a scrub is in progress, and you run "zpool destroy" (or "zpool export" should cause it too), then it can panic in vdev_config_sync(), failing the assertion "txg <= spa_final_txg".
I think the problem is that spa_export_common() sets the spa_final_txg, but then drops the spa_config lock before stopping the sync threads (or otherwise preventing spa_sync() from running).
I believe that this bug would be more difficult to hit before my new scrub putback (6343667), because by this time all the filesystems are unmounted so there would normally not be any more changes happening, so spa_sync() would immediatley return (if it happened to be called in this window). But now if there is a scrub in progress, then we will continue doing work in spa_sync() (possibly changing the config and requiring vdev_config_sync() to be called).
Additionally, I believe that this assertion should be in spa_sync(), not just vdev_config_sync().
appears to be somewhat reproducible while the cleanup script for cli_root/zpool_scrub in the zfs-test suite. dump is in:
/net/zion.eng/export/dumps/ahrens/6739487/
|