[MDEV-15883] [Draft] Assertion failed: 0 in field.cc, store_lowendian() called by Field_enum::store_type() called by Field_set::store() called by Column_stat::get_stat_values() on INSERT Created: 2012-12-24  Updated: 2020-10-18  Resolved: 2020-10-18

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Incomplete Votes: 0
Labels: None

Attachments: HTML File threads    
Issue Links:
Relates

 Description   

Assertion failed: 0, file field.cc, line 4779
R6010
- abort() has been called
 
[ERROR] mysqld got exception 0x80000003 ;
...
Server version: 10.0.0-MariaDB-debug-log
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=9
max_threads=501
thread_count=8
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 195304 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x162fdc80
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:504]
mysqld.exe!raise()[winsig.c:593]
mysqld.exe!abort()[abort.c:81]
mysqld.exe!_wassert()[assert.c:336]
mysqld.exe!store_lowendian()[field.cc:4779]
mysqld.exe!Field_enum::store_type()[field.cc:7646]
mysqld.exe!Field_set::store()[field.cc:7870]
mysqld.exe!Column_stat::get_stat_values()[sql_statistics.cc:1013]
mysqld.exe!read_statistics_for_table()[sql_statistics.cc:2380]
mysqld.exe!read_statistics_for_tables_if_needed()[sql_statistics.cc:2571]
mysqld.exe!open_and_lock_tables()[sql_base.cc:5615]
mysqld.exe!open_and_lock_tables()[sql_base.h:501]
mysqld.exe!mysql_insert()[sql_insert.cc:729]
mysqld.exe!mysql_execute_command()[sql_parse.cc:3054]
mysqld.exe!mysql_parse()[sql_parse.cc:5874]
mysqld.exe!dispatch_command()[sql_parse.cc:1075]
mysqld.exe!do_command()[sql_parse.cc:811]
mysqld.exe!threadpool_process_request()[threadpool_common.cc:225]
mysqld.exe!io_completion_callback()[threadpool_win.cc:568]
KERNEL32.DLL!GetThreadInformation()
ntdll.dll!RtlpUnWaitCriticalSection()
ntdll.dll!RtlCompareUnicodeString()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x15e71798): INSERT INTO `table10_aria` ( `pk` ) VALUES ( NULL )
Connection ID (thread ID): 15
Status: NOT_KILLED
 
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=off,table_elimination=on,extended_keys=off

10.0-base Revno: 3456
10.0-base Revision-Id: igor@askmonty.org-20121220031551-p2jlpfxvagh4mlrw

rqg-mariadb Revno: 1001
mariadb-toolbox Revno: 78

1st occasion:

RQG command line: C:\elenst\rqg-mariadb/runall.pl --queries=100000000 --no-mask --seed=time --threads=6 --duration=400 --queries=100M --reporters=QueryTimeout,Backtrace,ErrorLog,Deadlock,Shutdown --redefine=c:/elenst/mariadb-toolbox/grammars/general-workarounds.yy --redefine=c:/elenst/mariadb-toolbox/grammars/mdev-3806-redefine.yy --mysqld=--use-stat-tables=preferably --views --grammar=conf/replication/replication.yy --gendata=conf/replication/replication-5.1.zz --engine=Aria --rpl_mode=row --mysqld=--slave-skip-errors=1049,1305,1539,1505 --mysqld=--log-output=FILE,TABLE --mtr-build-thread=300 --mask=38649 --basedir1=c:/elenst/10.0-base --vardir1=c:/elenst/test_results/mdev-3806-general-6/current1_1
 
RQG seed: 1356112623
 
Log location: C:\elenst\test_results\mdev-3806-general-6\vardir1_169

2nd occasion:

C:\elenst\rqg-mariadb/runall.pl --queries=100000000 --no-mask --seed=time --threads=6 --duration=400 --queries=100M --reporters=QueryTimeout,Backtrace,ErrorLog,Deadlock,Shutdown --redefine=c:/elenst/mariadb-toolbox/grammars/general-workarounds.yy --redefine=c:/elenst/mariadb-toolbox/grammars/mdev-3806-redefine.yy --mysqld=--use-stat-tables=preferably --views --grammar=conf/replication/replication.yy --gendata=conf/replication/replication-5.1.zz --engine=MyISAM --rpl_mode=statement --mysqld=--slave-skip-errors=1054,1317,1049,1305,1539,1505 --mysqld=--log-output=FILE --mtr-build-thread=300 --mask=48154 --basedir1=c:/elenst/10.0-base --vardir1=c:/elenst/test_results/mdev-3806-general-6/current1_1
 
RQG seed: 1356111393
 
Log location: C:\elenst\test_results\mdev-3806-general-6\vardir1_164



 Comments   
Comment by Elena Stepanova [ 2013-01-12 ]

Didn't observe the issue during the last run on 10.0-base revno 3458, it was either fixed along with MDEV-3979, or is masked by MDEV-4019. I will need to re-check it when/if MDEV-4019 is fixed.

Comment by Elena Stepanova [ 2014-12-09 ]

Can't reproduce on the current 10.0 tree (10.0.15+)

Comment by Elena Stepanova [ 2018-04-16 ]

The problem suddenly appeared again (once so far) on 10.3 tree:

10.3 560743198604c

mysqld: /data/src/10.3/sql/field.cc:5382: void store_lowendian(ulonglong, uchar*, uint): Assertion `0' failed.
180416 16:00:56 [ERROR] mysqld got signal 6 ;
 
Query (0x7f26d40bf670): INSERT INTO testdb_N.t1_base2_N SELECT * FROM test.table0_int_autoinc /* QNO 9342 CON_ID 16 */
Connection ID (thread ID): 107
Status: NOT_KILLED
 
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=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on

#7  0x00007f275d3e2ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055bcbd3ed813 in store_lowendian (num=1, to=0x7f26d408947a "", bytes=3557332512) at /data/src/10.3/sql/field.cc:5382
#9  0x000055bcbd3f8bd9 in Field_blob::store_length (this=0x7f26d40895d0, i_ptr=0x7f26d408947a "", i_packlength=3557332512, i_number=1) at /data/src/10.3/sql/field.cc:8142
#10 0x000055bcbd408dba in Field_blob::store_length (this=0x7f26d40895d0, number=1) at /data/src/10.3/sql/field.h:3552
#11 0x000055bcbd3f93ef in Field_blob::store (this=0x7f26d40895d0, from=0x7f26d40b1f48 "1X\v\324&\177", length=1, cs=0x55bcbe6bbfc0 <my_charset_bin>) at /data/src/10.3/sql/field.cc:8229
#12 0x000055bcbd408b5d in Field_blob::store_field (this=0x7f26d40895d0, from=0x7f26e84d9340) at /data/src/10.3/sql/field.h:3498
#13 0x000055bcbd40d923 in field_conv_incompatible (to=0x7f26d40895d0, from=0x7f26e84d9340) at /data/src/10.3/sql/field_conv.cc:835
#14 0x000055bcbd40d97f in field_conv (to=0x7f26d40895d0, from=0x7f26e84d9340) at /data/src/10.3/sql/field_conv.cc:848
#15 0x000055bcbd440ea5 in save_field_in_field (from=0x7f26e84d9340, null_value=0x7f26d40c07e6, to=0x7f26d40895d0, no_conversions=false) at /data/src/10.3/sql/item.cc:6838
#16 0x000055bcbd4410ac in Item_field::save_in_field (this=0x7f26d40c0770, to=0x7f26d40895d0, no_conversions=false) at /data/src/10.3/sql/item.cc:6884
#17 0x000055bcbd0b8900 in fill_record (thd=0x7f26d4000b00, table=0x7f26d40bb8f0, ptr=0x7f26d40894c8, values=..., ignore_errors=true, use_value=false) at /data/src/10.3/sql/sql_base.cc:8458
#18 0x000055bcbd0b8b53 in fill_record_n_invoke_before_triggers (thd=0x7f26d4000b00, table=0x7f26d40bb8f0, ptr=0x7f26d40894b8, values=..., ignore_errors=true, event=TRG_EVENT_INSERT) at /data/src/10.3/sql/sql_base.cc:8511
#19 0x000055bcbd10305a in select_insert::store_values (this=0x7f26d4013988, values=...) at /data/src/10.3/sql/sql_insert.cc:3900
#20 0x000055bcbd102cfc in select_insert::send_data (this=0x7f26d4013988, values=...) at /data/src/10.3/sql/sql_insert.cc:3832
#21 0x000055bcbd1ac76e in end_send (join=0x7f26d4013a30, join_tab=0x7f26d4014d50, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20364
#22 0x000055bcbd1aa0d3 in evaluate_join_record (join=0x7f26d4013a30, join_tab=0x7f26d40149a0, error=0) at /data/src/10.3/sql/sql_select.cc:19415
#23 0x000055bcbd1a99e4 in sub_select (join=0x7f26d4013a30, join_tab=0x7f26d40149a0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19195
#24 0x000055bcbd1a8f4d in do_select (join=0x7f26d4013a30, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18735
#25 0x000055bcbd181f9c in JOIN::exec_inner (this=0x7f26d4013a30) at /data/src/10.3/sql/sql_select.cc:3953
#26 0x000055bcbd181434 in JOIN::exec (this=0x7f26d4013a30) at /data/src/10.3/sql/sql_select.cc:3747
#27 0x000055bcbd182675 in mysql_select (thd=0x7f26d4000b00, tables=0x7f26d40bffc8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=553245739776, result=0x7f26d4013988, unit=0x7f26d40bdfc0, select_lex=0x7f26d40be738) at /data/src/10.3/sql/sql_select.cc:4152
#28 0x000055bcbd174bcf in handle_select (thd=0x7f26d4000b00, lex=0x7f26d40bdef8, result=0x7f26d4013988, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:382
#29 0x000055bcbd139b51 in mysql_execute_command (thd=0x7f26d4000b00) at /data/src/10.3/sql/sql_parse.cc:4831
#30 0x000055bcbd16141e in Prepared_statement::execute (this=0x7f26d4044b20, expanded_query=0x7f27443ea3a0, open_cursor=false) at /data/src/10.3/sql/sql_prepare.cc:4740
#31 0x000055bcbd15f833 in Prepared_statement::execute_loop (this=0x7f26d4044b20, expanded_query=0x7f27443ea3a0, open_cursor=false, packet=0x7f26d400b16a "", packet_end=0x7f26d400b16a "") at /data/src/10.3/sql/sql_prepare.cc:4170
#32 0x000055bcbd15d092 in mysql_stmt_execute_common (thd=0x7f26d4000b00, stmt_id=6961, packet=0x7f26d400b16a "", packet_end=0x7f26d400b16a "", cursor_flags=0, bulk_op=false, read_types=false) at /data/src/10.3/sql/sql_prepare.cc:3170
#33 0x000055bcbd15cc2b in mysqld_stmt_execute (thd=0x7f26d4000b00, packet_arg=0x7f26d400b161 "1\033", packet_length=9) at /data/src/10.3/sql/sql_prepare.cc:3068
#34 0x000055bcbd130f1c in dispatch_command (command=COM_STMT_EXECUTE, thd=0x7f26d4000b00, packet=0x7f26d400b161 "1\033", packet_length=9, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1788
#35 0x000055bcbd12fcfa in do_command (thd=0x7f26d4000b00) at /data/src/10.3/sql/sql_parse.cc:1391
#36 0x000055bcbd29278b in do_handle_one_connection (connect=0x55bcc074d420) at /data/src/10.3/sql/sql_connect.cc:1402
#37 0x000055bcbd292518 in handle_one_connection (arg=0x55bcc074d420) at /data/src/10.3/sql/sql_connect.cc:1308
#38 0x00007f275f0b9494 in start_thread (arg=0x7f27443eb700) at pthread_create.c:333
#39 0x00007f275d49f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

threads

experimental 75de94b07db42

perl ./runall-new.pl --duration=350 --threads=6 --seed=1523797457 --reporters=Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --views --redefine=conf/mariadb/versioning.yy --redefine=conf/mariadb/alter_table.yy --redefine=conf/mariadb/bulk_insert.yy --redefine=conf/mariadb/sequences.yy --basedir=/data/bld/10.3 --mysqld=--log_output=FILE --mysqld=--max-statement-time=30 --mysqld=--lock-wait-timeout=10 --mysqld=--loose-innodb-lock-wait-timeout=5 --mysqld=--loose-debug_assert_on_not_freed_memory=0 --grammar=conf/runtime/connect_kill_sql.yy --gendata=conf/runtime/connect_kill_data.zz --ps-protocol --transformers=ExecuteAsCTE,ExecuteAsDeleteReturning,ExecuteAsExcept,ExecuteAsInsertSelect,ExecuteAsIntersect,ExecuteAsUnion,ExecuteAsUpdateDelete,ExecuteAsView,ExecuteAsSPTwice --vardir=/dev/shm/vardir3

Comment by Elena Stepanova [ 2020-10-18 ]

Haven't been seen since then, closing again, till the next re-appearance (hopefully with the general log and everything).

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