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

Assertion `timer_data->expired == 1' failed in my_bool thr_timer_settime(thr_timer_t *, ulonglong)

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      --source include/have_sequence.inc
       
      CREATE PROCEDURE p (IN i INT) EXECUTE s;
      SET SESSION max_statement_time=1;
      PREPARE s FROM 'SELECT /*+ MAX_EXECUTION_TIME(1)*/SEQ FROM seq_1_to_1';
      CALL p (1);
      

      Leads to:

      CS 12.3.0 5879c85f505d3a11d4b8f479f2437416d8a1d724 (Debug, Clang 18.1.3-11) Build 12/12/2025

      mariadbd: /test/12.3_dbg/mysys/thr_timer.c:187: my_bool thr_timer_settime(thr_timer_t *, ulonglong): Assertion `timer_data->expired == 1' failed.
      

      CS 12.3.0 5879c85f505d3a11d4b8f479f2437416d8a1d724 (Debug, Clang 18.1.3-11) Build 12/12/2025

      Core was generated by `/test/MD121225-mariadb-12.3.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1511024)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00007dce2b04527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007dce2b0288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007dce2b02881b in __assert_fail_base (fmt=0x7dce2b1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5d5d4b98ef87 "timer_data->expired == 1", file=file@entry=0x5d5d4b98ef66 "/test/12.3_dbg/mysys/thr_timer.c", line=line@entry=187, function=function@entry=0x5d5d4b98efa0 "my_bool thr_timer_settime(thr_timer_t *, ulonglong)") at ./assert/assert.c:96
      #6  0x00007dce2b03b517 in __assert_fail (assertion=0x5d5d4b98ef87 "timer_data->expired == 1", file=0x5d5d4b98ef66 "/test/12.3_dbg/mysys/thr_timer.c", line=187, function=0x5d5d4b98efa0 "my_bool thr_timer_settime(thr_timer_t *, ulonglong)") at ./assert/assert.c:105
      #7  0x00005d5d4b48c19f in thr_timer_settime (timer_data=0x7dcd40007b20, micro_seconds=1000) at /test/12.3_dbg/mysys/thr_timer.c:187
      #8  0x00005d5d4a6eebc4 in THD::set_query_timer_force (this=0x7dcd40000d58, timeout_val=1000) at /test/12.3_dbg/sql/sql_class.h:6093
      #9  0x00005d5d4aa2a849 in Opt_hints_global::fix_hint (this=0x7dcd4004d228, thd=0x7dcd40000d58) at /test/12.3_dbg/sql/opt_hints.cc:1608
      #10 0x00005d5d4a740483 in JOIN::prepare (this=0x7dcd4005ed08, tables_init=0x7dcd4004c238, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7dcd4004ba00, unit_arg=0x7dcd40049798)at /test/12.3_dbg/sql/sql_select.cc:1495
      #11 0x00005d5d4a73c3f9 in mysql_select (thd=0x7dcd40000d58, tables=0x7dcd4004c238, fields=@0x7dcd4004bcb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x7dcd4004c010, last = 0x7dcd4004c1a8, elements = 2}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201187782400, result=0x7dcd4004d430, unit=0x7dcd40049798, select_lex=0x7dcd4004ba00) at /test/12.3_dbg/sql/sql_select.cc:5425
      #12 0x00005d5d4a73bf85 in handle_select (thd=0x7dcd40000d58, lex=0x7dcd400496b8, result=0x7dcd4004d430, setup_tables_done_option=0)at /test/12.3_dbg/sql/sql_select.cc:636
      #13 0x00005d5d4a6e3691 in execute_sqlcom_select (thd=0x7dcd40000d58, all_tables=0x7dcd4004c238) at /test/12.3_dbg/sql/sql_parse.cc:6172
      #14 0x00005d5d4a6d83cc in mysql_execute_command (thd=0x7dcd40000d58, is_called_from_prepared_stmt=true) at /test/12.3_dbg/sql/sql_parse.cc:3951
      #15 0x00005d5d4a71e361 in Prepared_statement::execute (this=0x7dcd40023ec8, expanded_query=0x7dce28164c58, open_cursor=false)at /test/12.3_dbg/sql/sql_prepare.cc:5107
      #16 0x00005d5d4a71a64c in Prepared_statement::execute_loop (this=0x7dcd40023ec8, expanded_query=0x7dce28164c58, open_cursor=false, packet=0x0, packet_end=0x0) at /test/12.3_dbg/sql/sql_prepare.cc:4471
      #17 0x00005d5d4a71a1ae in mysql_sql_stmt_execute (thd=0x7dcd40000d58)at /test/12.3_dbg/sql/sql_prepare.cc:3478
      #18 0x00005d5d4a6d8425 in mysql_execute_command (thd=0x7dcd40000d58, is_called_from_prepared_stmt=false) at /test/12.3_dbg/sql/sql_parse.cc:3967
      #19 0x00005d5d4a997ff7 in sp_instr_stmt::exec_core (this=0x7dcd40057988, thd=0x7dcd40000d58, nextp=0x7dce28166798)at /test/12.3_dbg/sql/sp_instr.cc:1268
      #20 0x00005d5d4a995436 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7dcd400579c8, thd=0x7dcd40000d58, nextp=0x7dce28166798, open_tables=false, instr=0x7dcd40057988, rerun_the_same_instr=false)at /test/12.3_dbg/sql/sp_instr.cc:418
      #21 0x00005d5d4a995bbc in sp_lex_keeper::validate_lex_and_exec_core (this=0x7dcd400579c8, thd=0x7dcd40000d58, nextp=0x7dce28166798, open_tables=false, instr=0x7dcd40057988)at /test/12.3_dbg/sql/sp_instr.cc:597
      #22 0x00005d5d4a997239 in sp_instr_stmt::execute (this=0x7dcd40057988, thd=0x7dcd40000d58, nextp=0x7dce28166798)at /test/12.3_dbg/sql/sp_instr.cc:1170
      #23 0x00005d5d4a5aeffc in sp_head::execute (this=0x7dcd40056928, thd=0x7dcd40000d58, merge_da_on_success=true)at /test/12.3_dbg/sql/sp_head.cc:1294
      #24 0x00005d5d4a5b199e in sp_head::execute_procedure (this=0x7dcd40056928, thd=0x7dcd40000d58, args=0x7dcd40006128)at /test/12.3_dbg/sql/sp_head.cc:2331
      #25 0x00005d5d4a6d5487 in do_execute_sp (thd=0x7dcd40000d58, sp=0x7dcd40056928)at /test/12.3_dbg/sql/sql_parse.cc:3056
      #26 0x00005d5d4a6d4fa8 in Sql_cmd_call::execute (this=0x7dcd40019f90, thd=0x7dcd40000d58) at /test/12.3_dbg/sql/sql_parse.cc:3279
      #27 0x00005d5d4a6e1381 in mysql_execute_command (thd=0x7dcd40000d58, is_called_from_prepared_stmt=false) at /test/12.3_dbg/sql/sql_parse.cc:5861
      #28 0x00005d5d4a6d0654 in mysql_parse (thd=0x7dcd40000d58, rawbuf=0x7dcd40019ee0 "CALL p (1)", length=10, parser_state=0x7dce28168ac0)at /test/12.3_dbg/sql/sql_parse.cc:7895
      #29 0x00005d5d4a6cda28 in dispatch_command (command=COM_QUERY, thd=0x7dcd40000d58, packet=0x7dcd4000b239 "CALL p (1)", packet_length=10, blocking=true) at /test/12.3_dbg/sql/sql_parse.cc:1878
      #30 0x00005d5d4a6d1203 in do_command (thd=0x7dcd40000d58, blocking=true)at /test/12.3_dbg/sql/sql_parse.cc:1417
      #31 0x00005d5d4a8bf449 in do_handle_one_connection (connect=0x5d5d5beb49e8, put_in_cache=true) at /test/12.3_dbg/sql/sql_connect.cc:1503
      #32 0x00005d5d4a8bf1ee in handle_one_connection (arg=0x5d5d5be823f8)at /test/12.3_dbg/sql/sql_connect.cc:1415
      #33 0x00007dce2b09caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #34 0x00007dce2b129c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  171225  478802a8edb45886b0f105280ed613414f6a580c  No bug found                  
      CS  10.6   opt  171225  478802a8edb45886b0f105280ed613414f6a580c  No bug found                  
      CS  10.11  dbg  101225  ae01081bd0a2769ff3574ecc8d7f643607f6ae0c  No bug found                  
      CS  10.11  dbg  121225  4ee491f1b2eb356e9dc40f388f79b62cfeb13609  No bug found                  
      CS  10.11  opt  101225  ae01081bd0a2769ff3574ecc8d7f643607f6ae0c  No bug found                  
      CS  10.11  opt  121225  4ee491f1b2eb356e9dc40f388f79b62cfeb13609  No bug found                  
      CS  11.4   dbg  121225  4cff562f3f89d4df03e09233d835d0451bc37cc4  No bug found                  
      CS  11.4   opt  121225  4cff562f3f89d4df03e09233d835d0451bc37cc4  No bug found                  
      CS  11.8   dbg  121225  a7528a6190807281d3224e4e67a9b76083a202a6  No bug found                  
      CS  11.8   opt  121225  a7528a6190807281d3224e4e67a9b76083a202a6  No bug found                  
      CS  12.1   dbg  121225  70117463f032d59f8e328335e19b59157d34cf07  timer_data->expired == 1|SIGABRT|thr_timer_settime|THD::set_query_timer_force|Opt_hints_global::fix_hint|JOIN::prepare
      CS  12.1   opt  121225  70117463f032d59f8e328335e19b59157d34cf07  No bug found                  
      CS  12.2   dbg  121225  997d0c4dfc551ea54faa1e9b7d56f3a0ff2ca849  timer_data->expired == 1|SIGABRT|thr_timer_settime|THD::set_query_timer_force|Opt_hints_global::fix_hint|JOIN::prepare
      CS  12.2   opt  121225  997d0c4dfc551ea54faa1e9b7d56f3a0ff2ca849  No bug found                  
      CS  12.3   dbg  121225  5879c85f505d3a11d4b8f479f2437416d8a1d724  timer_data->expired == 1|SIGABRT|thr_timer_settime|THD::set_query_timer_force|Opt_hints_global::fix_hint|JOIN::prepare
      CS  12.3   opt  121225  5879c85f505d3a11d4b8f479f2437416d8a1d724  No bug found                  
      ES  10.6   dbg  151225  bc33b05c6a65de27dbe811a30bc37c207d60ee8e  No bug found
      ES  10.6   opt  151225  bc33b05c6a65de27dbe811a30bc37c207d60ee8e  No bug found
      ES  11.4   dbg  151225  714f2134597e00f4ff107886cf3a55eff48e4510  No bug found                  
      ES  11.4   opt  151225  714f2134597e00f4ff107886cf3a55eff48e4510  No bug found                  
      ES  11.8   dbg  151225  4008de1a5b06105a64821db7b851328f1b27d99e  No bug found                  
      ES  11.8   opt  151225  4008de1a5b06105a64821db7b851328f1b27d99e  No bug found                  
      

      Attachments

        Activity

          People

            shulga Dmitry Shulga
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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