mariadb/storage/innobase/include
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
..
btr0btr.h Applied innodb-5.1-ss1004 2006-11-09 05:01:19 +01:00
btr0btr.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0cur.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
btr0cur.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0pcur.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0pcur.ic
btr0sea.h Complete application of InnoDB snapshot innodb-5.1-ss2545. 2008-12-14 12:25:33 -07:00
btr0sea.ic
btr0types.h
buf0buf.h Cherry-pick some changes from innodb-5.1-ss2479 snapshot. Includes fixes for 2008-08-19 18:37:41 -06:00
buf0buf.ic (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
buf0flu.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
buf0flu.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
buf0lru.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
buf0lru.ic
buf0rea.h Applying InnoDB snapshot, fixes BUG#38901 2010-02-26 13:03:58 +04:00
buf0types.h
data0data.h
data0data.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
data0type.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
data0type.ic Applying InnoDB snapshot innodb-5.1-ss3603 2009-01-12 23:27:11 +01:00
data0types.h
db0err.h Merge from mysql-5.1-bugteam to mysql-5.1-security 2010-09-01 17:43:02 -07:00
dict0boot.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
dict0boot.ic
dict0crea.h Applied innodb-5.1-ss1004 2006-11-09 05:01:19 +01:00
dict0crea.ic
dict0dict.h This is to resolve a hang situation in 5.1 builtin raised by 2010-08-24 20:42:33 -07:00
dict0dict.ic This is to resolve a hang situation in 5.1 builtin raised by 2010-08-24 20:42:33 -07:00
dict0load.h Fix Bug #54582 stack overflow when opening many tables linked with 2010-08-04 03:11:33 -07:00
dict0load.ic
dict0mem.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
dict0mem.ic
dict0types.h Non-functional changes. 2011-01-17 14:06:48 +02:00
dyn0dyn.h
dyn0dyn.ic
eval0eval.h
eval0eval.ic
eval0proc.h
eval0proc.ic
fil0fil.h Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance. 2010-08-20 17:49:43 +10:00
fsp0fsp.h Applying InnoDB snashot 5.1-ss5282, PRE-Fix for BUG#45097 2009-06-11 18:21:54 +05:30
fsp0fsp.ic
fsp0types.h Applying InnoDB snashot 5.1-ss5282, PRE-Fix for BUG#45097 2009-06-11 18:21:54 +05:30
fut0fut.h
fut0fut.ic
fut0lst.h
fut0lst.ic
ha0ha.h Applied innodb-5.1-ss1039 and innodb-5.1-ss1134 snapshots. 2007-01-04 19:51:34 -07:00
ha0ha.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
ha_prototypes.h Applying InnoDB snapshot 5.1-ss6242, part 1. Fixes BUG#32430 2009-11-30 13:56:45 +05:30
hash0hash.h Merge mysql.com:/home/kent/bk/tmp2/mysql-5.0-build 2007-01-15 10:37:27 +01:00
hash0hash.ic Applying InnoDB snapshot innodb-5.1-ss3603 2009-01-12 23:32:50 +01:00
ibuf0ibuf.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
ibuf0ibuf.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
ibuf0types.h
lock0iter.h Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0lock.h Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record 2010-06-02 13:26:37 +03:00
lock0lock.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
lock0priv.h Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0priv.ic Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0types.h
log0log.h
log0log.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
log0recv.h
log0recv.ic
mach0data.h Applying InnoDB snapshot 5.1-ss6242, part 7. Fixes BUG#49032 2009-11-30 15:11:38 +05:30
mach0data.ic Make UNIV_DEBUG Valgrind friendly in the built-in InnoDB. 2010-05-19 11:16:18 +03:00
mem0dbg.h Apply snapshot innodb-5.1-ss1989 2007-11-06 15:42:58 -07:00
mem0dbg.ic
mem0mem.h Merge r6103 from InnoDB Plugin to the built-in InnoDB to fix Bug #53202: 2010-04-28 08:33:25 +02:00
mem0mem.ic Merge r6103 from InnoDB Plugin to the built-in InnoDB to fix Bug #53202: 2010-04-28 08:33:25 +02:00
mem0pool.h
mem0pool.ic
mtr0log.h
mtr0log.ic Applying InnoDB snashot 5.1-ss5282, Fix for BUG#45097 2009-06-11 18:35:12 +05:30
mtr0mtr.h Applying InnoDB snapshot 5.1-ss6344, part 2. Fixes BUG#41609 but does 2009-12-21 15:50:32 +05:30
mtr0mtr.ic Apply InnoDB snapshot ss923 2006-10-20 12:36:15 -06:00
mtr0types.h
os0file.h Applying InnoDB snapshot 5.1-ss6242, part 2. Fixes BUG#3139 2009-11-30 14:10:31 +05:30
os0proc.h
os0proc.ic
os0sync.h Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
os0sync.ic
os0thread.h
os0thread.ic
page0cur.h Applied InnoDB snapshot innodb-5.1-ss2093 2007-11-20 12:23:18 -07:00
page0cur.ic
page0page.h Apply snapshot innodb-51-ss1644 2007-07-24 19:34:31 -06:00
page0page.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
page0types.h
pars0grm.h
pars0opt.h
pars0opt.ic
pars0pars.h Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
pars0pars.ic
pars0sym.h
pars0sym.ic
pars0types.h
que0que.h Fix Bug #54582 stack overflow when opening many tables linked with 2010-08-04 03:11:33 -07:00
que0que.ic
que0types.h
read0read.h Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
read0read.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
read0types.h
rem0cmp.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
rem0cmp.ic Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
rem0rec.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
rem0rec.ic Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
rem0types.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
row0ins.h
row0ins.ic
row0mysql.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
row0mysql.ic
row0purge.h
row0purge.ic
row0row.h
row0row.ic
row0sel.h Apply innodb-5.1-ss2360 snapshot 2008-03-27 02:40:45 +01:00
row0sel.ic
row0types.h
row0uins.h
row0uins.ic
row0umod.h
row0umod.ic
row0undo.h
row0undo.ic
row0upd.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
row0upd.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
row0vers.h
row0vers.ic
srv0que.h
srv0srv.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
srv0srv.ic
srv0start.h
sync0arr.h Bug#11877216 InnoDB too eager to commit suicide on a busy server 2011-03-30 14:25:58 +03:00
sync0arr.ic
sync0rw.h Bug#59579 rw_lock_debug_print outputs to stderr 2011-01-18 12:25:13 +02:00
sync0rw.ic Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
sync0sync.h Fix bug#54583. This change reverses rsvn:1350 by getting rid of a bogus assertion 2010-06-25 18:18:41 +10:00
sync0sync.ic Apply InnoDB snapshot innodb-5.1-ss2858, part 3. 2008-12-14 13:27:13 -07:00
sync0types.h
thr0loc.h
thr0loc.ic
trx0purge.h
trx0purge.ic
trx0rec.h
trx0rec.ic
trx0roll.h Applying InnoDB snashot 5.1-ss3931, part 1. Fixes 2009-03-02 18:06:44 -07:00
trx0roll.ic
trx0rseg.h Non-functional changes. 2011-01-17 14:06:48 +02:00
trx0rseg.ic Applying InnoDB snashot 5.1-ss5343, Fixes BUG#45357 2009-06-22 16:58:00 +05:30
trx0sys.h Applying InnoDB snashot 5.1-ss5282, Fix for BUG#45097 2009-06-11 18:35:12 +05:30
trx0sys.ic Merge from innodb-branches-5.1 2010-04-07 21:59:02 +03:00
trx0trx.h Bug#59440 Race condition in XA ROLLBACK and XA COMMIT after server restart 2011-01-27 13:27:29 +02:00
trx0trx.ic Applying InnoDB snashot 5.1-ss4699, part 1. Fixes BUG#39320 and other 2009-04-15 17:16:08 +05:30
trx0types.h
trx0undo.h apply snapshot innodb-5.1-ss2387 2008-03-27 15:13:10 +01:00
trx0undo.ic
trx0xa.h
univ.i Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance. 2010-08-20 17:49:43 +10:00
usr0sess.h
usr0sess.ic
usr0types.h
ut0byte.h
ut0byte.ic Fixed compiler warnings 2007-02-23 13:13:55 +02:00
ut0dbg.h Bug#45288: pb2 returns a lot of compilation warnings 2010-10-19 14:48:03 -02:00
ut0list.h
ut0list.ic
ut0lst.h Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
ut0mem.h Apply InnoDB snapshot innodb-5.1-ss1726. 2007-08-24 19:14:52 -06:00
ut0mem.ic
ut0rnd.h
ut0rnd.ic (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-13 16:33:25 +03:00
ut0sort.h
ut0ut.h Complete application of InnoDB snapshot innodb-5.1-ss2485, part 1. Fixes 2008-12-14 12:18:59 -07:00
ut0ut.ic Fixed compiler warnings 2007-02-23 13:13:55 +02:00
ut0vec.h
ut0vec.ic
ut0wqueue.h