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

Executing SHOW PROCESSLIST or accessing INFORMATION_SCHEMA.PROCESSLIST on a server with a terminology_use_previous='BEFORE_8_0_26' configuration caused a crash

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 8.0.26-16 (Q3 2021)
    • 8.0.27-18 (Q4 2021)
    • None
    • Yes

    Description

      Crash:

       PS 8.0.26

       

      2022-01-20T13:40:58.218764Z 0 [System] [MY-010931] [Server] /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld: ready for connections. Version: '8.0.26-16' socket: '/tmp/mysql_sandbox24234.sock' port: 24234 Percona Server (GPL), Release 16, Revision 3d64165.
      terminate called after throwing an instance of 'std::logic_error'
       what(): basic_string::_S_construct null not valid
      13:43:33 UTC - mysqld got signal 6 ;
      Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
      Build ID: Not Available 
      Server Version: 8.0.26-16 Percona Server (GPL), Release 16, Revision 3d64165
      Thread pointer: 0x7f75c7018000
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 7f75eea6db20 thread_stack 0x46000
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x22b3c8e]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(handle_fatal_signal+0x3c3) [0x130f253]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7f7602cfc3c0]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f7601e2318b]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7f7601e02859]
      /lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e911) [0x7f76021d9911]
      /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa38c) [0x7f76021e538c]
      /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa3f7) [0x7f76021e53f7]
      /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa6a9) [0x7f76021e56a9]
      /lib/x86_64-linux-gnu/libstdc++.so.6(std::__throw_logic_error(char const*)+0x41) [0x7f76021dc21e]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld() [0x106df70]
      /lib/x86_64-linux-gnu/libstdc++.so.6(std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)+0x35) [0x7f760222b4d5]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(THD::proc_info(System_variables const&) const+0x43) [0x113a2f3]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld() [0x12209e0]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(Fill_process_list::operator()(THD*)+0x32e) [0x122447e]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(Global_THD_manager::do_for_all_thd_copy(Do_THD_Impl*)+0x318) [0x1082c38]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld() [0x121fb73]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(do_fill_information_schema_table(THD*, TABLE_LIST*, Item*)+0x83) [0x12266b3]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(MaterializeInformationSchemaTableIterator::Init()+0x91) [0x13ca521]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x345) [0x128c175]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(Query_expression::execute(THD*)+0x2c) [0x128c3dc]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x2c5) [0x1219895]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(mysql_execute_command(THD*, bool)+0x2238) [0x11b71e8]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(dispatch_sql_command(THD*, Parser_state*, bool)+0x4d0) [0x11bad70]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1ffa) [0x11bd21a]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld(do_command(THD*)+0x1f0) [0x11bdfe0]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld() [0x1300458]
      /home/lalit/mysql_tar/percona/8.0.26/bin/mysqld() [0x27aaaec]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7f7602cf0609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f7601eff293]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (7f75c706a028): select * from INFORMATION_SCHEMA.PROCESSLIST
      Connection ID (thread ID): 369
      Status: NOT_KILLED
      Please help us make Percona Server better by reporting any
      bugs at https://bugs.percona.com/
      

       

       

      MySQL 8.0.27

       

      2022-01-20T12:44:08.818581Z 0 [System] [MY-010931] [Server] /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld: ready for connections. Version: '8.0.27' socket: '/tmp/mysql_sandbox8027.sock' port: 8027 MySQL Community Server - GPL.
       terminate called after throwing an instance of 'std::logic_error'
       what(): basic_string::_S_construct null not valid
       13:12:05 UTC - mysqld got signal 6 ;
       Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
       Thread pointer: 0x7fd03409a620
       Attempting backtrace. You can use the following information to find out
       where mysqld died. If you see no messages after this, something went
       terribly wrong...
       stack_bottom = 7fd10243ada0 thread_stack 0x100000
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x1f7f4ae]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(handle_fatal_signal+0x323) [0x1029073]
       /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fd1306c43c0]
       /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7fd12f7bc18b]
       /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7fd12f79b859]
       /lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e911) [0x7fd12fb72911]
       /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa38c) [0x7fd12fb7e38c]
       /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa3f7) [0x7fd12fb7e3f7]
       /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa6a9) [0x7fd12fb7e6a9]
       /lib/x86_64-linux-gnu/libstdc++.so.6(std::__throw_logic_error(char const*)+0x41) [0x7fd12fb7521e]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)+0) [0xde1fc0]
       home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(THD::proc_info(System_variables const&) const+0x54) [0xe631d4]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld() [0xf48d90]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(Fill_process_list::operator()(THD*)+0x309) [0xf4d299]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(Global_THD_manager::do_for_all_thd_copy(Do_THD_Impl*)+0x220) [0xdf7040]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld() [0xf48123]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(do_fill_information_schema_table(THD*, TABLE_LIST*, Item*)+0x83) [0xf4c6f3]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(MaterializeInformationSchemaTableIterator::Init()+0x91) [0x13ab8f1]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x345) [0xfaed15]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(Query_expression::execute(THD*)+0x2c) [0xfaef7c]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x2c5) [0xf3f855]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(mysql_execute_command(THD*, bool)+0xac8) [0xee1e08]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x403) [0xee68f3]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2089) [0xee8e49]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld(do_command(THD*)+0x174) [0xee9d04]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld() [0x1019fa8]
       /home/lalit/mysql_tar/mysql/8.0.27/bin/mysqld() [0x249dcec]
       /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fd1306b8609]
       /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fd12f898293]
      Trying to get some variables.
       Some pointers may be invalid and cause the dump to abort.
       Query (7fd034015da8): select * from INFORMATION_SCHEMA.PROCESSLIST
       Connection ID (thread ID): 2498
       Status: NOT_KILLED
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
       information that should help you find out what is causing the crash.
       2022-01-20T13:12:05.180670Z mysqld_safe Number of processes running now: 0
       2022-01-20T13:12:05.184983Z mysqld_safe mysqld restarted
      

       

       

       

      Steps to reproduce :

       

      mysql [localhost] {msandbox} ((none)) > set global terminology_use_previous='BEFORE_8_0_26';
      Query OK, 0 rows affected, 1 warning (0.00 sec)
      
      mysql [localhost] {msandbox} ((none)) > exit
      Bye
      lalit@lalit-ThinkPad:~/sandboxes/msb_8_0_27$ ./use 
      Welcome to the MySQL monitor. Commands end with ; or \g.
      Your MySQL connection id is 209
      Server version: 8.0.27 MySQL Community Server - GPL
      Copyright (c) 2000, 2021, Oracle and/or its affiliates.
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      mysql [localhost] {msandbox} ((none)) > show variables like 'terminology_use_previous';
      +--------------------------+---------------+
      | Variable_name | Value |
      +--------------------------+---------------+
      | terminology_use_previous | BEFORE_8_0_26 |
      +--------------------------+---------------+
      1 row in set (0.00 sec)
      
      
      session1:
      for i in {1..2000} ;do ./use -u msandbox --password=msandbox -S /tmp/mysql_sandbox8027.sock -e "select * from INFORMATION_SCHEMA.PROCESSLIST;"> /dev/null;
      done
      session2:
      for i in {1..2000} ;do ./use -u msandbox --password=msandbox -S /tmp/mysql_sandbox8027.sock -e "select * from INFORMATION_SCHEMA.PROCESSLIST;"> /dev/null;
      done
      

       

       You will see crash immediately. 

      Attachments

        Activity

          People

            george.lorch George Lorch (Inactive)
            lalit.choudhary Lalit Choudhary
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 1 hour
                1h

                Smart Checklist