[MDEV-22784] Constant crash on creating indexes Created: 2020-06-03  Updated: 2020-06-03  Resolved: 2020-06-03

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.4.13
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Christopher Ritter Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: crash
Environment:

Arch Linux on Dell Inspiron Laptop


Attachments: File mariadb.log    
Issue Links:
Duplicate
duplicates MDEV-22563 Segfault on duplicate free of Item_f... Closed

 Description   

Been spending the better of part of the last few days scratching my head over this. Couldn't find related bugs in the DB here, but I could certainly have missed something. If this bug affects more than just me, I'd be very surprised if it wasn't brought up before or fixed in later versions.

I'm running MariaDB 10.4.13 on Arch Linux (the latest version in the Arch repo), InnoDB on my table, and am consistently crashing the database when attempting to create indexes/primary keys. I have removed a couple seemingly irrelevant lines from the log and changed the index/db/table/column names, but otherwise should be as-is. The log appears to be essentially the same for each crash. Downgrading to 10.4.12 seems to have fixed it for now, but for the longest time I had thought I was doing something wrong in my code and lost time on that. `mysqlcheck --all-databases` yielded no corrupt tables, but I deleted several random schemas that I had laying around just in case but to no avail. Connecting and executing queries via Flask-SQLAlchemy (v2.4.3, SQLAlchemy v1.3.17) engine, problem seemed to persist between DBAPI drivers, as well as directly running queries in MySQL Workbench.



 Comments   
Comment by Alice Sherepa [ 2020-06-03 ]

Thanks for the report!
It seems to be the same bug as MDEV-22563 (MDEV-22684), regression after 10.4.12, fixed in 10.4.14.
Perhaps the table has constraints and then creating index results in a crash:

MariaDB [test]> CREATE TABLE t1 ( i int, CONSTRAINT `c1` CHECK (i IN (0,1)));
Query OK, 0 rows affected (0.018 sec)
 
MariaDB [test]> CREATE INDEX `idx` ON t1 (i);
ERROR 2013 (HY000): Lost connection to MySQL server during query
 
Server version: 10.4.13-MariaDB
 
sql/item_cmpfunc.h:2414(Item_func_in::cleanup())[0x5570f7ead280]
sql/item.h:2183(Query_arena::free_items())[0x5570f7eaf57c]
sql/sql_class.cc:2281(THD::cleanup_after_query())[0x5570f7effe4c]
sql/sql_parse.cc:7943(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5570f7f024ee]
sql/sql_audit.h:169(mysql_audit_general)[0x5570f7f03d79]
sql/sql_parse.cc:1360(do_command(THD*))[0x5570f7fe2c8a]
sql/sql_connect.cc:1412(do_handle_one_connection(CONNECT*))[0x5570f7fe2d6d]
nptl/pthread_create.c:487(start_thread)[0x7f44bb184fa3]
x86_64/clone.S:97(clone)[0x7f44bad5e4cf]
 
Query (0x7f4448011980): CREATE INDEX `idx` ON t1 (i)

I am closing the bug, for now, in case it will appear in 10.4.14 please comment here and it will be reopened and investigated further.

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