Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.8.5, 10.9.4, 10.10.2
-
None
-
None
-
None
-
Windows 10.0.19045, WSL 2, Docker Desktop 4.5.1, official mariadb image, matching OQGraph plugin installed.
Description
Hi!
We've updated mariadb from 10.5.12 to 10.8.3 and experienced issues during initial migration of our application. In one migration, this query is executed for all out tables which are using InnoDB: `ALTER TABLE manager_tenant_db_t1.nlu CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;`. After a few of those queries (mostly about 4 to 5), the mariadb server crashes:
mariadb_1 | 2023-01-04 11:51:22 0x7fd2dc24f640 InnoDB: Assertion failure in file ./storage/innobase/dict/dict0dict.cc line 1870
|
mariadb_1 | InnoDB: Failing assertion: table->get_ref_count() == 0
|
mariadb_1 | InnoDB: We intentionally generate a memory trap.
|
mariadb_1 | InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
|
mariadb_1 | InnoDB: If you get repeated assertion failures or crashes, even
|
mariadb_1 | InnoDB: immediately after the mariadbd startup, there may be
|
mariadb_1 | InnoDB: corruption in the InnoDB tablespace. Please refer to
|
mariadb_1 | InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
|
mariadb_1 | InnoDB: about forcing recovery.
|
mariadb_1 | 230104 11:51:22 [ERROR] mysqld got signal 6 ;
|
mariadb_1 | This could be because you hit a bug. It is also possible that this binary
|
mariadb_1 | or one of the libraries it was linked against is corrupt, improperly built,
|
mariadb_1 | or misconfigured. This error can also be caused by malfunctioning hardware.
|
mariadb_1 |
|
mariadb_1 | To report this bug, see https://mariadb.com/kb/en/reporting-bugs
|
mariadb_1 |
|
mariadb_1 | We will try our best to scrape up some info that will hopefully help
|
mariadb_1 | diagnose the problem, but since we have already crashed,
|
mariadb_1 | something is definitely wrong and this may fail.
|
mariadb_1 |
|
mariadb_1 | Server version: 10.10.2-MariaDB-1:10.10.2+maria~ubu2204
|
mariadb_1 | key_buffer_size=134217728
|
mariadb_1 | read_buffer_size=131072
|
mariadb_1 | max_used_connections=3
|
mariadb_1 | max_threads=153
|
mariadb_1 | thread_count=3
|
mariadb_1 | It is possible that mysqld could use up to
|
mariadb_1 | key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468017 K bytes of memory
|
mariadb_1 | Hope that's ok; if not, decrease some variables in the equation.
|
mariadb_1 |
|
mariadb_1 | Thread pointer: 0x7fd2c8039a78
|
mariadb_1 | Attempting backtrace. You can use the following information to find out
|
mariadb_1 | where mysqld died. If you see no messages after this, something went
|
mariadb_1 | terribly wrong...
|
mariadb_1 | stack_bottom = 0x7fd2dc24ec78 thread_stack 0x49000
|
mariadb_1 | Printing to addr2line failed
|
mariadb_1 | mysqld(my_print_stacktrace+0x32)[0x5562d12d8e52]
|
mariadb_1 | mysqld(handle_fatal_signal+0x478)[0x5562d0da6cf8]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fd2f287a520]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7fd2f28cea7c]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7fd2f287a476]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7fd2f28607f3]
|
mariadb_1 | mysqld(+0x68a1c4)[0x5562d09cf1c4]
|
mariadb_1 | mysqld(+0x695536)[0x5562d09da536]
|
mariadb_1 | mysqld(+0xd6a546)[0x5562d10af546]
|
mariadb_1 | mysqld(_Z17mysql_alter_tableP3THDPK25st_mysql_const_lex_stringS3_P22Table_specification_stP10TABLE_LISTP10Alter_infojP8st_orderbb+0x4ff4)[0x5562d0c107f4]
|
mariadb_1 | mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x387)[0x5562d0c7f567]
|
mariadb_1 | mysqld(_Z21mysql_execute_commandP3THDb+0x4c09)[0x5562d0b541a9]
|
mariadb_1 | mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x5562d0b55437]
|
mariadb_1 | mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x14c5)[0x5562d0b57b85]
|
mariadb_1 | mysqld(_Z10do_commandP3THDb+0x138)[0x5562d0b59768]
|
mariadb_1 | mysqld(_Z24do_handle_one_connectionP7CONNECTb+0x3bf)[0x5562d0c7a5ef]
|
mariadb_1 | mysqld(handle_one_connection+0x5d)[0x5562d0c7a93d]
|
mariadb_1 | mysqld(+0xc8e796)[0x5562d0fd3796]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7fd2f28ccb43]
|
mariadb_1 | /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7fd2f295dbb4]
|
mariadb_1 |
|
mariadb_1 | Trying to get some variables.
|
mariadb_1 | Some pointers may be invalid and cause the dump to abort.
|
mariadb_1 | Query (0x7fd2c80484d0): ALTER TABLE manager_tenant_db_t1.nlu CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
|
mariadb_1 |
|
mariadb_1 | Connection ID (thread ID): 4
|
mariadb_1 | Status: NOT_KILLED
|
mariadb_1 |
|
mariadb_1 | 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
|
mariadb_1 |
|
mariadb_1 | The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
|
mariadb_1 | information that should help you find out what is causing the crash.
|
mariadb_1 | Writing a core file...
|
mariadb_1 | Working directory at /var/lib/mysql
|
mariadb_1 | Resource Limits:
|
mariadb_1 | Limit Soft Limit Hard Limit Units
|
mariadb_1 | Max cpu time unlimited unlimited seconds
|
mariadb_1 | Max file size unlimited unlimited bytes
|
mariadb_1 | Max data size unlimited unlimited bytes
|
mariadb_1 | Max stack size 8388608 unlimited bytes
|
mariadb_1 | Max core file size 0 unlimited bytes
|
mariadb_1 | Max resident set unlimited unlimited bytes
|
mariadb_1 | Max processes unlimited unlimited processes
|
mariadb_1 | Max open files 1048576 1048576 files
|
mariadb_1 | Max locked memory 83968000 83968000 bytes
|
mariadb_1 | Max address space unlimited unlimited bytes
|
mariadb_1 | Max file locks unlimited unlimited locks
|
mariadb_1 | Max pending signals 96143 96143 signals
|
mariadb_1 | Max msgqueue size 819200 819200 bytes
|
mariadb_1 | Max nice priority 0 0
|
mariadb_1 | Max realtime priority 0 0
|
mariadb_1 | Max realtime timeout unlimited unlimited us
|
mariadb_1 | Core pattern: core
|
mariadb_1 |
|
mariadb_1 | Kernel version: Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022
|
The table where it happens varies; it also includes tables without any data.
The server runs within docker-dompose inside the WSL, see the environment field above. We've tested newer versions of mariadb, namely 10.9.4 and 10.10.2, which show the same results. Switching to the same docker container running within native linux works perfectly fine, so we suspect that it might be an issue with WSL. As another symptom a #sql-backup-xx-xx.idb file is left over after the crash.
I've found this ticket (https://jira.mariadb.org/browse/MDEV-26381) which sounds similar alnd also points to issues within WSL, but is is a different assertion which fails. Maybe this helps.
My main problem currently is getting a minimal version to reproduce this error. While it fails in like 95% of the runs locally, I cannot get this reproduced by hand (committing the migration-transaction before the ALTER TABLE queries, restart the server after the crash and executing them manually via the mariadb client, ...) or get a minimal reproduceable example working. If I can help with more information about the error please hit me up with some steps I can follow.
Thank you very much for your support!