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

Crash in Item_param::convert_str_value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5.12
    • N/A
    • N/A
    • None

    Description

      Was testing MaxScale version 6 with 10.5.12 and observed the following crash in both 10.5.12 and 10.5.12

      210813  9:03:30 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
      Server version: 10.5.12-MariaDB-1:10.5.12+maria~focal-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=11
      max_threads=153
      thread_count=14
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467871 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x7f29e8000c58
      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 = 0x7f2a41491d58 thread_stack 0x49000
      mysqld(my_print_stacktrace+0x32)[0x55b96c8b73a2]
      Printing to addr2line failed
      mysqld(handle_fatal_signal+0x485)[0x55b96c30a0b5]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f2a595623c0]
      mysqld(my_string_metadata_get+0x1e)[0x55b96c90721e]
      mysqld(_ZN10Item_param17convert_str_valueEP3THD+0xdf)[0x55b96c32f26f]
      mysqld(+0x779347)[0x55b96c10b347]
      mysqld(_ZN18Prepared_statement14set_parametersEP6StringPhS2_+0x6f)[0x55b96c10f96f]
      mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0x3a)[0x55b96c110a7a]
      mysqld(+0x77f735)[0x55b96c111735]
      mysqld(_Z19mysqld_stmt_executeP3THDPcj+0x30)[0x55b96c111950]
      mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1acf)[0x55b96c0f847f]
      mysqld(_Z10do_commandP3THD+0x11c)[0x55b96c0fa30c]
      mysqld(_Z24do_handle_one_connectionP7CONNECTb+0x421)[0x55b96c200a61]
      mysqld(handle_one_connection+0x5d)[0x55b96c200edd]
      mysqld(+0xbd0a36)[0x55b96c562a36]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609)[0x7f2a59556609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f2a59144293]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x0): (null)
      Connection ID (thread ID): 11
      Status: NOT_KILLED
      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_merge=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_sort_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,orderby_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
      The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      information that should help you find out what is causing the crash.
      We think the query pointer is invalid, but we will try to print it anyway. 
      Query: 
      Writing a core file...
      Working directory at /var/lib/mysql
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units     
      Max cpu time              unlimited            unlimited            seconds   
      Max file size             unlimited            unlimited            bytes     
      Max data size             unlimited            unlimited            bytes     
      Max stack size            8388608              unlimited            bytes     
      Max core file size        unlimited            unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             unlimited            unlimited            processes 
      Max open files            1024                 1024                 files     
      Max locked memory         65536                65536                bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       127158               127158               signals   
      Max msgqueue size         819200               819200               bytes     
      Max nice priority         0                    0                    
      Max realtime priority     0                    0                    
      Max realtime timeout      unlimited            unlimited            us        
      Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
      

      The sysbench command I ran:

      sysbench --time=0 --threads=5 --mysql-host=127.0.0.1 --mysql-port=4006 --mysql-user=maxuser --mysql-password=maxpwd --mysql-db=test --db-ps-mode=auto --skip_trx=on ./oltp_read_only.lua run
      

      The MaxScale configuration:

      [maxscale]
      threads=auto
       
      [server1]
      type=server
      address=127.0.0.1
      port=3000
      protocol=MariaDBBackend
      persistpoolmax=20
      persistmaxtime=300s
       
      [server2]
      type=server
      address=127.0.0.1
      port=3001
      protocol=MariaDBBackend
      persistpoolmax=20
      persistmaxtime=300s
       
      [server3]
      type=server
      address=127.0.0.1
      port=3002
      protocol=MariaDBBackend
      persistpoolmax=20
      persistmaxtime=300s
       
      [server4]
      type=server
      address=127.0.0.1
      port=3003
      protocol=MariaDBBackend
      persistpoolmax=20
      persistmaxtime=300s
       
      [MariaDB-Monitor]
      type=monitor
      module=mariadbmon
      servers=server1,server2,server3,server4
      user=maxuser
      password=maxpwd
      monitor_interval=5000
       
      [RW-Split-Router]
      type=service
      router=readwritesplit
      servers=server1,server2,server3,server4
      user=maxuser
      password=maxpwd
      idle_session_pool_time=0s
       
      [RW-Split-Listener]
      type=listener
      service=RW-Split-Router
      protocol=MariaDBClient
      port=4006
      

      I was using a modified version of MaxScale with the following patch applied to commit d9f14315a0ba075c61d7fe9fa4e403534517787c:

      diff --git a/server/core/routingworker.cc b/server/core/routingworker.cc
      index 0d08600e4..23a6e78b3 100644
      --- a/server/core/routingworker.cc
      +++ b/server/core/routingworker.cc
      @@ -465,7 +465,7 @@ void RoutingWorker::process_timeouts()
                       auto idle = MXS_CLOCK_TO_SEC(now - pClient->last_read());
                       pSes->tick(idle);
       
      -                if (pooling_time >= 0 && idle > pooling_time && pSes->can_pool_backends())
      +                if (pooling_time >= 0 && idle >= pooling_time && pSes->can_pool_backends())
                       {
                           for (auto& backend : pSes->backend_connections())
                           {
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              markus makela markus makela
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.