From b6b7d6525c2c86f954c3c76d866101e7a08970f6 Mon Sep 17 00:00:00 2001 From: hvlad Date: Mon, 17 Sep 2018 21:00:08 +0300 Subject: [PATCH] Additional fix for bug CORE-5436 : [FB3 SC] Server hangs (under load test) The case when main thread convert still not acquired lock when AST thread assert locks. It leads to the error: Fatal lock manager error: invalid lock id (0) --- src/jrd/lck.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jrd/lck.cpp b/src/jrd/lck.cpp index cc81c6458e..220b3ef6ba 100644 --- a/src/jrd/lck.cpp +++ b/src/jrd/lck.cpp @@ -394,6 +394,11 @@ bool LCK_convert_opt(thread_db* tdbb, Lock* lock, USHORT level) if (dbb->dbb_ast_flags & DBB_assert_locks) { lock->lck_logical = old_level; + if (lock->lck_id == 0) + { + fb_assert(dbb->dbb_ast_flags & DBB_blocking); + return LCK_lock(tdbb, lock, level, LCK_NO_WAIT); + } return LCK_convert(tdbb, lock, level, LCK_NO_WAIT); }