Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5134

handle_fatal_signal (sig=11) in thd_get_thread_id

    XMLWordPrintable

    Details

      Description

      CREATE DATABASE test;
      USE test;
      CREATE TABLE t2(c1 YEAR,c2 YEAR,UNIQUE INDEX idx(c1,c2));
      XA START'';
      INSERT INTO t2 VALUES(4,5);
      DELETE FROM mysql.innodb_table_stats WHERE table_name='t2';
      SET @@global.innodb_print_lock_wait_timeout_info=1;
      INSERT INTO t2 VALUES(6,97);
      SELECT SLEEP(5);
      

      Leads to (on PS8 8.0.13 release build)

      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055e7805bd637 in my_write_core (sig=sig@entry=11) at stacktrace.cc:278
      #2  0x000055e77f8e6335 in handle_fatal_signal (sig=11) at signal_handler.cc:254
      #3  <signal handler called>
      #4  thd_get_thread_id (thd=0x0) at sql_thd_api.cc:528
      #5  0x000055e78079723f in print_lock_wait_timeout (blocking_count=1, blocking=0x7f13327f8ba0, trx=...) at lock/lock0wait.cc:199
      #6  lock_wait_suspend_thread (thr=thr@entry=0x7f132f49f760) at lock/lock0wait.cc:429
      #7  0x000055e7808127ec in que_run_threads (thr=<optimized out>) at que/que0que.cc:1028
      #8  0x000055e780813030 in que_eval_sql (info=info@entry=0x7f132f485388, sql=<optimized out>, 
          reserve_dict_mutex=reserve_dict_mutex@entry=0, trx=trx@entry=0x7f135f400d88) at que/que0que.cc:1086
      #9  0x000055e7809e8565 in dict_stats_exec_sql (pinfo=pinfo@entry=0x7f132f485388, 
          sql=sql@entry=0x55e781400160 "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=0x7f135f400d88, trx@entry=0x0) at dict/dict0stats.cc:197
      #10 0x000055e7809f0f8c in dict_stats_save (table_orig=table_orig@entry=0x7f12f49b2888, only_for_index=only_for_index@entry=0x0)
          at dict/dict0stats.cc:2128
      #11 0x000055e7809f3110 in dict_stats_update (table=table@entry=0x7f12f49b2888, 
          stats_upd_option=stats_upd_option@entry=DICT_STATS_RECALC_PERSISTENT) at dict/dict0stats.cc:2772
      #12 0x000055e7809f4812 in dict_stats_process_entry_from_recalc_pool (thd=<optimized out>) at dict/dict0stats_bg.cc:325
      #13 dict_stats_thread () at dict/dict0stats_bg.cc:396
      #14 0x000055e780706f13 in std::__invoke_impl<void, void (*&)()> (__f=<optimized out>) at /usr/include/c++/7/bits/invoke.h:60
      #15 std::__invoke<void (*&)()> (__fn=<synthetic pointer>: <optimized out>) at /usr/include/c++/7/bits/invoke.h:95
      #16 std::_Bind<void (*())()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) (__args=..., this=<synthetic pointer>)
          at /usr/include/c++/7/functional:467
      #17 std::_Bind<void (*())()>::operator()<, void>() (this=<synthetic pointer>) at /usr/include/c++/7/functional:551
      #18 Runnable::operator()<void (*)()> (f=@0x7f135f3eab68: 0x55e7809f3e90 <dict_stats_thread()>, this=0x7f135f3eab70)
          at include/os0thread-create.h:92
      #19 std::__invoke_impl<void, Runnable, void (*)()> (__f=...) at /usr/include/c++/7/bits/invoke.h:60
      #20 std::__invoke<Runnable, void (*)()> (__fn=...) at /usr/include/c++/7/bits/invoke.h:95
      #21 std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::_M_invoke<0ul, 1ul> (this=0x7f135f3eab68)
          at /usr/include/c++/7/thread:234
      #22 std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::operator() (this=0x7f135f3eab68) at /usr/include/c++/7/thread:243
      #23 std::thread::_State_impl<std::thread::_Invoker<std::tuple<Runnable, void (*)()> > >::_M_run (this=0x7f135f3eab60)
          at /usr/include/c++/7/thread:186
      #24 0x00007f137741757f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #25 0x00007f13788026db in start_thread (arg=0x7f13327fc700) at pthread_create.c:463
      #26 0x00007f1376ad488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Leads to (on PS8 8.0.13 debug build)

      #0  __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000564ce65b2377 in my_write_core (sig=11) at /git/PS-8.0-trunk_dbg/mysys/stacktrace.cc:278
      #2  0x0000564ce54687e0 in handle_fatal_signal (sig=11) at /git/PS-8.0-trunk_dbg/sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  0x0000564ce4f11d1c in THD::thread_id (this=0x0) at /git/PS-8.0-trunk_dbg/sql/sql_class.h:2356
      #5  0x0000564ce538092e in thd_get_thread_id (thd=0x0) at /git/PS-8.0-trunk_dbg/sql/sql_thd_api.cc:528
      #6  0x0000564ce689bf4a in print_lock_wait_timeout (trx=..., blocking=0x7f678affcda0, blocking_count=1)
          at /git/PS-8.0-trunk_dbg/storage/innobase/lock/lock0wait.cc:199
      #7  0x0000564ce689cc88 in lock_wait_suspend_thread (thr=0x7f67878b8bd8)
          at /git/PS-8.0-trunk_dbg/storage/innobase/lock/lock0wait.cc:429
      #8  0x0000564ce693a3d2 in que_run_threads (thr=0x7f67878b8bd8) at /git/PS-8.0-trunk_dbg/storage/innobase/que/que0que.cc:1028
      #9  0x0000564ce693a636 in que_eval_sql (info=0x7f67878983b8, 
          sql=0x564ce7e089e0 "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"..., reserve_dict_mutex=0, 
          trx=0x7f67bdc00fe0) at /git/PS-8.0-trunk_dbg/storage/innobase/que/que0que.cc:1086
      #10 0x0000564ce6bcddb9 in dict_stats_exec_sql (pinfo=0x7f67878983b8, 
          sql=0x564ce7e089e0 "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=0x7f67bdc00fe0)
          at /git/PS-8.0-trunk_dbg/storage/innobase/dict/dict0stats.cc:197
      #11 0x0000564ce6bd224c in dict_stats_save (table_orig=0x7f67a0a064b8, only_for_index=0x0)
          at /git/PS-8.0-trunk_dbg/storage/innobase/dict/dict0stats.cc:2128
      #12 0x0000564ce6bd3c71 in dict_stats_update (table=0x7f67a0a064b8, stats_upd_option=DICT_STATS_RECALC_PERSISTENT)
          at /git/PS-8.0-trunk_dbg/storage/innobase/dict/dict0stats.cc:2772
      #13 0x0000564ce6bd9089 in dict_stats_process_entry_from_recalc_pool (thd=0x7f6787811000)
          at /git/PS-8.0-trunk_dbg/storage/innobase/dict/dict0stats_bg.cc:325
      #14 0x0000564ce6bd9294 in dict_stats_thread () at /git/PS-8.0-trunk_dbg/storage/innobase/dict/dict0stats_bg.cc:396
      #15 0x0000564ce67ed29e in std::__invoke_impl<void, void (*&)()> (__f=@0x7f678affdc60: 0x564ce6bd91b7 <dict_stats_thread()>)
          at /usr/include/c++/7/bits/invoke.h:60
      #16 0x0000564ce67ebed2 in std::__invoke<void (*&)()> (__fn=@0x7f678affdc60: 0x564ce6bd91b7 <dict_stats_thread()>)
          at /usr/include/c++/7/bits/invoke.h:95
      #17 0x0000564ce67e9f70 in std::_Bind<void (*())()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) (this=0x7f678affdc60, 
          __args=...) at /usr/include/c++/7/functional:467
      #18 0x0000564ce67e7f4d in std::_Bind<void (*())()>::operator()<, void>() (this=0x7f678affdc60) at /usr/include/c++/7/functional:551
      #19 0x0000564ce67e5a1d in Runnable::operator()<void (*)()> (this=0x7f67a36c8fd0, 
          f=@0x7f67a36c8fc8: 0x564ce6bd91b7 <dict_stats_thread()>) at /git/PS-8.0-trunk_dbg/storage/innobase/include/os0thread-create.h:92
      #20 0x0000564ce67e10fe in std::__invoke_impl<void, Runnable, void (*)()> (__f=..., 
          __args#0=@0x7f67a36c8fc8: 0x564ce6bd91b7 <dict_stats_thread()>) at /usr/include/c++/7/bits/invoke.h:60
      #21 0x0000564ce67db12c in std::__invoke<Runnable, void (*)()> (__fn=..., 
          __args#0=@0x7f67a36c8fc8: 0x564ce6bd91b7 <dict_stats_thread()>) at /usr/include/c++/7/bits/invoke.h:95
      #22 0x0000564ce67ee8b1 in std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::_M_invoke<0ul, 1ul> (this=0x7f67a36c8fc8)
          at /usr/include/c++/7/thread:234
      #23 0x0000564ce67ee684 in std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::operator() (this=0x7f67a36c8fc8)
          at /usr/include/c++/7/thread:243
      #24 0x0000564ce67ee078 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<Runnable, void (*)()> > >::_M_run (
          this=0x7f67a36c8fc0) at /usr/include/c++/7/thread:186
      #25 0x00007f67d5dd357f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #26 0x00007f67d71be6db in start_thread (arg=0x7f678affe700) at pthread_create.c:463
      #27 0x00007f67d549088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Needs eval as;

      1) It does not crash MS upstream

      2) it crashes both release and debug with sig11 

      However, it also does crash 5.7.23 so it's not a 8.0 blocker at all

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                george.lorch George Lorch
                Reporter:
                roel.vandepaar Roel Van de Paar
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 hours, 10 minutes
                  2h 10m