[MDEV-26074] Assertion `!is_thread_specific || (mysqld_server_initialized && thd)' failed upon OPTIMIZE on Aria table Created: 2021-07-01  Updated: 2024-01-25

Status: Open
Project: MariaDB Server
Component/s: Full-text Search, Storage Engine - Aria
Affects Version/s: 10.6, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: regression


 Description   

SET ARIA_REPAIR_THREADS= 2;
CREATE TABLE t (f CHAR(8), FULLTEXT KEY(f)) ENGINE=Aria ROW_FORMAT=DYNAMIC;
INSERT INTO t VALUES ('foo'),('bar'),('baz');
DELETE FROM t LIMIT 1;
OPTIMIZE TABLE t;
 
# Cleanup
DROP TABLE t;

10.6 add782a1

mariadbd: /data/src/10.6/sql/mysqld.cc:3619: void my_malloc_size_cb_func(long long int, my_bool): Assertion `!is_thread_specific || (mysqld_server_initialized && thd)' failed.
210701 19:00:36 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f6da7d86f36 in __GI___assert_fail (assertion=0x55bae7cdb998 "!is_thread_specific || (mysqld_server_initialized && thd)", file=0x55bae7cda156 "/data/src/10.6/sql/mysqld.cc", line=3619, function=0x55bae7cdb9d8 "void my_malloc_size_cb_func(long long int, my_bool)") at assert.c:101
#8  0x000055bae6df8726 in my_malloc_size_cb_func (size=65520, is_thread_specific=1 '\001') at /data/src/10.6/sql/mysqld.cc:3619
#9  0x000055bae7c03fef in my_malloc (key=0, size=65496, my_flags=69648) at /data/src/10.6/mysys/my_malloc.c:108
#10 0x000055bae7bf64a4 in alloc_root (mem_root=0x7f6d90081ca0, length=24) at /data/src/10.6/mysys/my_alloc.c:244
#11 0x000055bae7577493 in maria_ft_linearize (wtree=0x7f6da1cbc9e0, mem_root=0x7f6d90081ca0) at /data/src/10.6/storage/maria/ma_ft_parser.c:57
#12 0x000055bae762bbbd in _ma_ft_parserecord (info=0x7f6d901a3d68, keynr=0, record=0x7f6d90081f90 "\376bar     ", mem_root=0x7f6d90081ca0) at /data/src/10.6/storage/maria/ma_ft_update.c:133
#13 0x000055bae7624a1f in sort_maria_ft_key_read (sort_param=0x7f6d900817b8, key=0x7f6d84000de0 '\245' <repeats 200 times>...) at /data/src/10.6/storage/maria/ma_check.c:4859
#14 0x000055bae762e1e3 in _ma_thr_find_all_keys_exec (sort_param=0x7f6d900817b8) at /data/src/10.6/storage/maria/ma_sort.c:471
#15 0x000055bae762e36b in _ma_thr_find_all_keys (arg=0x7f6d900817b8) at /data/src/10.6/storage/maria/ma_sort.c:526
#16 0x000055bae7673567 in pfs_spawn_thread (arg=0x55baeab07808) at /data/src/10.6/storage/perfschema/pfs.cc:2201
#17 0x00007f6da829f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00007f6da7e72293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Not reproducible on 10.5.
No obvious problem on a non-debug build.

The failure started happening on 10.6 after this commit:

commit cc125bebfe9d06870cf1b66bd42c730398c8aa30
Author: Monty
Date:   Wed Apr 14 13:40:36 2021 +0300
 
    Fix all warnings given by UBSAN


Generated at Thu Feb 08 09:42:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.