[MDEV-17991] [Draft] SIGSEGV in Lex_input_stream::body_utf8_start after OOM Created: 2018-12-12  Updated: 2023-11-28  Resolved: 2023-11-28

Status: Closed
Project: MariaDB Server
Component/s: Parser, Server
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: N/A

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


 Description   

Note: I'm not going to pursue it now since it probably wouldn't be a priority for fixing anyway (doesn't matter one way or another server crashes upon OOM); but it might be useful for searching purposes, and besides we might want to get back to it some time in future.

https://travis-ci.org/elenst/travis-tests/jobs/466795082

elenst-jira-refs 355fc65bef8caec4cde7149e9c534ca37cd996c7

perl ./runall-new.pl --basedir=/home/travis/server --vardir=/home/travis/logs/vardir --duration=350 --threads=6 --seed=1544626934 --reporters=Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --views --redefine=conf/mariadb/alter_table.yy --redefine=conf/mariadb/sp.yy --redefine=conf/mariadb/bulk_insert.yy --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/replication/replication-dml_sql.yy --gendata=conf/replication/replication-dml_data.zz --mysqld=--log_bin_trust_function_creators=1 --grammar=conf/replication/replication-dml_sql.yy --gendata=conf/replication/replication-dml_data.zz --mysqld=--log-bin --transformers=ExecuteAsDeleteReturning,ExecuteAsInsertSelect,ExecuteAsUnion,ExecuteAsUpdateDelete,ExecuteAsView,ExecuteAsPreparedTwice --redefine=conf/mariadb/general-workarounds.yy

10.1 f77f8f6d1a5f4846766a8aab00a9e1e5f41909a1

2018-12-12 15:05:34 140481337395968 [ERROR] InnoDB: The total blob data length (16776438) is greater than 10% of the total redo log size (100663296). Please increase total redo log size.
2018-12-12 15:05:56 140481337092864 [ERROR] mysqld: Out of memory (Needed 100665080 bytes)
2018-12-12 15:05:56 140481337092864 [ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
181212 15:05:56 [ERROR] mysqld got signal 11 ;
 
#3  <signal handler called>
#4  0x000055ae1089190c in Lex_input_stream::body_utf8_start (this=0x7fc45c319738, thd=0x55ae14613750, begin_ptr=0x7fc3e40000f2 "BEGIN ", '\245' <repeats 194 times>...) at /home/travis/src/sql/sql_lex.cc:331
#5  0x000055ae10c3b1e9 in sp_head::set_body_start (this=0x7fc42803ac78, thd=0x55ae14613750, begin_ptr=0x7fc3e40000f2 "BEGIN ", '\245' <repeats 194 times>...) at /home/travis/src/sql/sp_head.cc:717
#6  0x000055ae10aa2382 in MYSQLparse (thd=0x55ae14613750) at /home/travis/src/sql/sql_yacc.yy:16144
#7  0x000055ae108b8058 in parse_sql (thd=0x55ae14613750, parser_state=0x7fc45c319730, creation_ctx=0x7fc4280f8350, do_pfs_digest=false) at /home/travis/src/sql/sql_parse.cc:9442
#8  0x000055ae10c34a80 in sp_compile (thd=0x55ae14613750, defstr=0x7fc45c3199c0, sql_mode=1342177280, creation_ctx=0x7fc4280f8350) at /home/travis/src/sql/sp.cc:754
#9  0x000055ae10c34ecb in db_load_routine (thd=0x55ae14613750, type=TYPE_ENUM_PROCEDURE, name=0x7fc45c31b5d0, sphp=0x7fc45c31b7f8, sql_mode=1342177280, params=0x55ae112f3828 "", returns=0x55ae112f3828 "", body=0x7fc4282847d8 "BEGIN /* BEGIN 1 */ COMMIT ; INSERT INTO test.table0_myisam_int_autoinc /* table0 table0_myisam table1_innodb */ ( `col_varchar_utf8`, col_tinyint ) VALUES ( 'trust tip estate instead united better ca"..., chistics=..., definer_user_name=0x7fc45c31b090, definer_host_name=0x7fc45c31b0a0, created=20181212150548, modified=20181212150548, creation_ctx=0x7fc4280f8350) at /home/travis/src/sql/sp.cc:880
#10 0x000055ae10c3481f in db_find_routine (thd=0x55ae14613750, type=TYPE_ENUM_PROCEDURE, name=0x7fc45c31b5d0, sphp=0x7fc45c31b7f8) at /home/travis/src/sql/sp.cc:670
#11 0x000055ae10c38869 in sp_cache_routine (thd=0x55ae14613750, type=TYPE_ENUM_PROCEDURE, name=0x7fc45c31b5d0, lookup_only=false, sp=0x7fc45c31b7f8) at /home/travis/src/sql/sp.cc:2151
#12 0x000055ae10c386c3 in sp_cache_routine (thd=0x55ae14613750, rt=0x7fc42805c9e8, lookup_only=false, sp=0x7fc45c31b7f8) at /home/travis/src/sql/sp.cc:2104
#13 0x000055ae1083fa96 in open_and_process_routine (thd=0x55ae14613750, prelocking_ctx=0x7fc428158660, rt=0x7fc42805c9e8, prelocking_strategy=0x7fc45c31ba20, has_prelocking_list=false, ot_ctx=0x7fc45c31b910, need_prelocking=0x7fc45c31b8af, routine_modifies_data=0x7fc45c31b8b0) at /home/travis/src/sql/sql_base.cc:3882
#14 0x000055ae108412e7 in open_tables (thd=0x55ae14613750, options=..., start=0x7fc45c31b988, counter=0x7fc45c31b9a4, flags=0, prelocking_strategy=0x7fc45c31ba20) at /home/travis/src/sql/sql_base.cc:4712
#15 0x000055ae10842849 in open_and_lock_tables (thd=0x55ae14613750, options=..., tables=0x0, derived=true, flags=0, prelocking_strategy=0x7fc45c31ba20) at /home/travis/src/sql/sql_base.cc:5385
#16 0x000055ae10835ab1 in open_and_lock_tables (thd=0x55ae14613750, tables=0x0, derived=true, flags=0) at /home/travis/src/sql/sql_base.h:544
#17 0x000055ae108adec1 in mysql_execute_command (thd=0x55ae14613750) at /home/travis/src/sql/sql_parse.cc:5267
#18 0x000055ae10c4120e in sp_instr_stmt::exec_core (this=0x7fc42805cbb0, thd=0x55ae14613750, nextp=0x7fc45c31c5e4) at /home/travis/src/sql/sp_head.cc:3218
#19 0x000055ae10c40906 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7fc42805cbf0, thd=0x55ae14613750, nextp=0x7fc45c31c5e4, open_tables=false, instr=0x7fc42805cbb0) at /home/travis/src/sql/sp_head.cc:2984
#20 0x000055ae10c40ed8 in sp_instr_stmt::execute (this=0x7fc42805cbb0, thd=0x55ae14613750, nextp=0x7fc45c31c5e4) at /home/travis/src/sql/sp_head.cc:3134
#21 0x000055ae10c3c776 in sp_head::execute (this=0x7fc42805bbf8, thd=0x55ae14613750, merge_da_on_success=true) at /home/travis/src/sql/sp_head.cc:1315
#22 0x000055ae10c3e5f6 in sp_head::execute_procedure (this=0x7fc42805bbf8, thd=0x55ae14613750, args=0x55ae14617f18) at /home/travis/src/sql/sp_head.cc:2102
#23 0x000055ae108a4dad in do_execute_sp (thd=0x55ae14613750, sp=0x7fc42805bbf8) at /home/travis/src/sql/sql_parse.cc:2426
#24 0x000055ae108ae01e in mysql_execute_command (thd=0x55ae14613750) at /home/travis/src/sql/sql_parse.cc:5300
#25 0x000055ae108b3fec in mysql_parse (thd=0x55ae14613750, rawbuf=0x7fc428005328 "CALL sp_grammar1 /* QNO 2191 CON_ID 12 */", length=41, parser_state=0x7fc45c31d630) at /home/travis/src/sql/sql_parse.cc:7467
#26 0x000055ae108a284a in dispatch_command (command=COM_QUERY, thd=0x55ae14613750, packet=0x7fc4292a6b61 "CALL sp_grammar1 /* QNO 2191 CON_ID 12 */ ", packet_length=42) at /home/travis/src/sql/sql_parse.cc:1495
#27 0x000055ae108a15ca in do_command (thd=0x55ae14613750) at /home/travis/src/sql/sql_parse.cc:1124
#28 0x000055ae109dcff4 in do_handle_one_connection (thd_arg=0x55ae14613750) at /home/travis/src/sql/sql_connect.cc:1330
#29 0x000055ae109dcd58 in handle_one_connection (arg=0x55ae14613750) at /home/travis/src/sql/sql_connect.cc:1242
#30 0x00007fc4741a5184 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#31 0x00007fc4738c7ffd in clone () from /lib/x86_64-linux-gnu/libc.so.6
 
Some pointers may be invalid and cause the dump to abort.
Query (0x7fc4280f8228): CALL sp_grammar
Connection ID (thread ID): 12
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=off



 Comments   
Comment by Elena Stepanova [ 2019-02-04 ]

New occurrence: https://travis-ci.org/elenst/travis-tests/jobs/488313752

Comment by Elena Stepanova [ 2019-02-07 ]

More occurrences:
https://travis-ci.org/elenst/travis-tests/jobs/488838239 [2681 16 1]
https://travis-ci.org/elenst/travis-tests/jobs/489341280 [2688 16 2]

Comment by Elena Stepanova [ 2019-05-23 ]

New occurrence on 10.1: https://travis-ci.org/elenst/travis-tests/jobs/535101720 [3444 17 3]

Comment by Elena Stepanova [ 2023-11-28 ]

All affected versions are EOL, and there is no information about higher ones.

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