mariadb/storage/innobase
Marko Mäkelä ddec6ecdd8 Bug#11877216 InnoDB too eager to commit suicide on a busy server
sync_array_print_long_waits(): Return the longest waiting thread ID
and the longest waited-for lock. Only if those remain unchanged
between calls in srv_error_monitor_thread(), increment
fatal_cnt. Otherwise, reset fatal_cnt.

Background: There is a built-in watchdog in InnoDB whose purpose is to
kill the server when some thread is stuck waiting for a mutex or
rw-lock. Before this fix, the logic was flawed.

The function sync_array_print_long_waits() returns TRUE if it finds a
lock wait that exceeds 10 minutes (srv_fatal_semaphore_wait_threshold).
The function srv_error_monitor_thread() will kill the server if this
happens 10 times in a row (fatal_cnt reaches 10), checked every 30
seconds. This is wrong, because this situation does not mean that the
server is hung. If the server is very busy for a little over 15
minutes, it will be killed.

Consider this example. Thread T1 is waiting for mutex M. Some time
later, threads T2..Tn start waiting for the same mutex M. If T1 keeps
waiting for 600 seconds, fatal_cnt will be incremented to 1. So far,
so good. Now, if M is granted to T1, the server was obviously not
stuck. But, T2..Tn keeps waiting, and their wait time will be longer
than 600 seconds. If 5 minutes later, some Tn has still been waiting
for more than 10 minutes for the mutex M, the server can be killed,
even though it is not stuck.

rb:622 approved by Jimmy Yang
2011-03-30 14:25:58 +03:00
..
btr Fix Bug #59465 btr_estimate_number_of_different_key_vals use incorrect offset 2011-01-28 00:50:10 -08:00
buf (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
data Applying InnoDB snapshot 5.1-ss6242, part 4. Fixes BUG#48526 2009-11-30 14:23:52 +05:30
dict Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
dyn Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
eval Remove redundant variable 2010-09-14 12:11:00 +03:00
fil Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance. 2010-08-20 17:49:43 +10:00
fsp (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
fut Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
ha Cherry-pick some changes from innodb-5.1-ss2545 snapshot. Includes fixes for 2008-08-20 16:18:33 -06:00
handler Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
ibuf Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
include Bug#11877216 InnoDB too eager to commit suicide on a busy server 2011-03-30 14:25:58 +03:00
lock (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-14 12:37:03 +03:00
log (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
mach Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
mem Apply snapshot innodb-5.1-ss1989 2007-11-06 15:42:58 -07:00
mtr Apply InnoDB snapshot innodb-5.1-ss1751. 2007-08-25 03:55:38 -06:00
os Bug#52062: Compiler warning in os0file.c on windows 64-bit 2010-10-27 23:18:59 -05:00
page Applying InnoDB snashot 5.1-ss5024 part 1, Follow up Fix for BUG#43660 2009-05-19 13:22:19 +05:30
pars Apply InnoDB snapshot innodb-5.1-ss1751. 2007-08-25 03:55:38 -06:00
que (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-14 13:39:52 +03:00
read Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
rem Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
row Bug#59464 Race condition in row_vers_build_for_semi_consistent_read 2011-01-25 11:54:50 +02:00
srv Bug#11877216 InnoDB too eager to commit suicide on a busy server 2011-03-30 14:25:58 +03:00
sync Bug#11877216 InnoDB too eager to commit suicide on a busy server 2011-03-30 14:25:58 +03:00
thr Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
trx Bug#59440 Race condition in XA ROLLBACK and XA COMMIT after server restart 2011-01-27 13:27:29 +02:00
usr Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
ut (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
CMakeLists.txt Import branches/5.1@r6912 from SVN on top of storage/innobase 2010-03-31 10:17:04 +03:00
Makefile.am Bug#53445: Build with -Wall and fix warnings that it generates 2010-07-09 08:37:51 -03:00
plug.in Import branches/5.1@r6912 from SVN on top of storage/innobase 2010-03-31 10:17:04 +03:00