A small introduction first.  I'm currently writing a bunch of test cases for
libzfs_core and I am testing not only for expected behavior of the calls, but
also for various failure modes.

Having said that, I think that the following test case should work even if it
does not make much sense.
So, I pass the following bookmarks nvlist to lzc_bookmark():
{
        "pool/fs#bookmark": "pool/fs@snap",
        "pool/fs#another_bookmark": "pool/fs@snap"
}

That is, I am trying to create in one go two valid bookmarks that point to the
same snapshot.

This results in the following panic:
assert: dsl_dataset_hold(dp, fnvpair_value_string(pair), ((char *)__func__),
&snapds) == 0 (0x2 == 0x0), file: .../dsl_bookmark.c, line: ...

A stack trace:
panic()
assfail3()
dsl_bookmark_create_sync()
dsl_sync_task_sync()
dsl_pool_sync()
spa_sync()
txg_sync_thread()

The panic confuses me a lot, because I couldn't figure out how dsl_dataset_hold
could return ENOENT.  I only have a guess: I think that the way of how
dsl_dataset_zapify() works might cause this.

Additional note: the panic happens on FreeBSD, but I couldn't reproduce it on 
Linux.

-- 
Andriy Gapon
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to