fix: core at calling get_tid()

This commit is contained in:
obdev
2023-03-15 08:16:26 +00:00
committed by ob-robot
parent ed4e8ef8d9
commit a22145febf
13 changed files with 36 additions and 85 deletions

View File

@ -126,7 +126,7 @@ int64_t ObRsReentrantThread::get_last_run_timestamp() const
void ObRsReentrantThread::check_alert(const ObRsReentrantThread &thread)
{
if (thread.need_monitor_check()) {
const pid_t thread_id = thread.get_tid();
const pid_t thread_id = syscall(__NR_gettid); // only called by thread self
const char *thread_name = thread.get_thread_name();
int64_t last_run_timestamp = thread.get_last_run_timestamp();
int64_t last_run_interval = ObTimeUtility::current_time() - last_run_timestamp;