summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2020-08-28 14:37:59 +0200
committerVolker Lendecke <vl@samba.org>2020-08-31 11:57:01 +0000
commit444f2bedf723b89bb9f493c47812bff2154c4113 (patch)
tree71d9b99409a450daf7b20afeadeca338a4fd8151 /source3/locking
parent560fe7b38f0c8d53079fabf3f984b11748270035 (diff)
downloadsamba-444f2bedf723b89bb9f493c47812bff2154c4113.tar.gz
s3:share_mode_lock: reproduce problem with stale disconnected share mode entries
This reproduces the origin of "PANIC: assert failed in get_lease_type()" (https://bugzilla.samba.org/show_bug.cgi?id=14428). share_mode_cleanup_disconnected() removes disconnected entries from leases.tdb and brlock.tdb but not from locking.tdb. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/share_mode_lock.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c
index ba0bc2b1e7b..ca8b2f47529 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -1730,6 +1730,20 @@ bool share_mode_cleanup_disconnected(struct file_id fid,
data->have_share_modes = false;
data->modified = true;
+ /*
+ * This is a temporary reproducer for the origin of
+ * https://bugzilla.samba.org/show_bug.cgi?id=14428
+ * "PANIC: assert failed in get_lease_type()"
+ *
+ * This will be removed again once the bug is demonstrated
+ * and fixed.
+ */
+ TALLOC_FREE(state.lck);
+ state.lck = get_existing_share_mode_lock(frame, fid);
+ if (state.lck != NULL) {
+ DBG_ERR("Reproduced BUG#14428\n");
+ }
+
ret = true;
done:
talloc_free(frame);