HomeFreeBSD

Fix !zilog_is_dirty() assert during ztest

Description

Fix !zilog_is_dirty() assert during ztest

ztest occasionally hits an assert that !zilog_is_dirty() during
zil_close(). This is caused by an interaction between 2 threads.
First, ztest_run() waits for each test thread to complete and
closes the associated dataset as soon as the thread joins. At
the same time, the ztest_vdev_add_remove() test may attempt to
remove the slog, which will open, dirty, and reset the logs on
every dataset in the pool (including those of other threads).
This patch simply ensures that we always join all of the test
threads before closing any datasets.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8094

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Nov 7 2018, 11:46 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 7 2018, 11:46 PM
Parents
rG20eb30d08e24: Fix divide by zero during indirect split damage
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGa2d88f778a31: Fix !zilog_is_dirty() assert during ztest (authored by Tom Caputi <tcaputi@datto.com>).Nov 7 2018, 11:46 PM