[MDEV-10945] Assertion failed: ! is_set() with status KILL_BAD_DATA upon ALTER or REPLACE Created: 2016-10-03  Updated: 2021-04-03  Resolved: 2021-04-03

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-10710 [Draft] Assertion failed: ! is_set() ... Closed

 Description   

CREATE TABLE t1 (f INT) ENGINE=MyISAM TRANSACTIONAL 0;
SET SQL_MODE= 'STRICT_ALL_TABLES';
ALTER TABLE t1 ADD CONSTRAINT CHECK (f != 0);
 
# Cleanup
DROP TABLE t1;

10.1 243f829c

mysqld: /data/src/10.1/sql/sql_error.cc:378: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `! is_set()' failed.
190228 13:12:32 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f90822c7ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000555acd5678de in Diagnostics_area::set_ok_status (this=0x7f907b0da010, affected_rows=0, last_insert_id=0, message=0x7f9084348750 "Records: 0  Duplicates: 0  Warnings: 1") at /data/src/10.1/sql/sql_error.cc:378
#9  0x0000555acd5201bd in my_ok (thd=0x7f907b0d5070, affected_rows=0, id=0, message=0x7f9084348750 "Records: 0  Duplicates: 0  Warnings: 1") at /data/src/10.1/sql/sql_class.h:4193
#10 0x0000555acd65ada6 in mysql_alter_table (thd=0x7f907b0d5070, new_db=0x7f9079443780 "test", new_name=0x0, create_info=0x7f9084349300, table_list=0x7f9079443190, alter_info=0x7f9084349270, order_num=0, order=0x0, ignore=false) at /data/src/10.1/sql/sql_table.cc:9397
#11 0x0000555acd6cb84f in Sql_cmd_alter_table::execute (this=0x7f9079443a80, thd=0x7f907b0d5070) at /data/src/10.1/sql/sql_alter.cc:330
#12 0x0000555acd599de5 in mysql_execute_command (thd=0x7f907b0d5070) at /data/src/10.1/sql/sql_parse.cc:5701
#13 0x0000555acd59e689 in mysql_parse (thd=0x7f907b0d5070, rawbuf=0x7f9079443088 "ALTER TABLE t1 ADD CONSTRAINT CHECK (f != 0)", length=44, parser_state=0x7f908434a5e0) at /data/src/10.1/sql/sql_parse.cc:7468
#14 0x0000555acd58ceda in dispatch_command (command=COM_QUERY, thd=0x7f907b0d5070, packet=0x7f907dbf9071 "ALTER TABLE t1 ADD CONSTRAINT CHECK (f != 0)", packet_length=44) at /data/src/10.1/sql/sql_parse.cc:1496
#15 0x0000555acd58bc53 in do_command (thd=0x7f907b0d5070) at /data/src/10.1/sql/sql_parse.cc:1124
#16 0x0000555acd6c6d8a in do_handle_one_connection (thd_arg=0x7f907b0d5070) at /data/src/10.1/sql/sql_connect.cc:1330
#17 0x0000555acd6c6aee in handle_one_connection (arg=0x7f907b0d5070) at /data/src/10.1/sql/sql_connect.cc:1242
#18 0x0000555acda85580 in pfs_spawn_thread (arg=0x7f9081839ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
#19 0x00007f9083fcb494 in start_thread (arg=0x7f908434bb00) at pthread_create.c:333
#20 0x00007f908238493f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible with MyISAM and InnoDB.
No obvious disasters on a non-debug build, the ALTER gets rejected with

mysqltest: At line 3: query 'ALTER TABLE t1 ADD CONSTRAINT CHECK (f != 0)' failed: 1478: Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'

It has also been observed in tests upon REPLACE:

Assertion failed: ! is_set(), file E:\buildbot\bbwin1\win-rqg-se\build-debug\sql\sql_error.cc, line 378
R6010
- abort() has been called
160930  2:16:17 [ERROR] mysqld got exception 0x80000003 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
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: 10.0.28-MariaDB-debug
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=7
max_threads=501
thread_count=6
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 196100 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x4136787228
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...
mysqld.exe!my_sigabrt_handler()[my_thr_init.c:477]
mysqld.exe!raise()[winsig.c:594]
mysqld.exe!abort()[abort.c:82]
mysqld.exe!_wassert()[assert.c:380]
mysqld.exe!Diagnostics_area::set_ok_status()[sql_error.cc:378]
mysqld.exe!my_ok()[sql_class.h:3831]
mysqld.exe!mysql_insert()[sql_insert.cc:1115]
mysqld.exe!mysql_execute_command()[sql_parse.cc:3450]
mysqld.exe!mysql_parse()[sql_parse.cc:6576]
mysqld.exe!dispatch_command()[sql_parse.cc:1312]
mysqld.exe!do_command()[sql_parse.cc:999]
mysqld.exe!threadpool_process_request()[threadpool_common.cc:239]
mysqld.exe!io_completion_callback()[threadpool_win.cc:568]
KERNEL32.DLL!VirtualUnlock()
ntdll.dll!RtlGetActiveActivationContext()
ntdll.dll!RtlFreeUnicodeString()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x41366b89f0): REPLACE INTO view3 SET field2 = 4, field1 = NULL /* QUERY_NO 264535 CON_ID 14 */
Connection ID (thread ID): 14
Status: KILL_BAD_DATA



 Comments   
Comment by Elena Stepanova [ 2017-06-22 ]

Fresh occurrence on 10.1:
http://buildbot.askmonty.org/buildbot/builders/qa-win-debug/builds/112/steps/crash_tests/logs/stdio

Comment by Elena Stepanova [ 2021-04-03 ]

Closing since 10.2+ refuse to create the table due to an unsupported option, and 10.1 is already EOL.

Generated at Thu Feb 08 07:46:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.