Bug #45643 Server crash due to gap locking mechanism
| Submitted: | 22 Jun 2009 3:20 | Modified: | 7 Jul 2009 23:04 |
|---|---|---|---|
| Reporter: | Joao de Araujo | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
| Version: | 5.1.35 | OS: | Windows (Windows Server 2008) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | gap locking, innodb_locks_unsafe_for_binlog | ||
[22 Jun 2009 3:20]
Joao de Araujo
[22 Jun 2009 3:23]
Joao de Araujo
output for the command "show innodb status" 'InnoDB', '', ' ===================================== 090621 21:01:17 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 20 seconds ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 77, signal count 73 Mutex spin waits 0, rounds 863, OS waits 10 RW-shared spins 118, OS waits 59; RW-excl spins 7, OS waits 5 ------------------------ LATEST DETECTED DEADLOCK ------------------------ 090621 20:51:42 *** (1) TRANSACTION: TRANSACTION 0 3493167, ACTIVE 0 sec, OS thread id 1712 inserting mysql tables in use 1, locked 1 LOCK WAIT 5 lock struct(s), heap size 1024, 3 row lock(s), undo log entries 2 MySQL thread id 5, query id 442 localhost 127.0.0.1 mibss update insert into historicalprices (codSecurity, datTimestamp, numOpen, numDayHigh, numDayLow, numClose, numAdjustedOpen, numAdjustedDayHigh, numAdjustedDayLow, numAdjustedClose, numVolume, bolDayTemp) values (46, '2009-06-17 00:00:00', 4.68, 4.84, 4.4, 4.5, 4.68, 4.84, 4.4, 4.5, 10137400, 0) *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 0 page no 304043 n bits 200 index `idx_timestamp` of table `mibss`.`historicalprices` trx id 0 3493167 lock_mode X locks gap before rec insert intention waiting Record lock, heap no 2 PHYSICAL RECORD: n_fields 2; compact format; info bits 0 0: len 8; hex 80001245b6263280; asc E &2 ;; 1: len 4; hex 812b9ee2; asc + ;; *** (2) TRANSACTION: TRANSACTION 0 3493164, ACTIVE 0 sec, OS thread id 3848 fetching rows, thread declared inside InnoDB 318 mysql tables in use 1, locked 1 120 lock struct(s), heap size 11584, 16423 row lock(s), undo log entries 2 MySQL thread id 6, query id 431 localhost 127.0.0.1 mibss updating delete from historicalprices where codSecurity=49 and (datTimestamp between '2009-06-17 00:00:00' and '2009-06-18 23:59:00') *** (2) HOLDS THE LOCK(S): RECORD LOCKS space id 0 page no 304043 n bits 200 index `idx_timestamp` of table `mibss`.`historicalprices` trx id 0 3493164 lock_mode X Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0 0: len 8; hex 73757072656d756d; asc supremum;; ...cut *** (2) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 0 page no 304044 n bits 192 index `idx_timestamp` of table `mibss`.`historicalprices` trx id 0 3493164 lock_mode X waiting Record lock, heap no 116 PHYSICAL RECORD: n_fields 2; compact format; info bits 0 0: len 8; hex 80001245b6263280; asc E &2 ;; 1: len 4; hex 812bd12c; asc + ,;; *** WE ROLL BACK TRANSACTION (1) ------------ TRANSACTIONS ------------ Trx id counter 0 3493173 Purge done for trx's n:o < 0 3493172 undo n:o < 0 0 History list length 20 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 0 0, not started, OS thread id 3928 MySQL thread id 15, query id 553 localhost 127.0.0.1 root show innodb status -------- FILE I/O -------- I/O thread 0 state: wait Windows aio (insert buffer thread) I/O thread 1 state: wait Windows aio (log thread) I/O thread 2 state: wait Windows aio (read thread) I/O thread 3 state: wait Windows aio (write thread) Pending normal aio reads: 0, aio writes: 0, ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 Pending flushes (fsync) log: 0; buffer pool: 0 1355 OS file reads, 96 OS file writes, 37 OS fsyncs 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s ------------------------------------- INSERT BUFFER AND ADAPTIVE HASH INDEX ------------------------------------- Ibuf: size 1, free list len 705, seg size 707, 0 inserts, 0 merged recs, 0 merges Hash table size 1407101, node heap has 95 buffer(s) 0.00 hash searches/s, 0.00 non-hash searches/s --- LOG --- Log sequence number 3 1436578153 Log flushed up to 3 1436578153 Last checkpoint at 3 1436578153 0 pending log writes, 0 pending chkp writes 36 log i/o's done, 0.00 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total memory allocated 386714664; in additional pool allocated 1606784 Dictionary memory allocated 80296 Buffer pool size 21696 Free buffers 20256 Database pages 1345 Modified db pages 0 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages read 1345, created 0, written 62 0.00 reads/s, 0.00 creates/s, 0.00 writes/s No buffer pool page gets since the last printout -------------- ROW OPERATIONS -------------- 0 queries inside InnoDB, 0 queries in queue 1 read views open inside InnoDB Main thread id 2356, state: waiting for server activity Number of rows inserted 13, updated 5, deleted 20, read 44077 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================ '
[22 Jun 2009 3:44]
Valeriy Kravchuk
I think this is a duplicate of bug #45357 (crash part). Feel free to report another bug about the deadlock with READ UNCOMMITTED isolation level, if you really think it is a bug.
[7 Jul 2009 23:04]
Joao de Araujo
I think it is also related to this http://bugs.mysql.com/bug.php?id=43766
[4 Aug 2010 7:50]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 7:55]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 7:56]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 7:57]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 7:58]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 7:59]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:00]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:09]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:13]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:14]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:15]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:16]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:17]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:25]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 9:00]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:20)
[4 Aug 2010 9:04]
Bugs System
Pushed into mysql-next-mr (revid:alik@ibmvm-20100804081630-ntapn8bf9pko9vj3) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (pib:20)
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.