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

Upgrade from MySQL 5.7 to MariaDB 11.4.2 leads to crash

    XMLWordPrintable

Details

    Description

      For our MariaDB 11.4 presentation at FrOSCon 2024 we did a physical test upgrade of one of our MySQL 5.7 databases and it miserably failed.

      Steps to reproduce:

      • Stop MariaDB 11.4 and MySQL 5.7
      • Copy over the data
      • Start MariaDB 11.4
      • run mariadb-upgrade --user=root --force -> successful
      • run mariadb-upgrade --uer=root --force again -> failed
        ...
        mariadb-check: Got error: 2026: TLS/SSL error: The TLS connection was non-properly terminated. when executing 'CHECK TABLE ... FOR UPGRADE'
        FATAL ERROR: Upgrade failed

      MariaDB error log:

      2024-08-05 16:12:40 0 [Note] Starting MariaDB 11.4.2-MariaDB-log source revision 3fca5ed772fb75e3e57c507edef2985f8eba5b12 as process 504543
      2024-08-05 16:12:40 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
      2024-08-05 16:12:40 0 [Note] InnoDB: Number of transaction pools: 1
      2024-08-05 16:12:40 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
      2024-08-05 16:12:40 0 [Note] InnoDB: Using Linux native AIO
      2024-08-05 16:12:40 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
      2024-08-05 16:12:40 0 [Note] InnoDB: Completed initialization of buffer pool
      2024-08-05 16:12:40 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
      2024-08-05 16:12:40 0 [Note] InnoDB: Upgrading redo log: 256.000MiB; LSN=39606720606
      2024-08-05 16:12:40 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
      2024-08-05 16:12:40 0 [Note] InnoDB: Upgrading the change buffer
      2024-08-05 16:12:42 0 [Note] InnoDB: Upgraded the change buffer: 0 tablespaces, 0 pages
      2024-08-05 16:12:42 0 [Note] InnoDB: Reinitializing innodb_undo_tablespaces= 3 from 0
      2024-08-05 16:12:42 0 [Note] InnoDB: Data file .//undo001 did not exist: new to be created
      2024-08-05 16:12:42 0 [Note] InnoDB: Setting file .//undo001 size to 10.000MiB
      2024-08-05 16:12:42 0 [Note] InnoDB: Database physically writes the file full: wait...
      2024-08-05 16:12:42 0 [Note] InnoDB: Data file .//undo002 did not exist: new to be created
      2024-08-05 16:12:42 0 [Note] InnoDB: Setting file .//undo002 size to 10.000MiB
      2024-08-05 16:12:42 0 [Note] InnoDB: Database physically writes the file full: wait...
      2024-08-05 16:12:42 0 [Note] InnoDB: Data file .//undo003 did not exist: new to be created
      2024-08-05 16:12:42 0 [Note] InnoDB: Setting file .//undo003 size to 10.000MiB
      2024-08-05 16:12:42 0 [Note] InnoDB: Database physically writes the file full: wait...
      2024-08-05 16:12:42 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
      2024-08-05 16:12:42 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
      2024-08-05 16:12:42 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
      2024-08-05 16:12:42 0 [Note] InnoDB: log sequence number 39606720606; transaction id 28108546
      2024-08-05 16:12:42 0 [Note] InnoDB: Loading buffer pool(s) from /home/mysql/database/mariadb-114/data/ib_buffer_pool
      2024-08-05 16:12:42 0 [Note] Plugin 'FEEDBACK' is disabled.
      2024-08-05 16:12:42 0 [Note] Plugin 'wsrep-provider' is disabled.
      2024-08-05 16:12:42 0 [Note] Recovering after a crash using /home/mysql/database/mariadb-114/binlog/chef_mariadb-114_binlog
      2024-08-05 16:12:42 0 [Note] Starting table crash recovery...
      2024-08-05 16:12:42 0 [Note] Crash table recovery finished.
      2024-08-05 16:12:42 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
      2024-08-05 16:12:42 0 [Note] InnoDB: Buffer pool(s) load completed at 240805 16:12:42
      2024-08-05 16:12:44 0 [Note] Server socket created on IP: '0.0.0.0'.
      2024-08-05 16:12:44 0 [Note] Server socket created on IP: '::'.
      2024-08-05 16:12:44 0 [ERROR] Missing system table mysql.roles_mapping; please run mysql_upgrade to create it
      2024-08-05 16:12:44 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(93).
      2024-08-05 16:12:44 0 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_B
      2024-08-05 16:12:44 0 [ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
      2024-08-05 16:12:44 2 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
      2024-08-05 16:12:44 0 [Note] bin/mariadbd: ready for connections.
      Version: '11.4.2-MariaDB-log'  socket: '/run/mariadb/mariadb-3358.sock'  port: 3358  MariaDB Server
      2024-08-05 16:12:45 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
      2024-08-05 16:13:11 13 [Note] mariadbd: Event Scheduler: Loaded 0 events
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 32 on table `crm`.`campaign_trkrs` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 31 on table `crm`.`campaigns` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1 on table `crm`.`cases` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 8985 on table `crm`.`prospects` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 35442 on table `crm`.`tracker` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1526 on table `test`.`employee` (created with version 50741)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1 on table `test`.`jsonptntest#P#p_2021` (created with version 50741)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 2 on table `test`.`jsonptntest#P#p_2022` (created with version 50741)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 3 on table `test`.`jsonptntest#P#p_2023` (created with version 50741)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1310693 on table `test`.`t1` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1048576 on table `test`.`t2` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 1048576 on table `test`.`t3` (created with version 50744)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 10 on table `test`.`team` (created with version 50741)
      2024-08-05 16:13:21 16 [Note] InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 2424796 on table `test`.`test` (created with version 50741)
      2024-08-05 16:13:36 26 [ERROR] mariadbd: Table rebuild required. Please do "ALTER TABLE `test.jsonptntest` FORCE" or dump/reload to fix it!
      240805 16:13:51 [ERROR] mysqld 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
       
      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: 11.4.2-MariaDB-log source revision: 3fca5ed772fb75e3e57c507edef2985f8eba5b12
      key_buffer_size=8388608
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 345186 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fb8b8000c68
      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 = 0x7fb8f811bc80 thread_stack 0x49000
      addr2line: 'bin/mariadbd': No such file
      Printing to addr2line failed
      bin/mariadbd(my_print_stacktrace+0x2e)[0x5a9492ae04e]
      bin/mariadbd(handle_fatal_signal+0x2f7)[0x55a948cf1f47]
      libc_sigaction.c:0(__restore_rt)[0x7fb90e7ac520]
      addr2line: 'bin/mariadbd': No such file
      bin/mariadbd(_Z8closefrmP5TABLE+0xa0)[0x55a948b733d0]
      bin/mariadbd(+0xa6cb76)[0x55a948c6cb76]
      bin/mariadbd(_Z19close_thread_tablesP3THD+0x1db)[0x55a948a2357b]
      bin/mariadbd(+0x9bcf73)[0x55a948bbcf73]
      bin/mariadbd(_ZN19Sql_cmd_check_table7executeEP3THD+0xae)[0x55a948bbe98e]
      bin/mariadbd(_Z21mysql_execute_commandP3THDb+0x1bac)[0x55a948a988ac]
      bin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x20b)[0x55a948a9bbbb]
      bin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x1654)[0x55a948a9e1b4]
      bin/mariadbd(_Z10do_commandP3THDb+0x123)[0x55a948a9f5f3]
      bin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x187)[0x55a948bafa37]
      bin/mariadbd(handle_one_connection+0x34)[0x55a948bafcd4]
      bin/mariadbd(+0xd48f4c)[0x55a948f48f4c]
      nptl/pthread_create.c:442(start_thread)[0x7fb90e7feac3]
      x86_64/clone3.S:83(__clone3)[0x7fb90e890850]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fb8b801bb50): CHECK TABLE `jsonptntest`  FOR UPGRADE
       
      Connection ID (thread ID): 30
      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,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,hash_join_cardinality=on,cset_narrowing=off,sargable_casefold=on
       
      The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/ contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /home/mysql/database/mariadb-114/data
      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        0                    0                    bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             62207                62207                processes 
      Max open files            64186                64186                files     
      Max locked memory         2054037504           2054037504           bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       62207                62207                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/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E
       
      Kernel version: Linux version 5.15.0-117-generic (buildd@lcy02-amd64-102) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024
      

      We could repeat the crash 3 times in a row.

      tar.gz of database can be provided on demand (500 M).

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              oli Oli Sennhauser
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.