diff options
author | monty@mysql.com <> | 2004-10-08 15:43:27 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-10-08 15:43:27 +0300 |
commit | 8d73628d888082f1fd54129d120953c7787f6607 (patch) | |
tree | 26d8a4d43267899111e3c944feb5b5c4064aaf54 /innobase/srv | |
parent | b751796aa28e02279d31e22e49f1ca4e85e11596 (diff) | |
parent | c73cd9ff8a91bfed583245d1096e2906d098deda (diff) | |
download | mariadb-git-8d73628d888082f1fd54129d120953c7787f6607.tar.gz |
Merge
Diffstat (limited to 'innobase/srv')
-rw-r--r-- | innobase/srv/srv0srv.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index adffe06ef0a..94930b24e78 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -1810,7 +1810,8 @@ srv_error_monitor_thread( /* in: a dummy parameter required by os_thread_create */ { - ulint cnt = 0; + /* number of successive fatal timeouts observed */ + ulint fatal_cnt = 0; dulint old_lsn; dulint new_lsn; @@ -1823,8 +1824,6 @@ srv_error_monitor_thread( loop: srv_error_monitor_active = TRUE; - cnt++; - /* Try to track a strange bug reported by Harald Fuchs and others, where the lsn seems to decrease at times */ @@ -1851,7 +1850,20 @@ loop: srv_refresh_innodb_monitor_stats(); } - sync_array_print_long_waits(); + if (sync_array_print_long_waits()) { + fatal_cnt++; + if (fatal_cnt > 5) { + + fprintf(stderr, +"InnoDB: Error: semaphore wait has lasted > %lu seconds\n" +"InnoDB: We intentionally crash the server, because it appears to be hung.\n", + srv_fatal_semaphore_wait_threshold); + + ut_error; + } + } else { + fatal_cnt = 0; + } /* Flush stderr so that a database user gets the output to possible MySQL error file */ |