ztest failure: dsl_destroy_head(name) == 0 (0x10 == 0x0), file ../ztest.c, line 3235
I've hit the following ASSERT when running ztest in the zfs-precommit testing. AFAICT, it's a failure case that's completely unrelated to my changes, so I wanted to open up a bug to track it. The assertion is:
dsl_destroy_head(name) 0 (0x10 0x0), file ../ztest.c, line 3235
libc.so.1`_lwp_kill+0x15(8046f60, 8046f60, 7b, 8046fd6, feca2a40, 89a1d68)
libc.so.1`_assfail+0x1b9(80472c8, 806709f, ca3, 80472ef, 0, 0)
libc.so.1`assfail3+0x115(8067586, 10, 0, 80670c0, 0, 0)
ztest_objset_destroy_cb+0x177(8047840, 0, 895edd8, 0, 8725000, 0)
libzpool.so.1`dmu_objset_find_impl+0x3e3(8725000, 8047840, 805c2fd, 0, 3, 804780c)
libzpool.so.1`dmu_objset_find+0x47(8047840, 805c2fd, 0, 3)
ztest_dataset_destroy+0x87(6, 0, 80000000, 0)
ztest_run+0x407(fec90494, 100, 807ba40, fee10018)
main+0x20e(8047cbc, fef776e8, 8047cf8, 8056bfb, 1, 8047d04)
_start+0x83(1, 8047dd8, 0, 8047deb, 8047dfb, 8047e0b)
The problem is that the the head dataset still has a snapshot. Typically, the snapshot would have already been destroyed by ztest_dataset_destroy(). However, the snapshot has a user hold on it, thus preventing it from being destroyed.
ztest needs to either tolerate this error, or remove all user holds from snapshots before trying to destroy them (and then pass defer_destroy=FALSE).
The error in question (dsl_destroy_head() returns EBUSY since there's a hold on the dataset) is now tolerated. This should avoid interference with other tests, e.g. ztest_dmu_snapshot_hold(), which ensures that a held snapshot can't be destroyed.
Updated by Electric Monk almost 3 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 754998c8d410b7b7ddefbfa4de310a030e0c7ce1 Author: Chris Williamson <email@example.com> Date: 2016-09-24T17:46:56.000Z 7253 ztest failure: dsl_destroy_head(name) == 0 (0x10 == 0x0), file ../ztest.c, line 3235 Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Reviewed by: Paul Dagnelie <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>