[MDEV-25923] Memory not freed or Assertion `old_flags == ((my_flags & 0x10000U) ? 1 : 0)' failed in my_realloc upon ALTER on Aria table with GIS column Created: 2021-06-15  Updated: 2021-06-15

Status: Open
Project: MariaDB Server
Component/s: GIS, Storage Engine - Aria
Affects Version/s: 10.6
Fix Version/s: 10.6

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


 Description   

--source include/have_sequence.inc
 
CREATE TABLE t1 (pk INT PRIMARY KEY, a POINT DEFAULT ST_GEOMFROMTEXT('Point(1 1)')) ENGINE=Aria;
INSERT INTO t1 (pk) SELECT seq FROM seq_1_to_100;
 
SET SESSION ARIA_REPAIR_THREADS= 2;
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
 
# Cleanup
DROP TABLE t1;

10.6 193bfdd8 debug

mariadbd: /data/src/10.6/mysys/my_malloc.c:148: my_realloc: Assertion `old_flags == ((my_flags & 0x10000U) ? 1 : 0)' failed.
210615 11:30:08 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f1f3cbf9f36 in __GI___assert_fail (assertion=0x561dd490de20 "old_flags == ((my_flags & 0x10000U) ? 1 : 0)", file=0x561dd490dce0 "/data/src/10.6/mysys/my_malloc.c", line=148, function=0x561dd490de78 <__PRETTY_FUNCTION__.15053> "my_realloc") at assert.c:101
#8  0x0000561dd4398f01 in my_realloc (key=0, old_point=0x7f1f1c082958, size=131, my_flags=64) at /data/src/10.6/mysys/my_malloc.c:148
#9  0x0000561dd3d5eaa3 in _ma_alloc_buffer (old_addr=0x7f1f1c082598, old_size=0x7f1f1c082860, new_size=131, flag=0) at /data/src/10.6/storage/maria/ma_open.c:1253
#10 0x0000561dd3dbb59d in sort_get_next_record (sort_param=0x7f1f1c0820c8) at /data/src/10.6/storage/maria/ma_check.c:5248
#11 0x0000561dd3dba161 in sort_key_read (sort_param=0x7f1f1c0820c8, key=0x7f1f200010e8 '\245' <repeats 200 times>...) at /data/src/10.6/storage/maria/ma_check.c:4811
#12 0x0000561dd3dc3b54 in _ma_thr_find_all_keys_exec (sort_param=0x7f1f1c0820c8) at /data/src/10.6/storage/maria/ma_sort.c:471
#13 0x0000561dd3dc3cdc in _ma_thr_find_all_keys (arg=0x7f1f1c0820c8) at /data/src/10.6/storage/maria/ma_sort.c:526
#14 0x0000561dd3e08ed9 in pfs_spawn_thread (arg=0x561dd799aab8) at /data/src/10.6/storage/perfschema/pfs.cc:2201
#15 0x00007f1f3d111609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x00007f1f3cce5293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.6 193bfdd8 non-debug

Warning: Memory not freed: 16

The failure apparently appeared in 10.6 after this commit:

commit cc125bebfe9d06870cf1b66bd42c730398c8aa30
Author: Monty <monty@mariadb.org>
Date:   Wed Apr 14 13:40:36 2021 +0300
 
    Fix all warnings given by UBSAN


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