[MDEV-21657] Crash in has_stronger_or_equal_type Query doing a LOCK TABLE Created: 2020-02-04  Updated: 2020-05-04

Status: Open
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4.11
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Roy Bellingan Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Ubuntu 18.04.3 LTS


Issue Links:
Blocks
is blocked by MDEV-19273 Server crash in MDL_ticket::has_stron... Closed

 Description   

With a chanche of something like 1 in 1milion
While performing LOCK TABLE scraper.url WRITE, scraper.keyword WRITE
The server crash with following stacktrace

[ERROR] mysqld got signal 11 ;
 
stack_bottom = 0x7fa5800efdd8 thread_stack 0x49000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x564d845011de]
/usr/sbin/mysqld(handle_fatal_signal+0x515)[0x564d83f762f5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fb5d9dca890]
/usr/sbin/mysqld(_ZNK10MDL_ticket26has_stronger_or_equal_typeE13enum_mdl_type+0x18)[0x564d83e526a8]
/usr/sbin/mysqld(_ZN11MDL_context11find_ticketEP11MDL_requestP17enum_mdl_duration+0xbc)[0x564d83e5280c]
/usr/sbin/mysqld(_ZN11MDL_context21try_acquire_lock_implEP11MDL_requestPP10MDL_ticket+0x2b)[0x564d83e539bb]
/usr/sbin/mysqld(_ZN11MDL_context12acquire_lockEP11MDL_requestd+0x2e)[0x564d83e53bae]
/usr/sbin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP18Open_table_context+0x52f)[0x564d83d00e9f]
/usr/sbin/mysqld(_Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy+0xc13)[0x564d83d04753]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x7f9b)[0x564d83d698eb]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x22a)[0x564d83d6a47a]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x13a1)[0x564d83d6ca01]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x148)[0x564d83d6e2d8]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x25e)[0x564d83e4a2ae]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x564d83e4a36d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7fb5d9dbf6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fb5d87e088f]



 Comments   
Comment by Elena Stepanova [ 2020-05-01 ]

Do you ever use sequences? We have an open bug report MDEV-19273 with a very similar stack trace, but it involves sequences.

Comment by Roy Bellingan [ 2020-05-01 ]

Hi @Elena Stepanova yes I was using sequences during this same period of time.

Something like
INSERT IGNORE INTO keywordIdGap
SELECT seq
FROM seq_1_to_1000000000_step_1 as s
LEFT join keyword as k ON k.id = s.seq
WHERE
seq >= 0 AND seq < 10000000 AND
k.id IS NULL
order by seq ASC
LIMIT 5000000

It was needed to recover some "wasted" id on a table. This used to run for a few weeks once in a while.

But I do not really remember if that crash happened while this specific query was also running...

Comment by Elena Stepanova [ 2020-05-01 ]

Thanks. Hopefully MDEV-19273 will be fixed soon, then we'll have to wait and see if it solves your problem as well. I will keep this issue open for now.

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