[MDEV-6674] Slave crashes in Query_cache::insert upon connecting to master Created: 2014-09-01  Updated: 2014-12-27  Resolved: 2014-12-27

Status: Closed
Project: MariaDB Server
Component/s: Query Cache
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None


 Description   

Reproducible on bb-fast-connect tree.

#3  <signal handler called>
#4  0x00007f3e14fe0325 in Query_cache::insert (this=0x7f3e162a8c40, query_cache_tls=0x2b0, packet=0x7f3dfa481070 "\220", length=148, pkt_nr=2) at bb-fast-connect/sql/sql_cache.cc:1061
#5  0x00007f3e14fe02d3 in query_cache_insert (thd=0x0, packet=0x7f3dfa481070 "\220", length=148, pkt_nr=2) at bb-fast-connect/sql/sql_cache.cc:1045
#6  0x00007f3e14f7a888 in net_real_write (net=0x7f3dfa45b470, packet=0x7f3dfa481070 "\220", len=148) at bb-fast-connect/sql/net_serv.cc:606
#7  0x00007f3e14f7a1a3 in net_flush (net=0x7f3dfa45b470) at bb-fast-connect/sql/net_serv.cc:363
#8  0x00007f3e151f6af7 in send_client_reply_packet (mpvio=0x7f3e14a316e0, data=0x0, data_len=0) at bb-fast-connect/sql-common/client.c:2799
#9  0x00007f3e151f6cf1 in client_mpvio_write_packet (mpv=0x7f3e14a316e0, pkt=0x0, pkt_len=0) at bb-fast-connect/sql-common/client.c:2895
#10 0x00007f3e151fc0ff in native_password_auth_client (vio=0x7f3e14a316e0, mysql=0x7f3dfa45b470) at bb-fast-connect/sql-common/client.c:4830
#11 0x00007f3e151f714b in run_plugin_auth (mysql=0x7f3dfa45b470, data=0x7f3dfa4810a7 "password", data_len=21, data_plugin=0x7f3dfa4810bc "_client_name\blibmysql\004_pid\005\062\067\064\061\063\017_client_version\006\061\060.1.1\t_platform\006x86_64\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"..., db=0x0) at bb-fast-connect/sql-common/client.c:3031
#12 0x00007f3e151f8f72 in mysql_real_connect (mysql=0x7f3dfa45b470, host=0x7f3e073816ce "127.0.0.1", user=0x7f3e07381783 "root", passwd=0x7f3e07381904 "", db=0x0, port=16020, unix_socket=0x0, client_flag=2147483648) at bb-fast-connect/sql-common/client.c:3694
#13 0x00007f3e14f9cfec in connect_to_master (thd=0x7f3dfa416070, mysql=0x7f3dfa45b470, mi=0x7f3e07381000, reconnect=false, suppress_warnings=false) at bb-fast-connect/sql/slave.cc:5856
#14 0x00007f3e14f9cb1c in safe_connect (thd=0x7f3dfa416070, mysql=0x7f3dfa45b470, mi=0x7f3e07381000) at bb-fast-connect/sql/slave.cc:5782
#15 0x00007f3e14f975b7 in handle_slave_io (arg=0x7f3e07381000) at bb-fast-connect/sql/slave.cc:3848
#16 0x00007f3e156b7aba in pfs_spawn_thread (arg=0x7f3df9cfd0f0) at bb-fast-connect/storage/perfschema/pfs.cc:1860
#17 0x00007f3e14742b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#18 0x00007f3e12a1a20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Stack trace from:

commit 9cd99ebfff3421290a3d3f79da298beb1aef4e3a
Author: Monty <monty@mariadb.org>
Date:   Fri Aug 29 14:30:31 2014 +0300

Reproducible while running MTR replication tests with query cache enabled, e.g.

perl ./mtr rpl_insert --mysqld=--query_cache_size=64M



 Comments   
Comment by Michael Widenius [ 2014-09-02 ]

Fixed; I had missed one test if thd is zero for this special case.
Will push as soon as buildbot is green for bb-fast-connect

Comment by Daniel Black [ 2014-12-27 ]

should mark this as resolved now.

Comment by Elena Stepanova [ 2014-12-27 ]

Not reproducible on the current bb-fast-connect tree (the fix was pushed there according to the logs).
The tree itself doesn't seem to have been merged into 10.1 yet.

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