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

[PS8QA] handle_fatal_signal (sig=11) in THD::mark_innodb_used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 8.0, Not 5.7
    • Fix Version/s: 8.0.13-3
    • Component/s: None

      Description

      8.0.12 optimized & debug build testcase. Run like this;

      mysql> source PS-4788_PS8012.sql;
      mysql> source PS-4788_PS8012.sql;
      mysql> source PS-4788_PS8012.sql;
      ...

      Approximately 3 times should be enough, but keep running till it crashes.

      Optimized result;

      2018-11-16T02:04:21.002027Z 0 [System] [MY-010931] [Server] /sda/PS151118-percona-server-8.0.12-1-linux-x86_64-opt/bin/mysqld: ready for connections. Version: '8.0.12-1'  socket: '/sda/PS151118-percona-server-8.0.12-1-linux-x86_64-opt/socket.sock'  port: 14433  MySQL Community Server (GPL).
      02:04:26 UTC - mysqld got signal 11 ;
      
      Core was generated by `/sda/PS151118-percona-server-8.0.12-1-linux-x86_64-opt/bin/mysqld --no-defaults'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f49897ff700 (LWP 31554))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000560e28d8b8b7 in my_write_core (sig=sig@entry=11) at stacktrace.cc:278
      #2  0x0000560e27f61fb5 in handle_fatal_signal (sig=11) at signal_handler.cc:254
      #3  <signal handler called>
      #4  0x0000560e27de7145 in THD::mark_innodb_used (this=0x0, this=0x0, trx_id=2065) at ../sql/sql_class.h:1489
      #5  thd_report_innodb_stat (thd=0x0, trx_id=2065, type=type@entry=MYSQL_TRX_STAT_LOCK_WAIT_USECS, value=1173242) at sql_class.cc:1108
      #6  0x0000560e2900961b in trx_stats::stop_lock_wait (this=0x7f49af0011e0, this=0x7f49af0011e0, trx=..., trx=...)
          at include/trx0trx.h:1363
      #7  que_thr_end_lock_wait (trx=0x7f49af000d88) at que/que0que.cc:213
      #8  0x0000560e28f8481b in lock_cancel_waiting_and_release (lock=0x7f49af81c018, use_fcfs=use_fcfs@entry=false)
          at lock/lock0lock.cc:6447
      #9  0x0000560e28f871ae in lock_wait_check_and_cancel (slot=<optimized out>) at lock/lock0wait.cc:506
      #10 lock_wait_timeout_thread () at lock/lock0wait.cc:549
      #11 0x0000560e2909dea3 in std::__invoke_impl<void, void (*&)()> (__f=<optimized out>) at /usr/include/c++/7/bits/invoke.h:60
      #12 std::__invoke<void (*&)()> (__fn=<synthetic pointer>: <optimized out>) at /usr/include/c++/7/bits/invoke.h:95
      #13 std::_Bind<void (*())()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) (__args=..., this=<synthetic pointer>)
          at /usr/include/c++/7/functional:467
      #14 std::_Bind<void (*())()>::operator()<, void>() (this=<synthetic pointer>) at /usr/include/c++/7/functional:551
      #15 Runnable::operator()<void (*)()> (f=@0x7f49aec1df48: 0x560e28f86e30 <lock_wait_timeout_thread()>, this=0x7f49aec1df50)
          at include/os0thread-create.h:92
      #16 std::__invoke_impl<void, Runnable, void (*)()> (__f=...) at /usr/include/c++/7/bits/invoke.h:60
      #17 std::__invoke<Runnable, void (*)()> (__fn=...) at /usr/include/c++/7/bits/invoke.h:95
      #18 std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::_M_invoke<0ul, 1ul> (this=0x7f49aec1df48)
          at /usr/include/c++/7/thread:234
      #19 std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::operator() (this=0x7f49aec1df48) at /usr/include/c++/7/thread:243
      #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<Runnable, void (*)()> > >::_M_run (this=0x7f49aec1df40)
          at /usr/include/c++/7/thread:186
      #21 0x00007f49c6bb357f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #22 0x00007f49c7f9e6db in start_thread (arg=0x7f49897ff700) at pthread_create.c:463
      #23 0x00007f49c627088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 

      Debug result;

      02:07:02 UTC - mysqld got signal 11 ; 
      Core was generated by `/sda/PS131118-percona-server-8.0.12-1-linux-x86_64-debug/bin/mysqld --no-defaul'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7fd8b97ff700 (LWP 30529))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000056215f4a2c17 in my_write_core (sig=11) at /git/PS-8.0-trunk_dbg/mysys/stacktrace.cc:278
      #2  0x000056215e41348e in handle_fatal_signal (sig=11) at /git/PS-8.0-trunk_dbg/sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  0x000056215e1b2596 in THD::mark_innodb_used (this=0x0, trx_id=2065) at /git/PS-8.0-trunk_dbg/sql/sql_class.h:1487
      #5  0x000056215e1ab124 in thd_report_innodb_stat (thd=0x0, trx_id=2065, type=MYSQL_TRX_STAT_LOCK_WAIT_USECS, value=1024242)
          at /git/PS-8.0-trunk_dbg/sql/sql_class.cc:1108
      #6  0x000056215f816c99 in trx_stats::stop_lock_wait (this=0x7fd8e5c01500, trx=...)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/trx0trx.h:1363
      #7  0x000056215f814db2 in que_thr_end_lock_wait (trx=0x7fd8e5c00fe0) at /git/PS-8.0-trunk_dbg/storage/innobase/que/que0que.cc:213
      #8  0x000056215f76dcf6 in lock_cancel_waiting_and_release (lock=0x7fd8e641f018, use_fcfs=false)
          at /git/PS-8.0-trunk_dbg/storage/innobase/lock/lock0lock.cc:6447
      #9  0x000056215f77d9af in lock_wait_check_and_cancel (slot=0x7fd8e5b4e2a0)
          at /git/PS-8.0-trunk_dbg/storage/innobase/lock/lock0wait.cc:506
      #10 0x000056215f77dae4 in lock_wait_timeout_thread () at /git/PS-8.0-trunk_dbg/storage/innobase/lock/lock0wait.cc:549
      #11 0x000056215f8f36b6 in std::__invoke_impl<void, void (*&)()> (__f=@0x7fd8b97fec60: 0x56215f77d9df <lock_wait_timeout_thread()>)
          at /usr/include/c++/7/bits/invoke.h:60
      #12 0x000056215f8f3585 in std::__invoke<void (*&)()> (__fn=@0x7fd8b97fec60: 0x56215f77d9df <lock_wait_timeout_thread()>)
          at /usr/include/c++/7/bits/invoke.h:95
      #13 0x000056215f8f3448 in std::_Bind<void (*())()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) (this=0x7fd8b97fec60, __args=...)
          at /usr/include/c++/7/functional:467
      #14 0x000056215f8f32a5 in std::_Bind<void (*())()>::operator()<, void>() (this=0x7fd8b97fec60) at /usr/include/c++/7/functional:551
      #15 0x000056215f8f2e97 in Runnable::operator()<void (*)()> (this=0x7fd8e5beefd0, 
          f=@0x7fd8e5beefc8: 0x56215f77d9df <lock_wait_timeout_thread()>)
          at /git/PS-8.0-trunk_dbg/storage/innobase/include/os0thread-create.h:92
      #16 0x000056215f8f1cab in std::__invoke_impl<void, Runnable, void (*)()> (__f=..., 
          __args#0=@0x7fd8e5beefc8: 0x56215f77d9df <lock_wait_timeout_thread()>) at /usr/include/c++/7/bits/invoke.h:60
      #17 0x000056215f8efca5 in std::__invoke<Runnable, void (*)()> (__fn=..., 
          __args#0=@0x7fd8e5beefc8: 0x56215f77d9df <lock_wait_timeout_thread()>) at /usr/include/c++/7/bits/invoke.h:95
      #18 0x000056215f8f3969 in std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::_M_invoke<0ul, 1ul> (this=0x7fd8e5beefc8)
          at /usr/include/c++/7/thread:234
      #19 0x000056215f8f38a0 in std::thread::_Invoker<std::tuple<Runnable, void (*)()> >::operator() (this=0x7fd8e5beefc8)
          at /usr/include/c++/7/thread:243
      #20 0x000056215f8f3828 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<Runnable, void (*)()> > >::_M_run (
          this=0x7fd8e5beefc0) at /usr/include/c++/7/thread:186
      #21 0x00007fd8fd96c57f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #22 0x00007fd8feb4c6db in start_thread (arg=0x7fd8b97ff700) at pthread_create.c:463
      #23 0x00007fd8fd02988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 

      This bug is pursuant to PS-4788. It reproduces on PS 8.0.12 trunk 2018-11-13 and not on PS 5.7.23.

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 5 hours, 14 minutes
                    1d 5h 14m