Skip to content

Commit d42db21

Browse files
committed
Do not reset buffer flags in CCH_shutdown when it's called from ERR_bugcheck_msg because otherwise a precedence relationship can be ruined for other threads that may still be active
1 parent e4c084f commit d42db21

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/jrd/cch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,7 @@ bool CCH_rollover_to_shadow(thread_db* tdbb, Database* dbb, jrd_file* file, cons
20942094
}
20952095

20962096

2097-
void CCH_shutdown(thread_db* tdbb)
2097+
void CCH_shutdown(thread_db* tdbb, bool bugcheck)
20982098
{
20992099
/**************************************
21002100
*
@@ -2144,7 +2144,7 @@ void CCH_shutdown(thread_db* tdbb)
21442144
bcb_repeat* tail = bcb->bcb_rpt;
21452145
const bcb_repeat* const end = tail + bcb->bcb_count;
21462146

2147-
if (tail && tail->bcb_bdb)
2147+
if (tail && tail->bcb_bdb && !bugcheck)
21482148
{
21492149
try
21502150
{

src/jrd/cch_proto.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool CCH_prefetch_pages(Jrd::thread_db*);
7070
void CCH_release(Jrd::thread_db*, Jrd::win*, const bool);
7171
void CCH_release_exclusive(Jrd::thread_db*);
7272
bool CCH_rollover_to_shadow(Jrd::thread_db* tdbb, Jrd::Database* dbb, Jrd::jrd_file*, const bool);
73-
void CCH_shutdown(Jrd::thread_db*);
73+
void CCH_shutdown(Jrd::thread_db*, bool bugcheck = false);
7474
void CCH_unwind(Jrd::thread_db*, const bool);
7575
bool CCH_validate(Jrd::win*);
7676
void CCH_flush_ast(Jrd::thread_db*);

src/jrd/err.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void ERR_bugcheck_msg(const TEXT* msg)
101101
iscDbLogStatus(dbb->dbb_filename.nullStr(), &status);
102102

103103
dbb->dbb_flags |= DBB_bugcheck;
104-
CCH_shutdown(tdbb);
104+
CCH_shutdown(tdbb, true);
105105

106106
if (Config::getBugcheckAbort())
107107
abort();

0 commit comments

Comments
 (0)