OpenSolaris

Printable Version Enter a New Search
Bug ID 6739487
Synopsis ASSERT: txg <= spa_final_txg due to scrub/export race
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:zfs
Keywords
Responsible Engineer Jeff Bonwick
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_105
Fixed In snv_105
Release Fixed solaris_nevada(snv_105) , solaris_10u8(s10u8_01) (Bug ID:2176246)
Related Bugs 6343667
Submit Date 20-August-2008
Last Update Date 17-December-2008
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/
Work Around
N/A
Comments
N/A