Comments to this bug contain various observations, non-deterministic tests which could be no longer applicable, and so on.They are an optional read for whoever ends up fixing this bug, there is no need to check every test mentioned there, only the one here in the description; but I preserve them mainly to keep all the variety of stack traces searchable in JIRA. All attachments also relate to comments, not to the description.
Remember to set the right basedir in the command line above. Make sure you use the RQG version as described above. There is no guarantee that another one will work the same way.
Reproducible on current 10.1-10.5. Couldn't reproduce on 5.5.
MDEV-11622Mariadb= 10.1.17-MariaDB get crashed after disabling query_cache_type on fly
Closed
relates to
MDEV-23127Server crash in Query_cache::double_linked_list_exclude or Assertion `table_block_data->m_cached_query_count >= 0' failed in Query_cache::unlink_table
Confirmed
MDEV-10498 10.1.9-MariaDB-log MariaDB Server crashed while changing Query cache
Query (0x6290016262a8): SELECT MAX( `id` ) FROM `E` WHERE ( ( `pk` = 255 ) AND `col_int_key` IN ( 0, 1, 255 ) ) AND ( ( ( `col_int_nokey` = 5 ) OR `col_int_nokey` IN ( 32, 255, 255 ) ) AND ( `col_varchar_key` LIKE CONCAT ('New Hampshire', '%' ) OR `col_varchar_nokey` BETWEEN 'ihmmynr' AND 'v' ) AND ( `col_varchar_key` BETWEEN 'hmmynr' AND 'mmy' OR `col_varchar_nokey` BETWEEN 'Georgia' AND 'mynrqex' ) ) AND ( `col_int_key` IN ( 0, 0 ) AND ( `pk` = 1 ) ) AND ( ( `col_varchar_key` LIKE CONCAT ('gather', '%' ) AND ( `col_varchar_key` = 'y' ) ) AND ( NOT ( `col_varchar_key` = 'w' ) OR `col_varchar_nokey` LIKE CONCAT ('s', '%' ) ) )
Alice Sherepa
added a comment - still reproducible:
10.10
mysqld: /10.10/sql/sql_cache.cc:1175: void Query_cache::end_of_result(THD*): Assertion `thd->get_stmt_da()->is_eof()' failed.
220714 12:44:56 [ERROR] mysqld got signal 6 ;
Server version: 10.10.0-MariaDB-debug-log
??:0(__restore_rt)[0x7f2c992f9730]
linux/raise.c:51(__GI_raise)[0x7f2c98e367bb]
stdlib/abort.c:81(__GI_abort)[0x7f2c98e21535]
??:0(__assert_fail)[0x7f2c98e2f102]
sql/sql_cache.cc:1177(Query_cache::end_of_result(THD*))[0x56166bfd0685]
sql/sql_parse.cc:2404(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56166c13b2db]
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x56166c134f31]
sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56166c5d4c8d]
sql/sql_connect.cc:1314(handle_one_connection)[0x56166c5d4512]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x56166d27341b]
nptl/pthread_create.c:487(start_thread)[0x7f2c992eefa3]
x86_64/clone.S:97(clone)[0x7f2c98ef7eff]
Query (0x6290016262a8): SELECT MAX( `id` ) FROM `E` WHERE ( ( `pk` = 255 ) AND `col_int_key` IN ( 0, 1, 255 ) ) AND ( ( ( `col_int_nokey` = 5 ) OR `col_int_nokey` IN ( 32, 255, 255 ) ) AND ( `col_varchar_key` LIKE CONCAT ('New Hampshire', '%' ) OR `col_varchar_nokey` BETWEEN 'ihmmynr' AND 'v' ) AND ( `col_varchar_key` BETWEEN 'hmmynr' AND 'mmy' OR `col_varchar_nokey` BETWEEN 'Georgia' AND 'mynrqex' ) ) AND ( `col_int_key` IN ( 0, 0 ) AND ( `pk` = 1 ) ) AND ( ( `col_varchar_key` LIKE CONCAT ('gather', '%' ) AND ( `col_varchar_key` = 'y' ) ) AND ( NOT ( `col_varchar_key` = 'w' ) OR `col_varchar_nokey` LIKE CONCAT ('s', '%' ) ) )
[Current thread is 1 (Thread 0x14ac32da4640 (LWP 655920))]
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22729820096064) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=22729820096064) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=22729820096064, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x000014b091042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x000014b0910287f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x000014b09102871b in __assert_fail_base (fmt=0x14b0911dd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55924e11f142 "thd->get_stmt_da()->is_eof()", file=0x55924e11f180 "/test/11.1_dbg/sql/sql_cache.cc", line=1178, function=<optimized out>) at ./assert/assert.c:92
#6 0x000014b091039e96 in __GI___assert_fail (assertion=0x55924e11f142 "thd->get_stmt_da()->is_eof()", file=0x55924e11f180 "/test/11.1_dbg/sql/sql_cache.cc", line=1178, function=0x55924e11f788 "void Query_cache::end_of_result(THD*)") at ./assert/assert.c:101
#7 0x000055924d4c552a in Query_cache::end_of_result (this=0x55924eb8dde0 <query_cache>, thd=thd@entry=0x14acb418ab88) at /test/11.1_dbg/sql/sql_cache.cc:1178
#8 0x000055924d540c8b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14acb418ab88, packet=<optimized out>, packet@entry=0x14acb41bf6c9 "", packet_length=packet_length@entry=180, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2402
#9 0x000055924d5415f4 in do_command (thd=0x14acb418ab88, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#10 0x000055924d6a4139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5592503203e8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#11 0x000055924d6a442e in handle_one_connection (arg=arg@entry=0x5592503203e8) at /test/11.1_dbg/sql/sql_connect.cc:1317
#12 0x000055924dad72d2 in pfs_spawn_thread (arg=0x559250320458) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#13 0x000014b091094ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#14 0x000014b091126660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
#3 0x0000557d1c6ab1e4 in query_cache_insert (thd_arg=thd_arg@entry=0x148084000d58, packet=packet@entry=0x14808400b158 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.1_dbg/sql/sql_cache.cc:1057
#4 0x0000557d1cb9ef64 in net_real_write (net=net@entry=0x1480840010a0, packet=0x14808400b158 "\002", len=<optimized out>) at /test/11.1_dbg/sql/net_serv.cc:660
#5 0x0000557d1cb9f2af in net_flush (net=0x1480840010a0) at /test/11.1_dbg/sql/net_serv.cc:402
#6 0x0000557d1c62ca26 in Protocol::net_send_eof (this=<optimized out>, thd=0x148084000d58, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:351
#7 0x0000557d1c62c516 in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:657
#8 0x0000557d1c62e752 in Protocol::end_statement (this=0x148084001370) at /test/11.1_dbg/sql/sql_error.h:1091
#9 0x0000557d1c726c7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148084000d58, packet=<optimized out>, packet@entry=0x14808400b159 "", packet_length=packet_length@entry=110, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2401
#10 0x0000557d1c7275f4 in do_command (thd=0x148084000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#11 0x0000557d1c88a139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557d209ff338, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#12 0x0000557d1c88a42e in handle_one_connection (arg=arg@entry=0x557d209ff338) at /test/11.1_dbg/sql/sql_connect.cc:1317
#13 0x0000557d1ccbd2d2 in pfs_spawn_thread (arg=0x557d209ff3a8) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#14 0x00001482f7894ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#15 0x00001482f7926660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
nr2=0x148e1bb1df28) at /test/11.1_dbg/strings/ctype-bin.c:302
[Current thread is 1 (Thread 0x148e1bb1f640 (LWP 2992370))]
(gdb) bt
#0 0x0000556090655ccd in my_hash_sort_bin (cs=<optimized out>, key=0x14904023b000 "", len=93873217384309, nr1=0x148e1bb1df20, nr2=0x148e1bb1df28) at /test/11.1_dbg/strings/ctype-bin.c:302
#1 0x000055609061a3da in my_ci_hash_sort (nr2=0x148e1bb1df28, nr1=0x148e1bb1df20, len=<optimized out>, key=<optimized out>, ci=<optimized out>) at /test/11.1_dbg/include/m_ctype.h:1354
#2 my_hash_sort (cs=<optimized out>, key=<optimized out>, length=<optimized out>) at /test/11.1_dbg/mysys/hash.c:48
#3 0x000055609061abd4 in rec_hashnr (record=0x1490401f74c0 "j\265ȏ`U", hash=0x55609126af68 <query_cache+392>) at /test/11.1_dbg/mysys/hash.c:229
#4 my_hash_delete (hash=0x55609126af68 <query_cache+392>, record=0x1490401f74c0 "j\265ȏ`U") at /test/11.1_dbg/mysys/hash.c:575
#5 0x000055608fb9e7bd in Query_cache::free_query (this=this@entry=0x55609126ade0 <query_cache>, query_block=0x1490401f74c0) at /test/11.1_dbg/sql/sql_cache.cc:3016
#6 0x000055608fba2190 in Query_cache::insert (this=0x55609126ade0 <query_cache>, thd=thd@entry=0x148f94119048, query_cache_tls=query_cache_tls@entry=0x148f94119388, packet=packet@entry=0x148f941200b8 "\002", length=258, pkt_nr=10) at /test/11.1_dbg/sql/sql_cache.cc:1116
#7 0x000055608fba21e4 in query_cache_insert (thd_arg=thd_arg@entry=0x148f94119048, packet=packet@entry=0x148f941200b8 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.1_dbg/sql/sql_cache.cc:1057
#8 0x0000556090095f64 in net_real_write (net=net@entry=0x148f94119390, packet=0x148f941200b8 "\002", len=<optimized out>) at /test/11.1_dbg/sql/net_serv.cc:660
#9 0x00005560900962af in net_flush (net=0x148f94119390) at /test/11.1_dbg/sql/net_serv.cc:402
#10 0x000055608fb23a26 in Protocol::net_send_eof (this=<optimized out>, thd=0x148f94119048, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:351
#11 0x000055608fb23516 in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:657
#12 0x000055608fb25752 in Protocol::end_statement (this=0x148f94119660) at /test/11.1_dbg/sql/sql_error.h:1091
#13 0x000055608fc1dc7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148f94119048, packet=<optimized out>, packet@entry=0x148f941200b9 "", packet_length=packet_length@entry=142, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2401
#14 0x000055608fc1e5f4 in do_command (thd=0x148f94119048, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#15 0x000055608fd81139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55609433d588, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#16 0x000055608fd8142e in handle_one_connection (arg=arg@entry=0x55609433d588) at /test/11.1_dbg/sql/sql_connect.cc:1317
#17 0x00005560901b42d2 in pfs_spawn_thread (arg=0x55609433d5f8) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#18 0x000014925f694ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#19 0x000014925f726660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
NTS: mariadb-qa/BUGS/MDEV-10826.sql (readily reproducible using pquery w/ 8k threads)
Roel Van de Paar
added a comment - - edited Seen in 11.1
11.1.4 50799752dc6306c35a47405c8f556d0b9639a1a9 (Debug)
mariadbd: /test/11.1_dbg/sql/sql_cache.cc:1178: void Query_cache::end_of_result(THD*): Assertion `thd->get_stmt_da()->is_eof()' failed.
11.1.4 50799752dc6306c35a47405c8f556d0b9639a1a9 (Debug)
Core was generated by `/test/MD271223-mariadb-11.1.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22729820096064)
at ./nptl/pthread_kill.c:44
[Current thread is 1 (Thread 0x14ac32da4640 (LWP 655920))]
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22729820096064) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=22729820096064) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=22729820096064, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x000014b091042476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x000014b0910287f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x000014b09102871b in __assert_fail_base (fmt=0x14b0911dd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55924e11f142 "thd->get_stmt_da()->is_eof()", file=0x55924e11f180 "/test/11.1_dbg/sql/sql_cache.cc", line=1178, function=<optimized out>) at ./assert/assert.c:92
#6 0x000014b091039e96 in __GI___assert_fail (assertion=0x55924e11f142 "thd->get_stmt_da()->is_eof()", file=0x55924e11f180 "/test/11.1_dbg/sql/sql_cache.cc", line=1178, function=0x55924e11f788 "void Query_cache::end_of_result(THD*)") at ./assert/assert.c:101
#7 0x000055924d4c552a in Query_cache::end_of_result (this=0x55924eb8dde0 <query_cache>, thd=thd@entry=0x14acb418ab88) at /test/11.1_dbg/sql/sql_cache.cc:1178
#8 0x000055924d540c8b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14acb418ab88, packet=<optimized out>, packet@entry=0x14acb41bf6c9 "", packet_length=packet_length@entry=180, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2402
#9 0x000055924d5415f4 in do_command (thd=0x14acb418ab88, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#10 0x000055924d6a4139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5592503203e8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#11 0x000055924d6a442e in handle_one_connection (arg=arg@entry=0x5592503203e8) at /test/11.1_dbg/sql/sql_connect.cc:1317
#12 0x000055924dad72d2 in pfs_spawn_thread (arg=0x559250320458) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#13 0x000014b091094ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#14 0x000014b091126660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
And
11.1.4 50799752dc6306c35a47405c8f556d0b9639a1a9 (Debug)
Core was generated by `/test/MD271223-mariadb-11.1.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 inline_mysql_rwlock_wrlock (src_line=921,
src_file=0x557d1d305180 "/test/11.1_dbg/sql/sql_cache.cc",
that=0x1480361448c0) at /test/11.1_dbg/include/mysql/psi/mysql_thread.h:931
[Current thread is 1 (Thread 0x1482ccc8c640 (LWP 180966))]
(gdb) bt
#0 inline_mysql_rwlock_wrlock (src_line=921, src_file=0x557d1d305180 "/test/11.1_dbg/sql/sql_cache.cc", that=0x1480361448c0) at /test/11.1_dbg/include/mysql/psi/mysql_thread.h:931
#1 Query_cache_query::lock_writing (this=0x1480361448b8) at /test/11.1_dbg/sql/sql_cache.cc:921
#2 Query_cache::insert (this=0x557d1dd73de0 <query_cache>, thd=thd@entry=0x148084000d58, query_cache_tls=query_cache_tls@entry=0x148084001098, packet=packet@entry=0x14808400b158 "\002", length=258, pkt_nr=10) at /test/11.1_dbg/sql/sql_cache.cc:1097
#3 0x0000557d1c6ab1e4 in query_cache_insert (thd_arg=thd_arg@entry=0x148084000d58, packet=packet@entry=0x14808400b158 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.1_dbg/sql/sql_cache.cc:1057
#4 0x0000557d1cb9ef64 in net_real_write (net=net@entry=0x1480840010a0, packet=0x14808400b158 "\002", len=<optimized out>) at /test/11.1_dbg/sql/net_serv.cc:660
#5 0x0000557d1cb9f2af in net_flush (net=0x1480840010a0) at /test/11.1_dbg/sql/net_serv.cc:402
#6 0x0000557d1c62ca26 in Protocol::net_send_eof (this=<optimized out>, thd=0x148084000d58, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:351
#7 0x0000557d1c62c516 in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:657
#8 0x0000557d1c62e752 in Protocol::end_statement (this=0x148084001370) at /test/11.1_dbg/sql/sql_error.h:1091
#9 0x0000557d1c726c7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148084000d58, packet=<optimized out>, packet@entry=0x14808400b159 "", packet_length=packet_length@entry=110, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2401
#10 0x0000557d1c7275f4 in do_command (thd=0x148084000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#11 0x0000557d1c88a139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557d209ff338, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#12 0x0000557d1c88a42e in handle_one_connection (arg=arg@entry=0x557d209ff338) at /test/11.1_dbg/sql/sql_connect.cc:1317
#13 0x0000557d1ccbd2d2 in pfs_spawn_thread (arg=0x557d209ff3a8) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#14 0x00001482f7894ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#15 0x00001482f7926660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
And (new stack)
11.1.4 50799752dc6306c35a47405c8f556d0b9639a1a9 (Debug)
Core was generated by `/test/MD271223-mariadb-11.1.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000556090655ccd in my_hash_sort_bin (cs=<optimized out>,
key=0x14904023b000 "", len=93873217384309, nr1=0x148e1bb1df20,
nr2=0x148e1bb1df28) at /test/11.1_dbg/strings/ctype-bin.c:302
[Current thread is 1 (Thread 0x148e1bb1f640 (LWP 2992370))]
(gdb) bt
#0 0x0000556090655ccd in my_hash_sort_bin (cs=<optimized out>, key=0x14904023b000 "", len=93873217384309, nr1=0x148e1bb1df20, nr2=0x148e1bb1df28) at /test/11.1_dbg/strings/ctype-bin.c:302
#1 0x000055609061a3da in my_ci_hash_sort (nr2=0x148e1bb1df28, nr1=0x148e1bb1df20, len=<optimized out>, key=<optimized out>, ci=<optimized out>) at /test/11.1_dbg/include/m_ctype.h:1354
#2 my_hash_sort (cs=<optimized out>, key=<optimized out>, length=<optimized out>) at /test/11.1_dbg/mysys/hash.c:48
#3 0x000055609061abd4 in rec_hashnr (record=0x1490401f74c0 "j\265ȏ`U", hash=0x55609126af68 <query_cache+392>) at /test/11.1_dbg/mysys/hash.c:229
#4 my_hash_delete (hash=0x55609126af68 <query_cache+392>, record=0x1490401f74c0 "j\265ȏ`U") at /test/11.1_dbg/mysys/hash.c:575
#5 0x000055608fb9e7bd in Query_cache::free_query (this=this@entry=0x55609126ade0 <query_cache>, query_block=0x1490401f74c0) at /test/11.1_dbg/sql/sql_cache.cc:3016
#6 0x000055608fba2190 in Query_cache::insert (this=0x55609126ade0 <query_cache>, thd=thd@entry=0x148f94119048, query_cache_tls=query_cache_tls@entry=0x148f94119388, packet=packet@entry=0x148f941200b8 "\002", length=258, pkt_nr=10) at /test/11.1_dbg/sql/sql_cache.cc:1116
#7 0x000055608fba21e4 in query_cache_insert (thd_arg=thd_arg@entry=0x148f94119048, packet=packet@entry=0x148f941200b8 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.1_dbg/sql/sql_cache.cc:1057
#8 0x0000556090095f64 in net_real_write (net=net@entry=0x148f94119390, packet=0x148f941200b8 "\002", len=<optimized out>) at /test/11.1_dbg/sql/net_serv.cc:660
#9 0x00005560900962af in net_flush (net=0x148f94119390) at /test/11.1_dbg/sql/net_serv.cc:402
#10 0x000055608fb23a26 in Protocol::net_send_eof (this=<optimized out>, thd=0x148f94119048, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:351
#11 0x000055608fb23516 in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.1_dbg/sql/protocol.cc:657
#12 0x000055608fb25752 in Protocol::end_statement (this=0x148f94119660) at /test/11.1_dbg/sql/sql_error.h:1091
#13 0x000055608fc1dc7c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148f94119048, packet=<optimized out>, packet@entry=0x148f941200b9 "", packet_length=packet_length@entry=142, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:2401
#14 0x000055608fc1e5f4 in do_command (thd=0x148f94119048, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#15 0x000055608fd81139 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55609433d588, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1415
#16 0x000055608fd8142e in handle_one_connection (arg=arg@entry=0x55609433d588) at /test/11.1_dbg/sql/sql_connect.cc:1317
#17 0x00005560901b42d2 in pfs_spawn_thread (arg=0x55609433d5f8) at /test/11.1_dbg/storage/perfschema/pfs.cc:2201
#18 0x000014925f694ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#19 0x000014925f726660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
NTS: mariadb-qa/BUGS/MDEV-10826.sql (readily reproducible using pquery w/ 8k threads)
#3 0x0000557a8e4ade6a in query_cache_insert (thd_arg=thd_arg@entry=0x14c2a8025fc8, packet=packet@entry=0x14c2a802fd58 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.3_dbg/sql/sql_cache.cc:1057
#4 0x0000557a8e9b8ff0 in net_real_write (net=net@entry=0x14c2a8026310, packet=0x14c2a802fd58 "\002", len=<optimized out>) at /test/11.3_dbg/sql/net_serv.cc:660
#5 0x0000557a8e9b933b in net_flush (net=0x14c2a8026310) at /test/11.3_dbg/sql/net_serv.cc:402
#6 0x0000557a8e43531e in Protocol::net_send_eof (this=<optimized out>, thd=0x14c2a8025fc8, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.3_dbg/sql/protocol.cc:351
#7 0x0000557a8e434e0e in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.3_dbg/sql/protocol.cc:657
#8 0x0000557a8e43704a in Protocol::end_statement (this=0x14c2a80265e0) at /test/11.3_dbg/sql/sql_error.h:1110
#9 0x0000557a8e52a622 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c2a8025fc8, packet=<optimized out>, packet@entry=0x14c2a802fd59 "", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_parse.cc:2402
#10 0x0000557a8e52afa3 in do_command (thd=0x14c2a8025fc8, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_parse.cc:1406
#11 0x0000557a8e691003 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557a91ca99d8, put_in_cache=put_in_cache@entry=true) at /test/11.3_dbg/sql/sql_connect.cc:1417
#12 0x0000557a8e6912f8 in handle_one_connection (arg=arg@entry=0x557a91ca99d8) at /test/11.3_dbg/sql/sql_connect.cc:1319
#13 0x0000557a8ead8e14 in pfs_spawn_thread (arg=0x557a91ca9a48) at /test/11.3_dbg/storage/perfschema/pfs.cc:2201
#14 0x000014c68fc94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#15 0x000014c68fd26660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Roel Van de Paar
added a comment - Also in 11.3
11.3.2 63fb478f88e0061d149f5cdd3c4d21d4a35c7bd9 (Debug)
Core was generated by `/test/MD271223-mariadb-11.3.2-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 inline_mysql_rwlock_wrlock (src_line=921,
src_file=0x557a8f123d60 "/test/11.3_dbg/sql/sql_cache.cc",
that=0x14c41df89070) at /test/11.3_dbg/include/mysql/psi/mysql_thread.h:931
931 if (psi_likely(that->m_psi != NULL))
[Current thread is 1 (Thread 0x14c3b688f640 (LWP 2606873))]
(gdb) bt
#0 inline_mysql_rwlock_wrlock (src_line=921, src_file=0x557a8f123d60 "/test/11.3_dbg/sql/sql_cache.cc", that=0x14c41df89070) at /test/11.3_dbg/include/mysql/psi/mysql_thread.h:931
#1 Query_cache_query::lock_writing (this=0x14c41df89068) at /test/11.3_dbg/sql/sql_cache.cc:921
#2 Query_cache::insert (this=0x557a8fb953e0 <query_cache>, thd=thd@entry=0x14c2a8025fc8, query_cache_tls=query_cache_tls@entry=0x14c2a8026308, packet=packet@entry=0x14c2a802fd58 "\002", length=158, pkt_nr=18) at /test/11.3_dbg/sql/sql_cache.cc:1097
#3 0x0000557a8e4ade6a in query_cache_insert (thd_arg=thd_arg@entry=0x14c2a8025fc8, packet=packet@entry=0x14c2a802fd58 "\002", length=<optimized out>, pkt_nr=<optimized out>) at /test/11.3_dbg/sql/sql_cache.cc:1057
#4 0x0000557a8e9b8ff0 in net_real_write (net=net@entry=0x14c2a8026310, packet=0x14c2a802fd58 "\002", len=<optimized out>) at /test/11.3_dbg/sql/net_serv.cc:660
#5 0x0000557a8e9b933b in net_flush (net=0x14c2a8026310) at /test/11.3_dbg/sql/net_serv.cc:402
#6 0x0000557a8e43531e in Protocol::net_send_eof (this=<optimized out>, thd=0x14c2a8025fc8, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.3_dbg/sql/protocol.cc:351
#7 0x0000557a8e434e0e in Protocol::send_eof (this=<optimized out>, server_status=<optimized out>, statement_warn_count=<optimized out>) at /test/11.3_dbg/sql/protocol.cc:657
#8 0x0000557a8e43704a in Protocol::end_statement (this=0x14c2a80265e0) at /test/11.3_dbg/sql/sql_error.h:1110
#9 0x0000557a8e52a622 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c2a8025fc8, packet=<optimized out>, packet@entry=0x14c2a802fd59 "", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_parse.cc:2402
#10 0x0000557a8e52afa3 in do_command (thd=0x14c2a8025fc8, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_parse.cc:1406
#11 0x0000557a8e691003 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557a91ca99d8, put_in_cache=put_in_cache@entry=true) at /test/11.3_dbg/sql/sql_connect.cc:1417
#12 0x0000557a8e6912f8 in handle_one_connection (arg=arg@entry=0x557a91ca99d8) at /test/11.3_dbg/sql/sql_connect.cc:1319
#13 0x0000557a8ead8e14 in pfs_spawn_thread (arg=0x557a91ca9a48) at /test/11.3_dbg/storage/perfschema/pfs.cc:2201
#14 0x000014c68fc94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#15 0x000014c68fd26660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
at /test/11.4_dbg/include/mysql/psi/mysql_thread.h:986
[Current thread is 1 (Thread 0x14d6a9c77640 (LWP 2960251))]
(gdb) bt
#0 inline_mysql_rwlock_unlock (that=0x14db1214cb00) at /test/11.4_dbg/include/mysql/psi/mysql_thread.h:986
#1 Query_cache_query::unlock_writing (this=0x14db1214caf8) at /test/11.4_dbg/sql/sql_cache.cc:953
#2 Query_cache::store_query (this=0x562ab9c7d420 <query_cache>, thd=thd@entry=0x14d82c12d7d8, tables_used=tables_used@entry=0x14d82c13d798) at /test/11.4_dbg/sql/sql_cache.cc:1579
#3 0x0000562ab8604f0f in execute_sqlcom_select (thd=thd@entry=0x14d82c12d7d8, all_tables=0x14d82c13d798) at /test/11.4_dbg/sql/sql_parse.cc:6028
#4 0x0000562ab8610f7a in mysql_execute_command (thd=thd@entry=0x14d82c12d7d8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.4_dbg/sql/sql_parse.cc:3924
#5 0x0000562ab86174bb in mysql_parse (thd=thd@entry=0x14d82c12d7d8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d6a9c761e0) at /test/11.4_dbg/sql/sql_parse.cc:7748
#6 0x0000562ab8619831 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d82c12d7d8, packet=packet@entry=0x14d82c134639 "select evend_id,server_id FROM t1 order by evend_id;#ERROR: 1054 - Unknown column 'evend_id' in 'field list'", packet_length=packet_length@entry=109, blocking=blocking@entry=true) at /test/11.4_dbg/sql/sql_class.h:253
#7 0x0000562ab861b956 in do_command (thd=0x14d82c12d7d8, blocking=blocking@entry=true) at /test/11.4_dbg/sql/sql_parse.cc:1406
#8 0x0000562ab87808b7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562abb91b0d8, put_in_cache=put_in_cache@entry=true) at /test/11.4_dbg/sql/sql_connect.cc:1418
#9 0x0000562ab8780bac in handle_one_connection (arg=arg@entry=0x562abb91b0d8) at /test/11.4_dbg/sql/sql_connect.cc:1320
#10 0x0000562ab8bc573a in pfs_spawn_thread (arg=0x562abb91b148) at /test/11.4_dbg/storage/perfschema/pfs.cc:2201
#11 0x000014daf2494ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#12 0x000014daf2526660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Roel Van de Paar
added a comment - And in 11.4 (new stack)
11.4.0 9bd95e914f3f12d0d9d93e7a1f2c49e6e8841f17 (Debug)
Core was generated by `/test/MD271223-mariadb-11.4.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 inline_mysql_rwlock_unlock (that=0x14db1214cb00)
at /test/11.4_dbg/include/mysql/psi/mysql_thread.h:986
[Current thread is 1 (Thread 0x14d6a9c77640 (LWP 2960251))]
(gdb) bt
#0 inline_mysql_rwlock_unlock (that=0x14db1214cb00) at /test/11.4_dbg/include/mysql/psi/mysql_thread.h:986
#1 Query_cache_query::unlock_writing (this=0x14db1214caf8) at /test/11.4_dbg/sql/sql_cache.cc:953
#2 Query_cache::store_query (this=0x562ab9c7d420 <query_cache>, thd=thd@entry=0x14d82c12d7d8, tables_used=tables_used@entry=0x14d82c13d798) at /test/11.4_dbg/sql/sql_cache.cc:1579
#3 0x0000562ab8604f0f in execute_sqlcom_select (thd=thd@entry=0x14d82c12d7d8, all_tables=0x14d82c13d798) at /test/11.4_dbg/sql/sql_parse.cc:6028
#4 0x0000562ab8610f7a in mysql_execute_command (thd=thd@entry=0x14d82c12d7d8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.4_dbg/sql/sql_parse.cc:3924
#5 0x0000562ab86174bb in mysql_parse (thd=thd@entry=0x14d82c12d7d8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d6a9c761e0) at /test/11.4_dbg/sql/sql_parse.cc:7748
#6 0x0000562ab8619831 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d82c12d7d8, packet=packet@entry=0x14d82c134639 "select evend_id,server_id FROM t1 order by evend_id;#ERROR: 1054 - Unknown column 'evend_id' in 'field list'", packet_length=packet_length@entry=109, blocking=blocking@entry=true) at /test/11.4_dbg/sql/sql_class.h:253
#7 0x0000562ab861b956 in do_command (thd=0x14d82c12d7d8, blocking=blocking@entry=true) at /test/11.4_dbg/sql/sql_parse.cc:1406
#8 0x0000562ab87808b7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562abb91b0d8, put_in_cache=put_in_cache@entry=true) at /test/11.4_dbg/sql/sql_connect.cc:1418
#9 0x0000562ab8780bac in handle_one_connection (arg=arg@entry=0x562abb91b0d8) at /test/11.4_dbg/sql/sql_connect.cc:1320
#10 0x0000562ab8bc573a in pfs_spawn_thread (arg=0x562abb91b148) at /test/11.4_dbg/storage/perfschema/pfs.cc:2201
#11 0x000014daf2494ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#12 0x000014daf2526660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Roel Van de Paar
added a comment - Observed stacks:
SIGSEGV|inline_mysql_rwlock_wrlock|Query_cache_query::lock_writing|Query_cache::insert|query_cache_insert
SIGSEGV|inline_mysql_rwlock_unlock|Query_cache_query::unlock_writing|Query_cache::store_query|execute_sqlcom_select
SIGSEGV|my_hash_sort_bin|my_ci_hash_sort|my_hash_sort|rec_hashnr
SIGSEGV|Query_cache::free_query_internal|Query_cache::free_query|Query_cache::insert|query_cache_insert
!query_cache.is_disable_in_progress()|SIGABRT|fix_query_cache_type|sys_var::update|set_var::update|sql_set_variables
thd->get_stmt_da()->is_eof()|SIGABRT|Query_cache::end_of_result|dispatch_command|do_command|do_handle_one_connection
People
Oleksandr Byelkin
Elena Stepanova
Votes:
1Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
still reproducible:
10.10
mysqld: /10.10/sql/sql_cache.cc:1175: void Query_cache::end_of_result(THD*): Assertion `thd->get_stmt_da()->is_eof()' failed.
220714 12:44:56 [ERROR] mysqld got signal 6 ;
Server version: 10.10.0-MariaDB-debug-log
??:0(__restore_rt)[0x7f2c992f9730]
linux/raise.c:51(__GI_raise)[0x7f2c98e367bb]
stdlib/abort.c:81(__GI_abort)[0x7f2c98e21535]
??:0(__assert_fail)[0x7f2c98e2f102]
sql/sql_cache.cc:1177(Query_cache::end_of_result(THD*))[0x56166bfd0685]
sql/sql_parse.cc:2404(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56166c13b2db]
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x56166c134f31]
sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56166c5d4c8d]
sql/sql_connect.cc:1314(handle_one_connection)[0x56166c5d4512]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x56166d27341b]
nptl/pthread_create.c:487(start_thread)[0x7f2c992eefa3]
x86_64/clone.S:97(clone)[0x7f2c98ef7eff]
Query (0x6290016262a8): SELECT MAX( `id` ) FROM `E` WHERE ( ( `pk` = 255 ) AND `col_int_key` IN ( 0, 1, 255 ) ) AND ( ( ( `col_int_nokey` = 5 ) OR `col_int_nokey` IN ( 32, 255, 255 ) ) AND ( `col_varchar_key` LIKE CONCAT ('New Hampshire', '%' ) OR `col_varchar_nokey` BETWEEN 'ihmmynr' AND 'v' ) AND ( `col_varchar_key` BETWEEN 'hmmynr' AND 'mmy' OR `col_varchar_nokey` BETWEEN 'Georgia' AND 'mynrqex' ) ) AND ( `col_int_key` IN ( 0, 0 ) AND ( `pk` = 1 ) ) AND ( ( `col_varchar_key` LIKE CONCAT ('gather', '%' ) AND ( `col_varchar_key` = 'y' ) ) AND ( NOT ( `col_varchar_key` = 'w' ) OR `col_varchar_nokey` LIKE CONCAT ('s', '%' ) ) )