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

Assertion `! is_set()' failed in Diagnostics_area::set_eof_status

Details

    Description

      SET max_session_mem_used = 50000;
      help 'it is going to crash';
      help 'it is going to crash';
      help 'it is going to crash';
      help 'it is going to crash';
      help 'it is going to crash';  # Crashes
      help 'it crashed'; 
      

      Leads to:

      10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

      mysqld: /test/10.5_dbg/sql/sql_error.cc:375: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
      

      10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

      Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f8234e7c700 (LWP 561173))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055c78332903d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055c782aced7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f82335c0801 in __GI_abort () at abort.c:79
      #6  0x00007f82335b039a in __assert_fail_base (fmt=0x7f82337377d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:92
      #7  0x00007f82335b0412 in __GI___assert_fail (assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:101
      #8  0x000055c7827da737 in Diagnostics_area::set_eof_status (this=0x7f820701ab88, thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_error.cc:375
      #9  0x000055c782c9bc95 in my_eof (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_class.h:5166
      #10 mysqld_help_internal (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:844
      #11 0x000055c782c9c1bb in mysqld_help (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:860
      #12 0x000055c782824a58 in mysql_execute_command (thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:3938
      #13 0x000055c782831f2b in mysql_parse (thd=thd@entry=0x7f8207015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8234e7b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
      #14 0x000055c78281dc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8207015088, packet=packet@entry=0x7f8207067089 "", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #15 0x000055c78281c49b in do_command (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #16 0x000055c782977415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8212fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #17 0x000055c782977744 in handle_one_connection (arg=arg@entry=0x7f8212fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #18 0x000055c782dd7fb0 in pfs_spawn_thread (arg=0x7f8232845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #19 0x00007f82342a36db in start_thread (arg=0x7f8234e7c700) at pthread_create.c:463
      #20 0x00007f82336a188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar created issue -
            Roel Roel Van de Paar added a comment - - edited

            Another closely related issue in optimized builds (same testcase):

            10.5.3>help 'it is going to crash';
            ERROR 1290 (HY000): The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement
            

            Note the max-thread-mem-used vs max_session_mem_used

            Could be a typo, variable name change without text update, or a different interaction between multiple variables. max_thread_mem_used is not listed in mysqld options nor online anywhere, so it looks like it is a typo or similar to be fixed.

            Roel Roel Van de Paar added a comment - - edited Another closely related issue in optimized builds (same testcase): 10.5.3>help 'it is going to crash'; ERROR 1290 (HY000): The MariaDB server is running with the --max-thread-mem-used=50000 option so it cannot execute this statement Note the max-thread-mem-used vs max_session_mem_used Could be a typo, variable name change without text update, or a different interaction between multiple variables. max_thread_mem_used is not listed in mysqld options nor online anywhere, so it looks like it is a typo or similar to be fixed.
            Roel Roel Van de Paar added a comment - - edited

            Similar to previously closed bugs MDEV-13011 and MDEV-13179

            Roel Roel Van de Paar added a comment - - edited Similar to previously closed bugs MDEV-13011 and MDEV-13179
            Roel Roel Van de Paar made changes -
            Field Original Value New Value
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Description {noformat}
            SET max_session_mem_used = 50000;
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            {noformat}

            Leads to:

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            mysqld: /test/10.5_dbg/sql/sql_error.cc:375: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
            {noformat}

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x7f8234e7c700 (LWP 561173))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1 0x000055c78332903d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2 0x000055c782aced7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5 0x00007f82335c0801 in __GI_abort () at abort.c:79
            #6 0x00007f82335b039a in __assert_fail_base (fmt=0x7f82337377d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:92
            #7 0x00007f82335b0412 in __GI___assert_fail (assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:101
            #8 0x000055c7827da737 in Diagnostics_area::set_eof_status (this=0x7f820701ab88, thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_error.cc:375
            #9 0x000055c782c9bc95 in my_eof (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_class.h:5166
            #10 mysqld_help_internal (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:844
            #11 0x000055c782c9c1bb in mysqld_help (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:860
            #12 0x000055c782824a58 in mysql_execute_command (thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:3938
            #13 0x000055c782831f2b in mysql_parse (thd=thd@entry=0x7f8207015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8234e7b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x000055c78281dc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8207015088, packet=packet@entry=0x7f8207067089 "", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x000055c78281c49b in do_command (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x000055c782977415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8212fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
            #17 0x000055c782977744 in handle_one_connection (arg=arg@entry=0x7f8212fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
            #18 0x000055c782dd7fb0 in pfs_spawn_thread (arg=0x7f8232845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x00007f82342a36db in start_thread (arg=0x7f8234e7c700) at pthread_create.c:463
            #20 0x00007f82336a188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
            {noformat}
            SET max_session_mem_used = 50000;
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash'; # Crashes
            help 'it is going to crash';
            {noformat}

            Leads to:

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            mysqld: /test/10.5_dbg/sql/sql_error.cc:375: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
            {noformat}

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x7f8234e7c700 (LWP 561173))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1 0x000055c78332903d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2 0x000055c782aced7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5 0x00007f82335c0801 in __GI_abort () at abort.c:79
            #6 0x00007f82335b039a in __assert_fail_base (fmt=0x7f82337377d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:92
            #7 0x00007f82335b0412 in __GI___assert_fail (assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:101
            #8 0x000055c7827da737 in Diagnostics_area::set_eof_status (this=0x7f820701ab88, thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_error.cc:375
            #9 0x000055c782c9bc95 in my_eof (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_class.h:5166
            #10 mysqld_help_internal (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:844
            #11 0x000055c782c9c1bb in mysqld_help (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:860
            #12 0x000055c782824a58 in mysql_execute_command (thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:3938
            #13 0x000055c782831f2b in mysql_parse (thd=thd@entry=0x7f8207015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8234e7b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x000055c78281dc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8207015088, packet=packet@entry=0x7f8207067089 "", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x000055c78281c49b in do_command (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x000055c782977415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8212fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
            #17 0x000055c782977744 in handle_one_connection (arg=arg@entry=0x7f8212fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
            #18 0x000055c782dd7fb0 in pfs_spawn_thread (arg=0x7f8232845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x00007f82342a36db in start_thread (arg=0x7f8234e7c700) at pthread_create.c:463
            #20 0x00007f82336a188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
            Roel Roel Van de Paar made changes -
            Description {noformat}
            SET max_session_mem_used = 50000;
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash'; # Crashes
            help 'it is going to crash';
            {noformat}

            Leads to:

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            mysqld: /test/10.5_dbg/sql/sql_error.cc:375: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
            {noformat}

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x7f8234e7c700 (LWP 561173))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1 0x000055c78332903d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2 0x000055c782aced7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5 0x00007f82335c0801 in __GI_abort () at abort.c:79
            #6 0x00007f82335b039a in __assert_fail_base (fmt=0x7f82337377d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:92
            #7 0x00007f82335b0412 in __GI___assert_fail (assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:101
            #8 0x000055c7827da737 in Diagnostics_area::set_eof_status (this=0x7f820701ab88, thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_error.cc:375
            #9 0x000055c782c9bc95 in my_eof (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_class.h:5166
            #10 mysqld_help_internal (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:844
            #11 0x000055c782c9c1bb in mysqld_help (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:860
            #12 0x000055c782824a58 in mysql_execute_command (thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:3938
            #13 0x000055c782831f2b in mysql_parse (thd=thd@entry=0x7f8207015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8234e7b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x000055c78281dc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8207015088, packet=packet@entry=0x7f8207067089 "", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x000055c78281c49b in do_command (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x000055c782977415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8212fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
            #17 0x000055c782977744 in handle_one_connection (arg=arg@entry=0x7f8212fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
            #18 0x000055c782dd7fb0 in pfs_spawn_thread (arg=0x7f8232845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x00007f82342a36db in start_thread (arg=0x7f8234e7c700) at pthread_create.c:463
            #20 0x00007f82336a188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
            {noformat}
            SET max_session_mem_used = 50000;
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash';
            help 'it is going to crash'; # Crashes
            help 'it crashed';
            {noformat}

            Leads to:

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            mysqld: /test/10.5_dbg/sql/sql_error.cc:375: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
            {noformat}

            {noformat:title=10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f}
            Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x7f8234e7c700 (LWP 561173))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1 0x000055c78332903d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2 0x000055c782aced7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5 0x00007f82335c0801 in __GI_abort () at abort.c:79
            #6 0x00007f82335b039a in __assert_fail_base (fmt=0x7f82337377d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:92
            #7 0x00007f82335b0412 in __GI___assert_fail (assertion=assertion@entry=0x55c7834972cd "! is_set()", file=file@entry=0x55c783497140 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=375, function=function@entry=0x55c783497c80 <Diagnostics_area::set_eof_status(THD*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_eof_status(THD*)") at assert.c:101
            #8 0x000055c7827da737 in Diagnostics_area::set_eof_status (this=0x7f820701ab88, thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_error.cc:375
            #9 0x000055c782c9bc95 in my_eof (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_class.h:5166
            #10 mysqld_help_internal (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:844
            #11 0x000055c782c9c1bb in mysqld_help (thd=thd@entry=0x7f8207015088, mask=<optimized out>) at /test/10.5_dbg/sql/sql_help.cc:860
            #12 0x000055c782824a58 in mysql_execute_command (thd=thd@entry=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:3938
            #13 0x000055c782831f2b in mysql_parse (thd=thd@entry=0x7f8207015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8234e7b450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x000055c78281dc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f8207015088, packet=packet@entry=0x7f8207067089 "", packet_length=packet_length@entry=27, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x000055c78281c49b in do_command (thd=0x7f8207015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x000055c782977415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f8212fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
            #17 0x000055c782977744 in handle_one_connection (arg=arg@entry=0x7f8212fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
            #18 0x000055c782dd7fb0 in pfs_spawn_thread (arg=0x7f8232845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x00007f82342a36db in start_thread (arg=0x7f8234e7c700) at pthread_create.c:463
            #20 0x00007f82336a188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
            Roel Roel Van de Paar added a comment - - edited

            Generic unique bug ID; may mask other bugs.

            ! is_set()|SIGABRT|Diagnostics_area::set_eof_status|my_eof|mysqld_help_internal|mysqld_help
            

            Roel Roel Van de Paar added a comment - - edited Generic unique bug ID; may mask other bugs. ! is_set()|SIGABRT|Diagnostics_area::set_eof_status|my_eof|mysqld_help_internal|mysqld_help
            Roel Roel Van de Paar made changes -
            Labels affects-tests
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Rucha Deodhar [ rucha174 ]
            rucha174 Rucha Deodhar made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rucha174 Rucha Deodhar added a comment -

            I get a different stack trace leading to assertion failure:

            Program terminated with signal SIGABRT, Aborted.

            warning: Unexpected size of section `.reg-xstate/20826' in core file.
            #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 0x7f5de1aee700 (LWP 20826))]
            #0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1 0x00005609b4dd319d in my_write_core (sig=6) at /home/rucha/Workspace/10_1/server/mysys/stacktrace.c:387
            #2 0x00005609b4783c67 in handle_fatal_signal (sig=6) at /home/rucha/Workspace/10_1/server/sql/signal_handler.cc:296
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5 0x00007f5de79058b1 in __GI_abort () at abort.c:79
            #6 0x00007f5de78f542a in _assert_fail_base (fmt=0x7f5de7a7ca38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5609b4f69cc0 "fixed == 1", file=file@entry=0x5609b4f6a0b0 "/home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc", line=line@entry=5222, function=function@entry=0x5609b4f6c360 <Item_func_like::val_int()::PRETTY_FUNCTION_> "virtual longlong Item_func_like::val_int()") at assert.c:92
            #7 0x00007f5de78f54a2 in _GI_assert_fail (assertion=0x5609b4f69cc0 "fixed == 1", file=0x5609b4f6a0b0 "/home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc", line=5222, function=0x5609b4f6c360 <Item_func_like::val_int()::PRETTY_FUNCTION_> "virtual longlong Item_func_like::val_int()") at assert.c:101
            #8 0x00005609b47c7a48 in Item_func_like::val_int (this=0x7f5dd014e7d8) at /home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc:5222
            #9 0x00005609b48e4e96 in search_keyword (thd=0x5609b751c550, keywords=0x7f5dd0066880, find_fields=0x7f5de1aeb170, select=0x7f5dd014e928, key_id=0x7f5de1aeafc8) at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:244
            #10 0x00005609b48e65f5 in mysqld_help_internal (thd=0x5609b751c550, mask=0x7f5dd014d1a0 "it is going to crash") at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:748
            #11 0x00005609b48e6e54 in mysqld_help (thd=0x5609b751c550, mask=0x7f5dd014d1a0 "it is going to crash") at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:857
            #12 0x00005609b4545e3c in mysql_execute_command (thd=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:3061
            #13 0x00005609b4552b6c in mysql_parse (thd=0x5609b751c550, rawbuf=0x7f5dd014d0d8 "help 'it is going to crash'", length=27, parser_state=0x7f5de1aed620) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:7200
            #14 0x00005609b4541d2d in dispatch_command (command=COM_QUERY, thd=0x5609b751c550, packet=0x5609b7522211 "help 'it is going to crash'", packet_length=27) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:1491
            #15 0x00005609b4540c19 in do_command (thd=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:1123
            #16 0x00005609b467ec69 in do_handle_one_connection (thd_arg=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_connect.cc:1331
            #17 0x00005609b467e9a4 in handle_one_connection (arg=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_connect.cc:1242
            #18 0x00005609b4a9d0d5 in pfs_spawn_thread (arg=0x5609b75273a0) at /home/rucha/Workspace/10_1/server/storage/perfschema/pfs.cc:1868
            #19 0x00007f5de83e46db in start_thread (arg=0x7f5de1aee700) at pthread_create.c:463
            #20 0x00007f5de79e6a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            warning: Unexpected size of section `.reg-xstate/20818' in core file.

            rucha174 Rucha Deodhar added a comment - I get a different stack trace leading to assertion failure: Program terminated with signal SIGABRT, Aborted. warning: Unexpected size of section `.reg-xstate/20826' in core file. #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 0x7f5de1aee700 (LWP 20826))] #0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x00005609b4dd319d in my_write_core (sig=6) at /home/rucha/Workspace/10_1/server/mysys/stacktrace.c:387 #2 0x00005609b4783c67 in handle_fatal_signal (sig=6) at /home/rucha/Workspace/10_1/server/sql/signal_handler.cc:296 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x00007f5de79058b1 in __GI_abort () at abort.c:79 #6 0x00007f5de78f542a in _ assert_fail_base (fmt=0x7f5de7a7ca38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5609b4f69cc0 "fixed == 1", file=file@entry=0x5609b4f6a0b0 "/home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc", line=line@entry=5222, function=function@entry=0x5609b4f6c360 <Item_func_like::val_int():: PRETTY_FUNCTION _> "virtual longlong Item_func_like::val_int()") at assert.c:92 #7 0x00007f5de78f54a2 in _ GI _ assert_fail (assertion=0x5609b4f69cc0 "fixed == 1", file=0x5609b4f6a0b0 "/home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc", line=5222, function=0x5609b4f6c360 <Item_func_like::val_int():: PRETTY_FUNCTION _> "virtual longlong Item_func_like::val_int()") at assert.c:101 #8 0x00005609b47c7a48 in Item_func_like::val_int (this=0x7f5dd014e7d8) at /home/rucha/Workspace/10_1/server/sql/item_cmpfunc.cc:5222 #9 0x00005609b48e4e96 in search_keyword (thd=0x5609b751c550, keywords=0x7f5dd0066880, find_fields=0x7f5de1aeb170, select=0x7f5dd014e928, key_id=0x7f5de1aeafc8) at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:244 #10 0x00005609b48e65f5 in mysqld_help_internal (thd=0x5609b751c550, mask=0x7f5dd014d1a0 "it is going to crash") at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:748 #11 0x00005609b48e6e54 in mysqld_help (thd=0x5609b751c550, mask=0x7f5dd014d1a0 "it is going to crash") at /home/rucha/Workspace/10_1/server/sql/sql_help.cc:857 #12 0x00005609b4545e3c in mysql_execute_command (thd=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:3061 #13 0x00005609b4552b6c in mysql_parse (thd=0x5609b751c550, rawbuf=0x7f5dd014d0d8 "help 'it is going to crash'", length=27, parser_state=0x7f5de1aed620) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:7200 #14 0x00005609b4541d2d in dispatch_command (command=COM_QUERY, thd=0x5609b751c550, packet=0x5609b7522211 "help 'it is going to crash'", packet_length=27) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:1491 #15 0x00005609b4540c19 in do_command (thd=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_parse.cc:1123 #16 0x00005609b467ec69 in do_handle_one_connection (thd_arg=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_connect.cc:1331 #17 0x00005609b467e9a4 in handle_one_connection (arg=0x5609b751c550) at /home/rucha/Workspace/10_1/server/sql/sql_connect.cc:1242 #18 0x00005609b4a9d0d5 in pfs_spawn_thread (arg=0x5609b75273a0) at /home/rucha/Workspace/10_1/server/storage/perfschema/pfs.cc:1868 #19 0x00007f5de83e46db in start_thread (arg=0x7f5de1aee700) at pthread_create.c:463 #20 0x00007f5de79e6a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 warning: Unexpected size of section `.reg-xstate/20818' in core file.
            rucha174 Rucha Deodhar made changes -
            Assignee Rucha Deodhar [ rucha174 ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Rucha Deodhar [ rucha174 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]

            rucha174 any updates please?

            Roel Roel Van de Paar added a comment - rucha174 any updates please?
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar added a comment - - edited

            SET SQL_MODE='';
            SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
            HELP '%a';
            CREATE TABLE t (c CHAR(8) NOT NULL) ENGINE=MEMORY;
            SET max_session_mem_used = 50000;
            REPLACE DELAYED t VALUES (5);
            HELP 'a%';
            

            Without --log-bin added to the startup, this testcase produces the same issue. With --log-bin added, it produces MDEV-22708.

            Roel Roel Van de Paar added a comment - - edited SET SQL_MODE=''; SET GLOBAL wsrep_forced_binlog_format='STATEMENT'; HELP '%a'; CREATE TABLE t (c CHAR(8) NOT NULL) ENGINE=MEMORY; SET max_session_mem_used = 50000; REPLACE DELAYED t VALUES (5); HELP 'a%'; Without --log-bin added to the startup, this testcase produces the same issue. With --log-bin added, it produces MDEV-22708 .
            Roel Roel Van de Paar made changes -
            Affects Version/s 10.6 [ 24028 ]
            Roel Roel Van de Paar made changes -
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.1 [ 16100 ]
            rucha174 Rucha Deodhar added a comment -

            Roel Yes, It crashes in the first search topics. I changed max_session_mem_used as suggested in the review to check if it can crash later because the code after first search_topics() looked fragile. Found out that it doesn't crash.

            rucha174 Rucha Deodhar added a comment - Roel Yes, It crashes in the first search topics. I changed max_session_mem_used as suggested in the review to check if it can crash later because the code after first search_topics() looked fragile. Found out that it doesn't crash.
            Roel Roel Van de Paar made changes -
            Comment [ Great. When will it be pushed? ]
            rucha174 Rucha Deodhar added a comment - Patch: https://github.com/MariaDB/server/commit/9c2570e6c42
            serg Sergei Golubchik made changes -
            Fix Version/s 10.6 [ 24028 ]

            9c2570e6c42 is ok to push

            serg Sergei Golubchik added a comment - 9c2570e6c42 is ok to push
            rucha174 Rucha Deodhar made changes -
            Fix Version/s 10.2.37 [ 25112 ]
            Fix Version/s 10.3.28 [ 25111 ]
            Fix Version/s 10.4.18 [ 25110 ]
            Fix Version/s 10.5.9 [ 25109 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            Roel Roel Van de Paar made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 108004 ] MariaDB v4 [ 157699 ]

            People

              rucha174 Rucha Deodhar
              Roel Roel Van de Paar
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.