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

MariaDB 10.6.21 Signal 11 Crash (Segmentation Fault) When Executing Stored Procedure

Details

    • Bug
    • Status: Needs Feedback (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.6.21
    • None
    • MariaDB Version: 10.6.21-MariaDB-log
      OS: RHEL
      Architecture: 64-bit
      Storage Engine: InnoDB

    Description

      MariaDB server crashes with a segmentation fault (signal 11) while executing a stored procedure. The issue occurs intermittently and is logged with an error message indicating a server crash.

      Steps to Reproduce:

      Execute a stored procedure that involves temporary tables, ENUM fields, or variable assignments.
      Under concurrent execution, MariaDB crashes with a segmentation fault.

      Expected Behavior:
      MariaDB should execute the stored procedure without crashing.

      Actual Behavior:
      MariaDB crashes and logs a fatal error in the logs, with a stack trace referencing Field_enum, setup_tmp_table_column_bitmaps, and sp_rcontext.

      Server Hardware Details
      RAM: 50GB
      CPU: 24 cores

      MariaDB Configuration:

      [mysqld]
      lower_case_table_names=1
      innodb_buffer_pool_size=10G
      innodb_log_file_size=2G
      innodb_log_buffer_size=256M
      innodb_flush_log_at_trx_commit=2
      innodb_flush_method=O_DIRECT
      table_definition_cache=8000
      table_open_cache=8000
      port=3319
      user=root
      sort_buffer_size=16M
      join_buffer_size=16M
      max_heap_table_size=1G
      tmp_table_size=1G
      max_connections=500
      max_sp_recursion_depth=255
      slow-query-log=1
      slow-query-log-file=/home/admin/log/mariadb/query/db_slow_query_log.txt
      long-query-time=0
      query_cache_size=0
      transaction-isolation=READ-COMMITTED
      skip-name-resolve
      

      Error Log Snippet

      250319 17:00:47 [ERROR] /usr/sbin/mariadbd got signal 11 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Please include the information from the server start above, to the end of the
      information below.
       
      Server version: 10.6.21-MariaDB-log source revision: 066e8d6aeabc13242193780341e0f845528105de
       
      The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
      contains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.
       
      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)
       
      Thread pointer: 0x7f949c000c58
      stack_bottom = 0x7f97805a1000 thread_stack 0x49000
      /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55b692cf1a1e]
      /usr/sbin/mariadbd(handle_fatal_signal+0x305)[0x55b6927b51c5]
      /lib64/libc.so.6(+0x54db0)[0x7f9797054db0]
      /usr/sbin/mariadbd(_ZNK10Field_enum7val_intEPKh+0x30)[0x55b69279f390]
      /usr/sbin/mariadbd(_Z30setup_tmp_table_column_bitmapsP5TABLEPhj+0x105)[0x55b6925b8615]
      /usr/sbin/mariadbd(_ZN17Virtual_tmp_table4initEj+0xbe)[0x55b6925b989e]
      /usr/sbin/mariadbd(_ZN11sp_rcontext14init_var_tableEP3THDR4ListI16Spvar_definitionE+0xd7)[0x55b6924c7ce7]
      /usr/sbin/mariadbd(_ZN11sp_rcontext6createEP3THDPK7sp_headPK11sp_pcontextP5FieldR19Row_definition_list+0xb7)[0x55b6924c8dc7]
      /usr/sbin/mariadbd(_ZN7sp_head15rcontext_createEP3THDP5FieldPP4Itemj+0x80)[0x55b6924bdb90]
      /usr/sbin/mariadbd(_ZN7sp_head16execute_functionEP3THDPP4ItemjP5FieldPP11sp_rcontextP11Query_arena+0x675)[0x55b6924bf165]
      /usr/sbin/mariadbd(_ZN7Item_sp12execute_implEP3THDPP4Itemj+0x102)[0x55b6927d7692]
      /usr/sbin/mariadbd(_ZN7Item_sp7executeEP3THDPbPP4Itemj+0x1f)[0x55b6927d781f]
      /usr/sbin/mariadbd(_ZN12Item_func_sp7val_intEv+0x11)[0x55b69284cf01]
      /usr/sbin/mariadbd(_ZN14Arg_comparator18compare_int_signedEv+0x38)[0x55b6927efda8]
      /usr/sbin/mariadbd(_ZN12Item_func_ge8val_boolEv+0x2b)[0x55b6927f055b]
      /usr/sbin/mariadbd(_ZN13Item_cond_and8val_boolEv+0x34)[0x55b6927f1484]
      /usr/sbin/mariadbd(_ZN20sp_instr_jump_if_not9exec_coreEP3THDPj+0x2f)[0x55b6924bafdf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x3f)[0x55b6924b92bf]
      /usr/sbin/mariadbd(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x160)[0x55b6924c2580]
      /usr/sbin/mariadbd(_ZN13sp_instr_stmt7executeEP3THDPj+0x5dc)[0x55b6924c2f9c]
      /usr/sbin/mariadbd(_ZN7sp_head7executeEP3THDb+0x9e9)[0x55b6924bcd69]
      /usr/sbin/mariadbd(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x6f2)[0x55b6924be6a2]
      /usr/sbin/mariadbd(+0x7d5997)[0x55b692560997]
      /usr/sbin/mariadbd(+0x7d9b48)[0x55b692564b48]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0xf4a)[0x55b69256d6aa]
      /usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x211)[0x55b692572611]
      /usr/sbin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0xf15)[0x55b692574865]
      /usr/sbin/mariadbd(_Z10do_commandP3THDb+0x13f)[0x55b692576dff]
      /usr/sbin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x395)[0x55b692689285]
      /usr/sbin/mariadbd(handle_one_connection+0x5d)[0x55b6926895dd]
      /usr/sbin/mariadbd(+0xc87859)[0x55b692a12859]
      /lib64/libc.so.6(+0x9f802)[0x7f979709f802]
      /lib64/libc.so.6(+0x3f450)[0x7f979703f450]
       
      Connection ID (thread ID): 229
      Status: NOT_KILLED
      Query (0x7f949f4d19c0): CALL InfixToPostfix()
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_me
      rge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_so
      rt_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,or
      derby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinalit
      y=off,cset_narrowing=off
       
      Writing a core file...
      Working directory at /home/admin/data/db
      Resource Limits (excludes unlimited resources):
      Limit                     Soft Limit           Hard Limit           Units
      Max stack size            8388608              unlimited            bytes
      Max core file size        0                    unlimited            bytes
      Max processes             208520               208520               processes
      Max open files            128555               128555               files
      Max locked memory         8388608              8388608              bytes
      Max pending signals       208520               208520               signals
      Max msgqueue size         819200               819200               bytes
      Max nice priority         0                    0
      Max realtime priority     0                    0
      Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
       
      Kernel version: Linux version 5.14.0-362.8.1.el9_3.x86_64 (mockbuild@x86-vm-07.build.eng.bos.redhat.com) (gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), GNU ld version 2.35.2-42.el9) #1 SMP PREEMPT_DYNAMIC Tue O
      ct 3 11:12:36 EDT 2023
       
      250319 17:00:47 mysqld_safe Number of processes running now: 0
      250319 17:00:47 mysqld_safe mysqld restarted
      2025-03-19 17:00:47 0 [Note] Starting MariaDB 10.6.21-MariaDB-log source revision 066e8d6aeabc13242193780341e0f845528105de server_uid vmWJP4yvspoxkcYzonMuW0dnRXA= as process 942266
      2025-03-19 17:00:47 0 [Note] CONNECT: Version 1.07.0002 March 22, 2021
      2025-03-19 17:00:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2025-03-19 17:00:47 0 [Note] InnoDB: Number of pools: 1
      2025-03-19 17:00:47 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
      2025-03-19 17:00:47 0 [Note] InnoDB: Using Linux native AIO
      2025-03-19 17:00:47 0 [Note] InnoDB: Initializing buffer pool, total size = 10737418240, chunk size = 134217728
      2025-03-19 17:00:47 0 [Note] InnoDB: Completed initialization of buffer pool
      2025-03-19 17:00:47 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=12630463627053,12630463627053
      2025-03-19 17:00:48 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 1190 row operations to undo
      2025-03-19 17:00:48 0 [Note] InnoDB: Trx id counter is 13207878
      2025-03-19 17:00:48 0 [Note] InnoDB: To recover: 6335 pages
      2025-03-19 17:00:48 0 [Note] InnoDB: 128 rollback segments are active.
      2025-03-19 17:00:48 0 [Note] InnoDB: Starting in background the rollback of recovered transactions
      2025-03-19 17:00:48 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
      2025-03-19 17:00:48 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2025-03-19 17:00:48 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2025-03-19 17:00:48 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2025-03-19 17:00:48 0 [Note] InnoDB: 10.6.21 started; log sequence number 12630499758301; transaction id 13207879
      2025-03-19 17:00:48 0 [Note] InnoDB: Loading buffer pool(s) from /home/admin/data/db/ib_buffer_pool
      2025-03-19 17:00:48 0 [Note] Plugin 'FEEDBACK' is disabled.
      2025-03-19 17:00:48 0 [Note] mariadbd: Plugin 'CONNECT' already installed
      2025-03-19 17:00:48 0 [Note] Server socket created on IP: '0.0.0.0'.
      2025-03-19 17:00:48 0 [Note] Server socket created on IP: '::'.
      2025-03-19 17:00:48 0 [Warning] 'user' entry '@testls93' ignored in --skip-name-resolve mode.
      2025-03-19 17:00:48 0 [Warning] 'user' entry 'root@idcls93' ignored in --skip-name-resolve mode.
      2025-03-19 17:00:48 0 [Warning] 'db' entry 'db root@uo.in' ignored in --skip-name-resolve mode.
      2025-03-19 17:00:48 0 [Warning] 'proxies_priv' entry '@% mysql@testls93' ignored in --skip-name-resolve mode.
      2025-03-19 17:00:48 0 [Note] /usr/sbin/mariadbd: ready for connections.
      Version: '10.6.21-MariaDB-log'  socket: '/home/admin/data/db/db.sock'  port: 3319  MariaDB Server
      2025-03-19 17:00:48 0 [Note] InnoDB: Rolled back recovered transaction 13207870
      2025-03-19 17:00:48 0 [Note] InnoDB: Rollback of non-prepared transactions completed
      2025-03-19 17:00:49 0 [Note] InnoDB: Buffer pool(s) load completed at 250319 17:00:49
      

      Attachments

        Activity

          serg Sergei Golubchik added a comment -

          Try to increase thread_stack. Did it help?

          serg Sergei Golubchik added a comment - Try to increase thread_stack . Did it help?
          alice Alice Sherepa added a comment -

          Could you please provide the example of the procedure and more details on how to reproduce it (SHOW CREATE PROCEDURE, SHOW CREATE TABLE for the involved tables). Did you recently upgraded and experienced a regression?

          alice Alice Sherepa added a comment - Could you please provide the example of the procedure and more details on how to reproduce it (SHOW CREATE PROCEDURE, SHOW CREATE TABLE for the involved tables). Did you recently upgraded and experienced a regression?

          People

            Unassigned Unassigned
            jaswanth Jaswanth
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.