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

Assertion failure in btr0pcur.cc during SELECT operation

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.21, 10.4.14
    • None
    • None
    • Fedora 32 Server Edition, kernel version 5.6.19-300.fc32.x86_64,

    Description

      On running the following query on a Nextcloud database, I receive a "MySQL Server has gone away" error. Manual running results in a loss of connection to the database shortly, until Systemd restarts the crashed service.

      Query:

      SELECT COUNT(*) AS `num_entries` FROM `oc_filecache`
      

      Error in mariadb.log:

      2020-10-22 23:25:58 0x7f9f8e451700  InnoDB: Assertion failure in file /builddir/build/BUILD/mariadb-10.4.14/storage/innobase/btr/btr0pcur.cc line 494
      InnoDB: Failing assertion: btr_page_get_prev(next_page) == btr_pcur_get_block(cursor)->page.id.page_no()
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
      InnoDB: about forcing recovery.
      201022 23:25:58 [ERROR] mysqld got signal 6 ;
      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.4.14-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=2
      max_threads=153
      thread_count=8
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467757 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f9f398079c8
      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 = 0x7f9f8e44f588 thread_stack 0x49000
      /usr/libexec/mysqld(my_print_stacktrace+0x41)[0x564cb44971d1]
      /usr/libexec/mysqld(handle_fatal_signal+0x4e5)[0x564cb3fc5e95]
      sigaction.c:0(__restore_rt)[0x7f9f8f010a90]
      :0(__GI_raise)[0x7f9f8e6f49e5]
      :0(__GI_abort)[0x7f9f8e6dd895]
      /usr/libexec/mysqld(+0x5affde)[0x564cb3ca2fde]
      /usr/libexec/mysqld(+0x5b467f)[0x564cb3ca767f]
      /usr/libexec/mysqld(+0xb656cd)[0x564cb42586cd]
      /usr/libexec/mysqld(+0xaa9e50)[0x564cb419ce50]
      /usr/libexec/mysqld(_ZN7handler13ha_index_nextEPh+0x59)[0x564cb3fcbf59]
      /usr/libexec/mysqld(+0x704190)[0x564cb3df7190]
      /usr/libexec/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x1d3)[0x564cb3dea773]
      /usr/libexec/mysqld(_ZN4JOIN10exec_innerEv+0xe39)[0x564cb3e14579]
      /usr/libexec/mysqld(_ZN4JOIN4execEv+0x37)[0x564cb3e14867]
      /usr/libexec/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x136)[0x564cb3e12826]
      /usr/libexec/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x14b)[0x564cb3e1328b]
      /usr/libexec/mysqld(+0x6b1af1)[0x564cb3da4af1]
      /usr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x4cd9)[0x564cb3db1039]
      /usr/libexec/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x1df)[0x564cb3db36df]
      /usr/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1014)[0x564cb3db5824]
      /usr/libexec/mysqld(_Z10do_commandP3THD+0x110)[0x564cb3db7560]
      /usr/libexec/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1f2)[0x564cb3ea3a22]
      /usr/libexec/mysqld(handle_one_connection+0x3f)[0x564cb3ea3b7f]
      pthread_create.c:0(start_thread)[0x7f9f8f005432]
      :0(__GI___clone)[0x7f9f8e7b9913]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f9f39855660): SELECT COUNT(*) AS `num_entries` FROM `oc_filecache`
      Connection ID (thread ID): 8
      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
       
      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.
      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             190227               190227               processes
      Max open files            32190                32190                files
      Max locked memory         65536                65536                bytes
      Max address space         unlimited            unlimited            bytes
      Max file locks            unlimited            unlimited            locks
      Max pending signals       190227               190227               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
       
      2020-10-22 23:26:04 0 [Note] RocksDB: 2 column families found
      2020-10-22 23:26:04 0 [Note] RocksDB: Column Families at start:
      2020-10-22 23:26:04 0 [Note]   cf=default
      2020-10-22 23:26:04 0 [Note]     write_buffer_size=67108864
      2020-10-22 23:26:04 0 [Note]     target_file_size_base=67108864
      2020-10-22 23:26:04 0 [Note]   cf=__system__
      2020-10-22 23:26:04 0 [Note]     write_buffer_size=67108864
      2020-10-22 23:26:04 0 [Note]     target_file_size_base=67108864
      2020-10-22 23:26:04 0 [Note] RocksDB: Table_store: loaded DDL data for 0 tables
      2020-10-22 23:26:04 0 [Note] RocksDB: global statistics using get_sched_indexer_t indexer
      2020-10-22 23:26:04 0 [Note] MyRocks storage engine plugin has been successfully initialized.
      Thu Oct 22 23:26:04 2020 PerconaFT recovery starting in env /var/lib/mysql/
      Thu Oct 22 23:26:04 2020 PerconaFT recovery scanning backward from 4362730
      Thu Oct 22 23:26:04 2020 PerconaFT recovery bw_end_checkpoint at 4362730 timestamp 1603423531957429 xid 4362726 (bw_newer)
      Thu Oct 22 23:26:04 2020 PerconaFT recovery bw_begin_checkpoint at 4362726 timestamp 1603423531957407 (bw_between)
      Thu Oct 22 23:26:04 2020 PerconaFT recovery turning around at begin checkpoint 4362726 time 22
      Thu Oct 22 23:26:04 2020 PerconaFT recovery starts scanning forward to 4362730 from 4362726 left 4 (fw_between)
      Thu Oct 22 23:26:04 2020 PerconaFT recovery closing 2 dictionaries
      Thu Oct 22 23:26:04 2020 PerconaFT recovery making a checkpoint
      Thu Oct 22 23:26:04 2020 PerconaFT recovery done
      2020-10-22 23:26:04 0 [Note] InnoDB: Using Linux native AIO
      2020-10-22 23:26:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2020-10-22 23:26:04 0 [Note] InnoDB: Uses event mutexes
      2020-10-22 23:26:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2020-10-22 23:26:04 0 [Note] InnoDB: Number of pools: 1
      2020-10-22 23:26:04 0 [Note] InnoDB: Using SSE2 crc32 instructions
      2020-10-22 23:26:04 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
      2020-10-22 23:26:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2020-10-22 23:26:04 0 [Note] InnoDB: Completed initialization of buffer pool
      2020-10-22 23:26:04 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2020-10-22 23:26:04 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=10419653722
      2020-10-22 23:26:05 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2020-10-22 23:26:05 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2020-10-22 23:26:05 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2020-10-22 23:26:05 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2020-10-22 23:26:05 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2020-10-22 23:26:05 0 [Note] InnoDB: Waiting for purge to start
      2020-10-22 23:26:05 0 [Note] InnoDB: 10.4.14 started; log sequence number 10419653731; transaction id 33373168
      2020-10-22 23:26:05 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
      2020-10-22 23:26:05 0 [Note] Plugin 'FEEDBACK' is disabled.
      2020-10-22 23:26:05 0 [Note] Recovering after a crash using tc.log
      2020-10-22 23:26:05 0 [Note] Starting crash recovery...
      2020-10-22 23:26:05 0 [Note] Crash recovery finished.
      2020-10-22 23:26:05 0 [Note] InnoDB: Buffer pool(s) load completed at 201022 23:26:05
      2020-10-22 23:26:05 0 [Note] Server socket created on IP: '::'.
      2020-10-22 23:26:05 0 [Note] Reading of all Master_info entries succeeded
      2020-10-22 23:26:05 0 [Note] Added new Master_info '' to hash table
      2020-10-22 23:26:05 0 [Note] /usr/libexec/mysqld: ready for connections.
      Version: '10.4.14-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Mik Mik
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.