HomeFreeBSD

Fix panic in dsl_process_sub_livelist for EINTR

Description

Fix panic in dsl_process_sub_livelist for EINTR

Issue

Recently we hit an assertion panic in dsl_process_sub_livelist while
exporting the spa and interrupting bpobj_iterate_nofree. In that case
bpobj_iterate_nofree stops mid-way returning an EINTR without clearing
the intermediate AVL tree that keeps track of the livelist entries it
has encountered so far. At that point the code has a VERIFY for the
number of elements of the AVL expecting it to be zero (which is not the
case for EINTR).

Fix

Cleanup any intermediate state before destroying the AVL when
encountering EINTR. Also added a comment documenting the scenario where
the EINTR comes up. There is no need to do anything else for the calles
of dsl_process_sub_livelist as they already handle the EINTR case.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #13939

Details

Provenance
Serapheim Dimitropoulos <serapheim@delphix.com>Authored on Sep 29 2022, 4:39 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 1 2022, 7:34 PM
Parents
rGc8d6a91a993c: Bring per_txg_dirty_frees_percent back to 30
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG37763ea2a678: Fix panic in dsl_process_sub_livelist for EINTR (authored by Serapheim Dimitropoulos <serapheim@delphix.com>).Nov 1 2022, 7:34 PM