I think hang may also happen here:
if (recv_sys->apply_batch_on) {
mutex_exit(&(recv_sys->mutex));
os_thread_sleep(500000);
goto loop; }
here is bt with more debug info:
(gdb) bt #0 0x00000030e42901d5 in __nanosleep_nocancel () from /lib64/tls/libc.so.6 #1 0x00000030e42c3058 in usleep () from /lib64/tls/libc.so.6 #2 0x0000000000501168 in os_thread_sleep (tm=548682064480) at os0thread.c:271 #3 0x00000000004b2c45 in recv_apply_hashed_log_recs (allow_ibuf=0) at log0recv.c:1441 #4 0x00000000004b4a85 in recv_scan_log_recs (apply_automatically=1, available_memory=100663296, store_to_hash=1, buf=0x2a9c2a4200 "\221?E%\002", len=65536, start_lsn={high = 1315, low = 3163179008}, contiguous_lsn=0x7fbffff160, group_scanned_lsn=0x7fbffff170) at log0recv.c:2538 #5 0x00000000004b4bda in recv_group_scan_log_recs (group=0x2a956604b8, contiguous_lsn=0x7fbffff160, group_scanned_lsn=0x7fbffff170) at log0recv.c:2577 #6 0x00000000004b55d1 in recv_recovery_from_checkpoint_start (type=78656949, limit_lsn= {high = 4294967295, low = 4294967295}, min_flushed_lsn={high = 1132, low = 2546717136}, max_flushed_lsn= {high = 1132, low = 2546717136}) at log0recv.c:2819 #7 0x000000000040c2d3 in innobase_start_or_create_for_mysql () at srv0start.c:1446 #8 0x00000000004039d9 in innodb_init () at xtrabackup.c:1187 #9 0x00000000004063c2 in xtrabackup_prepare_func () at xtrabackup.c:2636 #10 0x000000000040681c in main (argc=0, argv=0x67dc48) at xtrabackup.c:2833 (gdb) p recv_sys->apply_batch_on $1 = 1 (gdb) p recv_sys->n_addrs $2 = 4
I think hang may also happen here:
if (recv_sys- >apply_ batch_on) {
}
here is bt with more debug info:
(gdb) bt nocancel () from /lib64/ tls/libc. so.6 tls/libc. so.6 hashed_ log_recs (allow_ibuf=0) at log0recv.c:1441 automatically= 1, available_ memory= 100663296, store_to_hash=1, 0x2a9c2a4200 "\221?E%\002", len=65536, start_lsn={high = 1315, low = 3163179008}, lsn=0x7fbffff16 0, group_scanned_ lsn=0x7fbffff17 0) at log0recv.c:2538 scan_log_ recs (group= 0x2a956604b8, contiguous_ lsn=0x7fbffff16 0, scanned_ lsn=0x7fbffff17 0) at log0recv.c:2577 from_checkpoint _start (type=78656949, limit_lsn= lsn={high = 1132, low = 2546717136}, max_flushed_lsn= start_or_ create_ for_mysql () at srv0start.c:1446 prepare_ func () at xtrabackup.c:2636 >apply_ batch_on
#0 0x00000030e42901d5 in __nanosleep_
#1 0x00000030e42c3058 in usleep () from /lib64/
#2 0x0000000000501168 in os_thread_sleep (tm=548682064480) at os0thread.c:271
#3 0x00000000004b2c45 in recv_apply_
#4 0x00000000004b4a85 in recv_scan_log_recs (apply_
buf=
contiguous_
#5 0x00000000004b4bda in recv_group_
group_
#6 0x00000000004b55d1 in recv_recovery_
{high = 4294967295, low = 4294967295}, min_flushed_
{high = 1132, low = 2546717136}) at log0recv.c:2819
#7 0x000000000040c2d3 in innobase_
#8 0x00000000004039d9 in innodb_init () at xtrabackup.c:1187
#9 0x00000000004063c2 in xtrabackup_
#10 0x000000000040681c in main (argc=0, argv=0x67dc48) at xtrabackup.c:2833
(gdb) p recv_sys-
$1 = 1
(gdb) p recv_sys->n_addrs
$2 = 4