As reported on samba-technical by Rouven WEILER Rouven_Weiler@gmx.net:
For the backtrace mentioned in the commit i.e, in case of nested share_mode_do_locked() invocation, callback comes through dbwrap_watched_do_locked_fn() where it fails to update rec->value_valid which further gets assigned to static_share_mode_record within share_mode_do_locked_fn(). Following that assertion on rec->value_valid fails via dbwrap_record_get_value() inside get_static_share_mode_data().