MDEV-37354 : SIGSEGV in Wsrep_server_service::release_high_priority_service | discard_streaming_applier

This issue seems to be already fixed. However, to avoid future problems:

Wsrep_server_service::release_storage_service
  Add assertion that storage service is not nullptr and
  contains thd. In production binaries add guard to
  not use nullptr.

Wsrep_server_service::release_high_priority_service
  Add assertion that high_priority service is not nullptr and
  contains thd. In production binaries add guard to
  not use nullptr.

wsrep_is_BF_lock_timeout
  Remove printing of record lock because its page might
  not be latched leading to assertion in multi-master
  testing.
This commit is contained in:
Jan Lindström 2025-11-27 10:11:38 +02:00 committed by Jan Lindström
commit bb32acebf3
4 changed files with 46 additions and 30 deletions

View file

@ -670,25 +670,9 @@ bool wsrep_is_BF_lock_timeout(const trx_t &trx)
<< " error: " << trx.error_state
<< " query: " << wsrep_thd_query(trx.mysql_thd);
if (const lock_t*wait_lock = trx.lock.wait_lock)
{
const my_hrtime_t now= my_hrtime_coarse();
const my_hrtime_t suspend_time= trx.lock.suspend_time;
fprintf(stderr,
"------- TRX HAS BEEN WAITING %llu us"
" FOR THIS LOCK TO BE GRANTED:\n",
now.val - suspend_time.val);
if (!wait_lock->is_table()) {
mtr_t mtr;
lock_rec_print(stderr, wait_lock, mtr);
} else {
lock_table_print(stderr, wait_lock);
}
fprintf(stderr, "------------------\n");
}
// TODO: Can't use lock_rec_print from here because
// record lock page might not be latched and we are
// actually only interested lock information.
return true;
}