Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MySQL slave stuck in "Reading event from the relay log"?

$
0
0
  • 5.5.28-log MySQL Community Server (GPL) by Remi
  • binlog-format=MIXED

My problem is similar to this question.

*************************** 2. row ***************************
     Id: 973415
   User: system user
   Host: 
     db: NULL
Command: Connect
   Time: 29062
  State: Reading event from the relay log
   Info: NULL

It looks like a bug, except for no one mentioned that verion 5.5.28 is affected.

Here is the additional information:

mysql> show slave status\G

          Master_Log_File: mysql-bin.006413
      Read_Master_Log_Pos: 40371120
           Relay_Log_File: mysqld-relay-bin.011003
            Relay_Log_Pos: 226592090
    Relay_Master_Log_File: mysql-bin.006392
         Slave_IO_Running: Yes
        Slave_SQL_Running: Yes
          Replicate_Do_DB:  
      Replicate_Ignore_DB:  
       Replicate_Do_Table:  
   Replicate_Ignore_Table:  
  Replicate_Wild_Do_Table:  
Replicate_Wild_Ignore_Table: 
               Last_Errno: 0
               Last_Error: 
             Skip_Counter: 0
      Exec_Master_Log_Pos: 226591944
          Relay_Log_Space: 5708184440
          Until_Condition: None
           Until_Log_File: 
            Until_Log_Pos: 0
       Master_SSL_Allowed: No
       Master_SSL_CA_File: 
       Master_SSL_CA_Path: 
          Master_SSL_Cert: 
        Master_SSL_Cipher: 
           Master_SSL_Key: 
    Seconds_Behind_Master: 29531

mysql> show engine innodb status;

---TRANSACTION 1709EE56, ACTIVE 29524 sec fetching rows
mysql tables in use 8, locked 8
94647 lock struct(s), heap size 14121400, 45755176 row lock(s), undo log entries 7547
MySQL thread id 973415, OS thread handle 0x40d90940, query id 1773214543 Reading event from the relay log

mysqlbinlog --start-position=226591944 mysql-bin.006392

#130401 15:18:23 server id 248  end_log_pos 226592078   Table_map: `reportingdb`.`v3_cam_ip` mapped to number 4973102
#130401 15:18:23 server id 248  end_log_pos 226593102   Delete_rows: table id 4973102
#130401 15:18:23 server id 248  end_log_pos 226594131   Delete_rows: table id 4973102
#130401 15:18:23 server id 248  end_log_pos 226595169   Delete_rows: table id 4973102

The command that the user run on the master:

DELETE FROM v3_cam_ip WHERE dt ='2013-03-15' LIMIT 100000

mysql> show create table v3_cam_ip\G

*************************** 1. row ***************************
       Table: v3_cam_ip
Create Table: CREATE TABLE `v3_cam_ip` (
  `campaignid` mediumint(9) unsigned DEFAULT NULL,
  `ip` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '',
  `dt` date NOT NULL,
  KEY `ix_campaignid` (`campaignid`),
  KEY `ix_dt` (`dt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin
/*!50100 PARTITION BY RANGE (TO_DAYS(dt))
(PARTITION p00 VALUES LESS THAN (0) ENGINE = InnoDB,
 PARTITION p01 VALUES LESS THAN (734653) ENGINE = InnoDB,
 PARTITION p02 VALUES LESS THAN (734745) ENGINE = InnoDB,
 PARTITION p05 VALUES LESS THAN (734965) ENGINE = InnoDB,
 PARTITION p06 VALUES LESS THAN (735160) ENGINE = InnoDB,
 PARTITION p07 VALUES LESS THAN (735210) ENGINE = InnoDB,
 PARTITION MERGER_201341 VALUES LESS THAN (735324) ENGINE = InnoDB,
 PARTITION pcurrent_201341 VALUES LESS THAN (735325) ENGINE = InnoDB) */

mysql> show keys from v3_cam_ip\G

*************************** 1. row ***************************
        Table: v3_cam_ip
   Non_unique: 1
     Key_name: ix_campaignid
 Seq_in_index: 1
  Column_name: campaignid
    Collation: A
  Cardinality: 20
     Sub_part: NULL
       Packed: NULL
         Null: YES
   Index_type: BTREE
      Comment: 
Index_comment: 
*************************** 2. row ***************************
        Table: v3_cam_ip
   Non_unique: 1
     Key_name: ix_dt
 Seq_in_index: 1
  Column_name: dt
    Collation: A
  Cardinality: 20
     Sub_part: NULL
       Packed: NULL
         Null: 
   Index_type: BTREE
      Comment: 
Index_comment: 
2 rows in set (0.95 sec)

What I have done on one of two Slaves:

  • stop slave; hangs so I have to press Ctrl-C
  • then I tried to restart the MySQL (using init script) but it failed
  • after that I did a kill -9 (silly?) and start again
  • now the slave is started but it doesn't get update from the master

What should I do on the remaining slave?


gdb --batch --quiet -ex 'set pagination off' -ex 'thread apply all bt full' -ex 'quit' -p $(pidof mysqld)

#4  0x0000000000926b99 in ha_partition::handle_unordered_next(unsigned char*, bool) ()
No symbol table info available.
#5  0x0000000000733de9 in Rows_log_event::find_row(Relay_log_info const*) ()
No symbol table info available.
#6  0x0000000000734079 in Delete_rows_log_event::do_exec_row(Relay_log_info const*) ()
No symbol table info available.
#7  0x0000000000734a92 in Rows_log_event::do_apply_event(Relay_log_info const*) ()
No symbol table info available.
#8  0x000000000051774e in apply_event_and_update_pos(Log_event*, THD*, Relay_log_info*) ()

The full backtrace: http://fpaste.org/pXvT/


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>