Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14527

Test innodb.truncate_restart fails occasionally with assertion on trx0purge.cc line 298

    XMLWordPrintable

    Details

      Description

      Stack trace:

      innodb.truncate_restart 'innodb'         w6 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2017-11-29 09:52:41
      line
      mysqld: /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc:298: void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*): Assertion `srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_sys->state == PURGE_STATE_DISABLED) || ((trx->undo_no == 0 || trx->in_mysql_trx_list) && srv_fast_shutdown)' failed.
      Attempting backtrace. You can use the following information to find out
      ^ Found warnings in /dev/shm/6/log/mysqld.1.err
      ok
       
       - saving '/dev/shm/6/log/innodb.truncate_restart-innodb/' to '/dev/shm/log/innodb.truncate_restart-innodb/'
       - found 'core' (0/5)
       
      Trying 'dbx' to get a backtrace
       
      Trying 'gdb' to get a backtrace from coredump /dev/shm/log/innodb.truncate_restart-innodb/mysqld.1/data/core
      Core generated by '/home/jan/mysql/10.2-bug/sql/mysqld'
      Output from gdb follows. The first stack trace is from the failing thread.
      The following stack traces are from all threads (so the failing one is
      duplicated).
      --------------------------
      [New LWP 1818]
      [New LWP 1674]
      [New LWP 1682]
      [New LWP 1649]
      [New LWP 1698]
      [New LWP 1684]
      [New LWP 1683]
      [New LWP 1700]
      [New LWP 1685]
      [New LWP 1716]
      [New LWP 1687]
      [New LWP 1725]
      [New LWP 1727]
      [New LWP 1689]
      [New LWP 1731]
      [New LWP 1691]
      [New LWP 1699]
      [New LWP 4119]
      [New LWP 1726]
      [New LWP 1729]
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
      Core was generated by `/home/jan/mysql/10.2-bug/sql/mysqld --defaults-group-suffix=.1 --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      57	../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
      [Current thread is 1 (Thread 0x7f41dd8ff700 (LWP 1818))]
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005605c92181a4 in my_write_core (sig=6) at /home/jan/mysql/10.2-bug/mysys/stacktrace.c:477
      #2  0x00005605c8aab300 in handle_fatal_signal (sig=6) at /home/jan/mysql/10.2-bug/sql/signal_handler.cc:303
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f41e3fb63fa in __GI_abort () at abort.c:89
      #6  0x00007f41e3fade37 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5605c948d088 "srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_s"..., file=file@entry=0x5605c948ce68 "/home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc", line=line@entry=298, function=function@entry=0x5605c948e100 <trx_purge_add_update_undo_to_history(trx_t*, unsigned char*, mtr_t*)::__PRETTY_FUNCTION__> "void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*)") at assert.c:92
      #7  0x00007f41e3fadee2 in __GI___assert_fail (assertion=0x5605c948d088 "srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_s"..., file=0x5605c948ce68 "/home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc", line=298, function=0x5605c948e100 <trx_purge_add_update_undo_to_history(trx_t*, unsigned char*, mtr_t*)::__PRETTY_FUNCTION__> "void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*)") at assert.c:101
      #8  0x00005605c8e95e07 in trx_purge_add_update_undo_to_history (trx=0x7f41de524888, undo_page=0x7f41ddfa0000 "$\026\025\313", mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc:298
      #9  0x00005605c8ecde24 in trx_undo_update_cleanup (trx=0x7f41de524888, undo_page=0x7f41ddfa0000 "$\026\025\313", mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0undo.cc:1755
      #10 0x00005605c8ebc556 in trx_write_serialisation_history (trx=0x7f41de524888, mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:1460
      #11 0x00005605c8ebddbc in trx_commit_low (trx=0x7f41de524888, mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:1941
      #12 0x00005605c8ebdf50 in trx_commit (trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:2011
      #13 0x00005605c8ebe86c in trx_commit_for_mysql (trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:2231
      #14 0x00005605c8fa31e6 in dict_stats_exec_sql (pinfo=0x7f4180022008, sql=0x5605c94f1898 "PROCEDURE TABLE_STATS_SAVE () IS\nBEGIN\nDELETE FROM \"mysql/innodb_table_stats\"\nWHERE\ndatabase_name = :database_name AND\ntable_name = :table_name;\nINSERT INTO \"mysql/innodb_table_stats\"\nVALUES\n(\n:databa"..., trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:328
      #15 0x00005605c8fa788c in dict_stats_save (table_orig=0x7f4184064eb8, only_for_index=0x0) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:2497
      #16 0x00005605c8fa95ff in dict_stats_update (table=0x7f4184064eb8, stats_upd_option=DICT_STATS_EMPTY_TABLE) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:3271
      #17 0x00005605c8e3c2d1 in row_truncate_complete (table=0x7f4184064eb8, trx=0x7f41de524cc0, fsp_flags=33, logger=@0x7f41dd8fd230: 0x0, err=DB_SUCCESS) at /home/jan/mysql/10.2-bug/storage/innobase/row/row0trunc.cc:1275
      #18 0x00005605c8e3de65 in row_truncate_table_for_mysql (table=0x7f4184064eb8, trx=0x7f41de524cc0) at /home/jan/mysql/10.2-bug/storage/innobase/row/row0trunc.cc:2114
      #19 0x00005605c8cc4175 in ha_innobase::truncate (this=0x7f4180032198) at /home/jan/mysql/10.2-bug/storage/innobase/handler/ha_innodb.cc:13574
      #20 0x00005605c8ab5c11 in handler::ha_truncate (this=0x7f4180032198) at /home/jan/mysql/10.2-bug/sql/handler.cc:4078
      #21 0x00005605c8c77678 in Sql_cmd_truncate_table::handler_truncate (this=0x7f4180011810, thd=0x7f4180000b00, table_ref=0x7f41800111f8, is_tmp_table=false) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:245
      #22 0x00005605c8c77cb3 in Sql_cmd_truncate_table::truncate_table (this=0x7f4180011810, thd=0x7f4180000b00, table_ref=0x7f41800111f8) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:441
      #23 0x00005605c8c77e30 in Sql_cmd_truncate_table::execute (this=0x7f4180011810, thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:498
      #24 0x00005605c88472f6 in mysql_execute_command (thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:6205
      #25 0x00005605c884bf07 in mysql_parse (thd=0x7f4180000b00, rawbuf=0x7f4180011128 "TRUNCATE TABLE t1", length=17, parser_state=0x7f41dd8fe080, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:7896
      #26 0x00005605c8839b99 in dispatch_command (command=COM_QUERY, thd=0x7f4180000b00, packet=0x7f4180008941 "TRUNCATE TABLE t1", packet_length=17, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:1805
      #27 0x00005605c8838530 in do_command (thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:1359
      #28 0x00005605c89845dd in do_handle_one_connection (connect=0x5605cb4e7370) at /home/jan/mysql/10.2-bug/sql/sql_connect.cc:1354
      #29 0x00005605c898435d in handle_one_connection (arg=0x5605cb4e7370) at /home/jan/mysql/10.2-bug/sql/sql_connect.cc:1260
      #30 0x00005605c91be48d in pfs_spawn_thread (arg=0x5605cb4f2160) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #31 0x00007f41e6565494 in start_thread (arg=0x7f41dd8ff700) at pthread_create.c:333
      #32 0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 20 (Thread 0x7f41c57fa700 (LWP 1729)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c921da2c in safe_cond_timedwait (cond=0x5605ca631de0 <COND_checkpoint>, mp=0x5605ca631d20 <LOCK_checkpoint>, abstime=0x7f41c57f9c80, file=0x5605c9544b10 "/home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h", line=1175) at /home/jan/mysql/10.2-bug/mysys/thr_mutex.c:545
      #2  0x00005605c909e007 in inline_mysql_cond_timedwait (that=0x5605ca631de0 <COND_checkpoint>, mutex=0x5605ca631d20 <LOCK_checkpoint>, abstime=0x7f41c57f9c80, src_file=0x5605c9544b50 "/home/jan/mysql/10.2-bug/storage/maria/ma_servicethread.c", src_line=116) at /home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h:1175
      #3  0x00005605c909e509 in my_service_thread_sleep (control=0x5605c9bf0bc0 <checkpoint_control>, sleep_time=30000000000) at /home/jan/mysql/10.2-bug/storage/maria/ma_servicethread.c:115
      #4  0x00005605c9093155 in ma_checkpoint_background (arg=0x1e) at /home/jan/mysql/10.2-bug/storage/maria/ma_checkpoint.c:709
      #5  0x00005605c91be48d in pfs_spawn_thread (arg=0x5605cb404bf0) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #6  0x00007f41e6565494 in start_thread (arg=0x7f41c57fa700) at pthread_create.c:333
      #7  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 19 (Thread 0x7f41c6ffd700 (LWP 1726)):
      #0  0x00007f41e656e7dd in nanosleep () at ../sysdeps/unix/syscall-template.S:84
      #1  0x00005605c8d7afdc in os_thread_sleep (tm=1000000) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0thread.cc:230
      #2  0x00005605c8f22a1b in btr_defragment_thread () at /home/jan/mysql/10.2-bug/storage/innobase/btr/btr0defragment.cc:760
      #3  0x00007f41e6565494 in start_thread (arg=0x7f41c6ffd700) at pthread_create.c:333
      #4  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 18 (Thread 0x7f41dd821700 (LWP 4119)):
      #0  0x00007f41e40633f3 in select () at ../sysdeps/unix/syscall-template.S:84
      #1  0x00005605c9213ff9 in my_sleep (m_seconds=20000) at /home/jan/mysql/10.2-bug/mysys/my_sleep.c:29
      #2  0x00005605c875cdc0 in close_connections () at /home/jan/mysql/10.2-bug/sql/mysqld.cc:1758
      #3  0x00005605c875d67b in kill_server (sig_ptr=0x0) at /home/jan/mysql/10.2-bug/sql/mysqld.cc:2006
      #4  0x00005605c875d6f9 in kill_server_thread (arg=0x7f41dd9dcc80) at /home/jan/mysql/10.2-bug/sql/mysqld.cc:2038
      #5  0x00005605c91be48d in pfs_spawn_thread (arg=0x7f419c001340) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #6  0x00007f41e6565494 in start_thread (arg=0x7f41dd821700) at pthread_create.c:333
      #7  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 17 (Thread 0x7f41cffff700 (LWP 1699)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c8d7a552 in os_event::timed_wait (this=0x5605caf4ff70, abstime=0x7f41cfffeb40) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:286
      #2  0x00005605c8d7a886 in os_event::wait_time_low (this=0x5605caf4ff70, time_in_usec=1000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:413
      #3  0x00005605c8d7aa40 in os_event_wait_time_low (event=0x5605caf4ff70, time_in_usec=1000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:518
      #4  0x00005605c8e688f9 in srv_error_monitor_thread () at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0srv.cc:1969
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41cffff700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 16 (Thread 0x7f41d5ffb700 (LWP 1691)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c8d7a552 in os_event::timed_wait (this=0x5605caf500f0, abstime=0x7f41d5ffaaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:286
      #2  0x00005605c8d7a886 in os_event::wait_time_low (this=0x5605caf500f0, time_in_usec=998000, reset_sig_count=2127) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:413
      #3  0x00005605c8d7aa40 in os_event_wait_time_low (event=0x5605caf500f0, time_in_usec=998000, reset_sig_count=2127) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:518
      #4  0x00005605c8f50520 in pc_sleep_if_needed (next_loop_time=1511941956542, sig_count=2127) at /home/jan/mysql/10.2-bug/storage/innobase/buf/buf0flu.cc:2717
      #5  0x00005605c8f5160d in buf_flush_page_cleaner_coordinator () at /home/jan/mysql/10.2-bug/storage/innobase/buf/buf0flu.cc:3212
      #6  0x00007f41e6565494 in start_thread (arg=0x7f41d5ffb700) at pthread_create.c:333
      #7  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 15 (Thread 0x7f41dd9dd700 (LWP 1731)):
      #0  do_sigwait (set=<optimized out>, set@entry=0x7f41dd9dccb0, sig=sig@entry=0x7f41dd9dcc80) at ../sysdeps/unix/sysv/linux/sigwait.c:64
      #1  0x00007f41e656eced in __sigwait (set=0x7f41dd9dccb0, sig=0x7f41dd9dcc80) at ../sysdeps/unix/sysv/linux/sigwait.c:96
      #2  0x00005605c87608d8 in signal_hand (arg=0x0) at /home/jan/mysql/10.2-bug/sql/mysqld.cc:3499
      #3  0x00005605c91be48d in pfs_spawn_thread (arg=0x5605cb4282a0) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #4  0x00007f41e6565494 in start_thread (arg=0x7f41dd9dd700) at pthread_create.c:333
      #5  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 14 (Thread 0x7f41d67fc700 (LWP 1689)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41d67fbaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41d67fbaa0, m1=0x7f41d67fbb48, m2=0x7f41d67fbb50, request=0x7f41d67fbb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=5, m1=0x7f41d67fbb48, m2=0x7f41d67fbb50, request=0x7f41d67fbb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=5, m1=0x7f41d67fbb48, m2=0x7f41d67fbb50, request=0x7f41d67fbb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=5) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21b08 <n+40>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41d67fc700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 13 (Thread 0x7f41c67fc700 (LWP 1727)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x00005605c8d7acbc in os_event::wait (this=0x5605caf50170) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:166
      #2  0x00005605c8d7a6e8 in os_event::wait_low (this=0x5605caf50170, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:336
      #3  0x00005605c8d7aa65 in os_event_wait_low (event=0x5605caf50170, reset_sig_count=0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:535
      #4  0x00005605c8f2ffbb in buf_resize_thread () at /home/jan/mysql/10.2-bug/storage/innobase/buf/buf0buf.cc:3080
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41c67fc700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 12 (Thread 0x7f41c77fe700 (LWP 1725)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x00005605c8d7acbc in os_event::wait (this=0x5605caf50070) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:166
      #2  0x00005605c8d7a6e8 in os_event::wait_low (this=0x5605caf50070, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:336
      #3  0x00005605c8d7aa65 in os_event_wait_low (event=0x5605caf50070, reset_sig_count=0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:535
      #4  0x00005605c8f47093 in buf_dump_thread () at /home/jan/mysql/10.2-bug/storage/innobase/buf/buf0dump.cc:777
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41c77fe700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 11 (Thread 0x7f41d6ffd700 (LWP 1687)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41d6ffcaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41d6ffcaa0, m1=0x7f41d6ffcb48, m2=0x7f41d6ffcb50, request=0x7f41d6ffcb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=4, m1=0x7f41d6ffcb48, m2=0x7f41d6ffcb50, request=0x7f41d6ffcb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=4, m1=0x7f41d6ffcb48, m2=0x7f41d6ffcb50, request=0x7f41d6ffcb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=4) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21b00 <n+32>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41d6ffd700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 10 (Thread 0x7f41d57fa700 (LWP 1716)):
      #0  0x00007f41e656e7dd in nanosleep () at ../sysdeps/unix/syscall-template.S:84
      #1  0x00005605c8d7afdc in os_thread_sleep (tm=1000000) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0thread.cc:230
      #2  0x00005605c8e6999a in srv_master_sleep () at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0srv.cc:2458
      #3  0x00005605c8e69ad8 in srv_master_thread (arg=0x0) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0srv.cc:2503
      #4  0x00007f41e6565494 in start_thread (arg=0x7f41d57fa700) at pthread_create.c:333
      #5  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 9 (Thread 0x7f41d77fe700 (LWP 1685)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41d77fdaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41d77fdaa0, m1=0x7f41d77fdb48, m2=0x7f41d77fdb50, request=0x7f41d77fdb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=3, m1=0x7f41d77fdb48, m2=0x7f41d77fdb50, request=0x7f41d77fdb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=3, m1=0x7f41d77fdb48, m2=0x7f41d77fdb50, request=0x7f41d77fdb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=3) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21af8 <n+24>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41d77fe700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 8 (Thread 0x7f41cf7fe700 (LWP 1700)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c8d7a552 in os_event::timed_wait (this=0x5605caf4fff0, abstime=0x7f41cf7fdcd0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:286
      #2  0x00005605c8d7a886 in os_event::wait_time_low (this=0x5605caf4fff0, time_in_usec=5000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:413
      #3  0x00005605c8d7aa40 in os_event_wait_time_low (event=0x5605caf4fff0, time_in_usec=5000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:518
      #4  0x00005605c8e68220 in srv_monitor_thread () at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0srv.cc:1744
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41cf7fe700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 7 (Thread 0x7f41dcfbf700 (LWP 1683)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41dcfbeaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41dcfbeaa0, m1=0x7f41dcfbeb48, m2=0x7f41dcfbeb50, request=0x7f41dcfbeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=1, m1=0x7f41dcfbeb48, m2=0x7f41dcfbeb50, request=0x7f41dcfbeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=1, m1=0x7f41dcfbeb48, m2=0x7f41dcfbeb50, request=0x7f41dcfbeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=1) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21ae8 <n+8>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41dcfbf700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 6 (Thread 0x7f41d7fff700 (LWP 1684)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41d7ffeaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41d7ffeaa0, m1=0x7f41d7ffeb48, m2=0x7f41d7ffeb50, request=0x7f41d7ffeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=2, m1=0x7f41d7ffeb48, m2=0x7f41d7ffeb50, request=0x7f41d7ffeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=2, m1=0x7f41d7ffeb48, m2=0x7f41d7ffeb50, request=0x7f41d7ffeb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=2) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21af0 <n+16>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41d7fff700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 5 (Thread 0x7f41d4ff9700 (LWP 1698)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c8d7a552 in os_event::timed_wait (this=0x5605cb08d670, abstime=0x7f41d4ff8d00) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:286
      #2  0x00005605c8d7a886 in os_event::wait_time_low (this=0x5605cb08d670, time_in_usec=1000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:413
      #3  0x00005605c8d7aa40 in os_event_wait_time_low (event=0x5605cb08d670, time_in_usec=1000000, reset_sig_count=1) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0event.cc:518
      #4  0x00005605c8d492ef in lock_wait_timeout_thread () at /home/jan/mysql/10.2-bug/storage/innobase/lock/lock0wait.cc:542
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41d4ff9700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 4 (Thread 0x7f41e68e0d00 (LWP 1649)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x00005605c921d722 in safe_cond_wait (cond=0x5605c9db28c0 <COND_thread_count>, mp=0x5605c9db15c0 <LOCK_thread_count>, file=0x5605c92addc8 "/home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h", line=1138) at /home/jan/mysql/10.2-bug/mysys/thr_mutex.c:491
      #2  0x00005605c875a73a in inline_mysql_cond_wait (that=0x5605c9db28c0 <COND_thread_count>, mutex=0x5605c9db15c0 <LOCK_thread_count>, src_file=0x5605c92afc20 "/home/jan/mysql/10.2-bug/sql/mysqld.cc", src_line=6086) at /home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h:1138
      #3  0x00005605c8765a60 in mysqld_main (argc=144, argv=0x5605cad9a160) at /home/jan/mysql/10.2-bug/sql/mysqld.cc:6086
      #4  0x00005605c875a060 in main (argc=22, argv=0x7ffcdcd458f8) at /home/jan/mysql/10.2-bug/sql/main.cc:25
       
      Thread 3 (Thread 0x7f41dd7c0700 (LWP 1682)):
      #0  0x00007f41e58e16ca in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
      #1  0x00005605c8d6e3b3 in LinuxAIOHandler::collect (this=0x7f41dd7bfaa0) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:1893
      #2  0x00005605c8d6e8e9 in LinuxAIOHandler::poll (this=0x7f41dd7bfaa0, m1=0x7f41dd7bfb48, m2=0x7f41dd7bfb50, request=0x7f41dd7bfb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2038
      #3  0x00005605c8d6ea63 in os_aio_linux_handler (global_segment=0, m1=0x7f41dd7bfb48, m2=0x7f41dd7bfb50, request=0x7f41dd7bfb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:2092
      #4  0x00005605c8d73761 in os_aio_handler (segment=0, m1=0x7f41dd7bfb48, m2=0x7f41dd7bfb50, request=0x7f41dd7bfb80) at /home/jan/mysql/10.2-bug/storage/innobase/os/os0file.cc:5720
      #5  0x00005605c8fc65cb in fil_aio_wait (segment=0) at /home/jan/mysql/10.2-bug/storage/innobase/fil/fil0fil.cc:5317
      #6  0x00005605c8e6cf1b in io_handler_thread (arg=0x5605c9e21ae0 <n>) at /home/jan/mysql/10.2-bug/storage/innobase/srv/srv0start.cc:343
      #7  0x00007f41e6565494 in start_thread (arg=0x7f41dd7c0700) at pthread_create.c:333
      #8  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 2 (Thread 0x7f41df226700 (LWP 1674)):
      #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
      #1  0x00005605c921da2c in safe_cond_timedwait (cond=0x5605ca6434e0 <COND_timer>, mp=0x5605ca643420 <LOCK_timer>, abstime=0x7f41df225d30, file=0x5605c9581aa0 "/home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h", line=1175) at /home/jan/mysql/10.2-bug/mysys/thr_mutex.c:545
      #2  0x00005605c921e9a1 in inline_mysql_cond_timedwait (that=0x5605ca6434e0 <COND_timer>, mutex=0x5605ca643420 <LOCK_timer>, abstime=0x7f41df225d30, src_file=0x5605c9581ae0 "/home/jan/mysql/10.2-bug/mysys/thr_timer.c", src_line=292) at /home/jan/mysql/10.2-bug/include/mysql/psi/mysql_thread.h:1175
      #3  0x00005605c921f4ae in timer_handler (arg=0x0) at /home/jan/mysql/10.2-bug/mysys/thr_timer.c:292
      #4  0x00005605c91be48d in pfs_spawn_thread (arg=0x5605caedf620) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #5  0x00007f41e6565494 in start_thread (arg=0x7f41df226700) at pthread_create.c:333
      #6  0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Thread 1 (Thread 0x7f41dd8ff700 (LWP 1818)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x00005605c92181a4 in my_write_core (sig=6) at /home/jan/mysql/10.2-bug/mysys/stacktrace.c:477
      #2  0x00005605c8aab300 in handle_fatal_signal (sig=6) at /home/jan/mysql/10.2-bug/sql/signal_handler.cc:303
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f41e3fb63fa in __GI_abort () at abort.c:89
      #6  0x00007f41e3fade37 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5605c948d088 "srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_s"..., file=file@entry=0x5605c948ce68 "/home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc", line=line@entry=298, function=function@entry=0x5605c948e100 <trx_purge_add_update_undo_to_history(trx_t*, unsigned char*, mtr_t*)::__PRETTY_FUNCTION__> "void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*)") at assert.c:92
      #7  0x00007f41e3fadee2 in __GI___assert_fail (assertion=0x5605c948d088 "srv_undo_sources || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_s"..., file=0x5605c948ce68 "/home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc", line=298, function=0x5605c948e100 <trx_purge_add_update_undo_to_history(trx_t*, unsigned char*, mtr_t*)::__PRETTY_FUNCTION__> "void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*)") at assert.c:101
      #8  0x00005605c8e95e07 in trx_purge_add_update_undo_to_history (trx=0x7f41de524888, undo_page=0x7f41ddfa0000 "$\026\025\313", mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0purge.cc:298
      #9  0x00005605c8ecde24 in trx_undo_update_cleanup (trx=0x7f41de524888, undo_page=0x7f41ddfa0000 "$\026\025\313", mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0undo.cc:1755
      #10 0x00005605c8ebc556 in trx_write_serialisation_history (trx=0x7f41de524888, mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:1460
      #11 0x00005605c8ebddbc in trx_commit_low (trx=0x7f41de524888, mtr=0x7f41dd8fc390) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:1941
      #12 0x00005605c8ebdf50 in trx_commit (trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:2011
      #13 0x00005605c8ebe86c in trx_commit_for_mysql (trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/trx/trx0trx.cc:2231
      #14 0x00005605c8fa31e6 in dict_stats_exec_sql (pinfo=0x7f4180022008, sql=0x5605c94f1898 "PROCEDURE TABLE_STATS_SAVE () IS\nBEGIN\nDELETE FROM \"mysql/innodb_table_stats\"\nWHERE\ndatabase_name = :database_name AND\ntable_name = :table_name;\nINSERT INTO \"mysql/innodb_table_stats\"\nVALUES\n(\n:databa"..., trx=0x7f41de524888) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:328
      #15 0x00005605c8fa788c in dict_stats_save (table_orig=0x7f4184064eb8, only_for_index=0x0) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:2497
      #16 0x00005605c8fa95ff in dict_stats_update (table=0x7f4184064eb8, stats_upd_option=DICT_STATS_EMPTY_TABLE) at /home/jan/mysql/10.2-bug/storage/innobase/dict/dict0stats.cc:3271
      #17 0x00005605c8e3c2d1 in row_truncate_complete (table=0x7f4184064eb8, trx=0x7f41de524cc0, fsp_flags=33, logger=@0x7f41dd8fd230: 0x0, err=DB_SUCCESS) at /home/jan/mysql/10.2-bug/storage/innobase/row/row0trunc.cc:1275
      #18 0x00005605c8e3de65 in row_truncate_table_for_mysql (table=0x7f4184064eb8, trx=0x7f41de524cc0) at /home/jan/mysql/10.2-bug/storage/innobase/row/row0trunc.cc:2114
      #19 0x00005605c8cc4175 in ha_innobase::truncate (this=0x7f4180032198) at /home/jan/mysql/10.2-bug/storage/innobase/handler/ha_innodb.cc:13574
      #20 0x00005605c8ab5c11 in handler::ha_truncate (this=0x7f4180032198) at /home/jan/mysql/10.2-bug/sql/handler.cc:4078
      #21 0x00005605c8c77678 in Sql_cmd_truncate_table::handler_truncate (this=0x7f4180011810, thd=0x7f4180000b00, table_ref=0x7f41800111f8, is_tmp_table=false) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:245
      #22 0x00005605c8c77cb3 in Sql_cmd_truncate_table::truncate_table (this=0x7f4180011810, thd=0x7f4180000b00, table_ref=0x7f41800111f8) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:441
      #23 0x00005605c8c77e30 in Sql_cmd_truncate_table::execute (this=0x7f4180011810, thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_truncate.cc:498
      #24 0x00005605c88472f6 in mysql_execute_command (thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:6205
      #25 0x00005605c884bf07 in mysql_parse (thd=0x7f4180000b00, rawbuf=0x7f4180011128 "TRUNCATE TABLE t1", length=17, parser_state=0x7f41dd8fe080, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:7896
      #26 0x00005605c8839b99 in dispatch_command (command=COM_QUERY, thd=0x7f4180000b00, packet=0x7f4180008941 "TRUNCATE TABLE t1", packet_length=17, is_com_multi=false, is_next_command=false) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:1805
      #27 0x00005605c8838530 in do_command (thd=0x7f4180000b00) at /home/jan/mysql/10.2-bug/sql/sql_parse.cc:1359
      #28 0x00005605c89845dd in do_handle_one_connection (connect=0x5605cb4e7370) at /home/jan/mysql/10.2-bug/sql/sql_connect.cc:1354
      #29 0x00005605c898435d in handle_one_connection (arg=0x5605cb4e7370) at /home/jan/mysql/10.2-bug/sql/sql_connect.cc:1260
      #30 0x00005605c91be48d in pfs_spawn_thread (arg=0x5605cb4f2160) at /home/jan/mysql/10.2-bug/storage/perfschema/pfs.cc:1863
      #31 0x00007f41e6565494 in start_thread (arg=0x7f41dd8ff700) at pthread_create.c:333
      #32 0x00007f41e406aaff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
       
      Compressed file /dev/shm/log/innodb.truncate_restart-innodb/mysqld.1/data/core
      

      Data from debugger:

      (gdb) p srv_undo_sources
      $1 = false
      (gdb) p srv_startup_is_before_trx_rollback_phase
      $2 = false
      (gdb) p trx_rollback_or_clean_is_active
      $3 = false
      (gdb) p purge_sys->state
      $4 = PURGE_STATE_EXIT
      (gdb) p srv_force_recovery
      $5 = 0
      (gdb) p trx->undo_no
      $6 = 2
      (gdb) p trx->in_mysql_trx_list
      $7 = false
      (gdb) p srv_fast_shutdown
      $8 = 1
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              jplindst Jan Lindström
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: