[MDEV-17344] [Draft] Server crashes in Prepared_statement::~Prepared_statement / Query_arena::free_items / delete_self Created: 2018-10-02  Updated: 2018-11-17

Status: Open
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Blocks
is blocked by MDEV-17055 Server crashes in find_order_in_list ... Closed
Relates
relates to MDEV-17738 Server crashes in Item::delete_self o... Closed

 Description   

10.2 non-debug 61a6f4bd962

#2  <signal handler called>
#3  0x0000000000000000 in ?? ()
#4  0x0000556c1e62e259 in delete_self (this=<optimized out>) at /data/src/10.2/sql/item.h:1848
#5  Query_arena::free_items (this=this@entry=0x7f116c650570) at /data/src/10.2/sql/sql_class.cc:3462
#6  0x0000556c1e671a6a in Prepared_statement::~Prepared_statement (this=0x7f116c650558, __in_chrg=<optimized out>) at /data/src/10.2/sql/sql_prepare.cc:3827
#7  0x0000556c1e671af9 in Prepared_statement::~Prepared_statement (this=0x7f116c650558, __in_chrg=<optimized out>) at /data/src/10.2/sql/sql_prepare.cc:3836
#8  0x0000556c1ecc2e35 in my_hash_delete (hash=0x7f116c002298, record=0x7f116c650558 "\220\301B\037lU") at /data/src/10.2/mysys/hash.c:626
#9  0x0000556c1e62e6b3 in Statement_map::erase (this=0x7f116c002298, statement=0x7f116c650558) at /data/src/10.2/sql/sql_class.cc:3718
#10 0x0000556c1e675840 in Prepared_statement::deallocate (this=<optimized out>) at /data/src/10.2/sql/sql_prepare.cc:4936
#11 0x0000556c1e675872 in mysqld_stmt_close (thd=thd@entry=0x7f116c0009a8, packet=packet@entry=0x7f116c006d29 "V+") at /data/src/10.2/sql/sql_prepare.cc:3470
#12 0x0000556c1e667270 in dispatch_command (command=command@entry=COM_STMT_CLOSE, thd=thd@entry=0x7f116c0009a8, packet=packet@entry=0x7f116c006d29 "V+", packet_length=packet_length@entry=4, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1786
#13 0x0000556c1e668178 in do_command (thd=0x7f116c0009a8) at /data/src/10.2/sql/sql_parse.cc:1378
#14 0x0000556c1e7309f4 in do_handle_one_connection (connect=connect@entry=0x556c21f35198) at /data/src/10.2/sql/sql_connect.cc:1335
#15 0x0000556c1e730b94 in handle_one_connection (arg=0x556c21f35198) at /data/src/10.2/sql/sql_connect.cc:1241
#16 0x00007f11d9eb0494 in start_thread (arg=0x7f11d449a700) at pthread_create.c:333
#17 0x00007f11d829693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

github.com/MariaDB/rangen --branch elenst-mdev17344

perl ./runall-trials.pl --trials=15 --basedir=/data/bld/10.2-rel  --duration=350 --threads=3 --seed=1537604147 --reporters=Backtrace,ErrorLog,Deadlock  --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 --mysqld=--default-storage-engine=MyISAM --grammar=conf/engines/engine_stress.yy --gendata=conf/engines/engine_stress.zz --ps-protocol  --vardir=/data/logs/mdev17177-30

This command line is the best I can do at the moment. All further attempts to simplify the scenario get stuck at MDEV-17055. Even the test above hits MDEV-17055 half of the time. I don't know if the problems are related or just happen independently in similar circumstances.



 Comments   
Comment by Elena Stepanova [ 2018-11-12 ]

There were similar failures fixed by this commit: https://github.com/MariaDB/server/commit/68889c8dfa4a1f580a611c174d0ef807cb87bbad
Specifically, main.analyze_format_json failed in a similar way while executed with ps-protocol.

Need to try the same random test on bb-10.4-ps

Comment by Elena Stepanova [ 2018-11-17 ]

New occurrence on 10.2: https://travis-ci.org/elenst/travis-tests/jobs/455089709

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