[MDEV-17471] parallel replication mutex acquision deadlock Created: 2018-10-16  Updated: 2023-04-27

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

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-17247 Memory leak on parallel replicated slave Open
Relates
relates to MDEV-17247 Memory leak on parallel replicated slave Open

 Description   

In quest to properly understand memory consumption by parallel slave the following stack
was produced:

==1==    at 0x4C290CD: free (vg_replace_malloc.c:530)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6E8E26B: __libc_freeres (in /usr/lib64/libc-2.17.so)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x4A24749: _vgnU_freeres (vg_preloaded.c:77)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0xA514C1: handle_fatal_signal (signal_handler.cc:317)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x4E3C6CF: ??? (in /usr/lib64/libpthread-2.17.so)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6D54276: raise (raise.c:56)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6D55967: abort (abort.c:90)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6D4D095: __assert_fail_base (assert.c:92)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6D4D141: __assert_fail (assert.c:101)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x1312422: 
safe_mutex_lock (thr_mutex.c:388)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x6FBCB3: inline_mysql_mutex_lock (mysql_thread.h:710)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x70F8F8: wait_for_commit::register_wait_for_prior_commit(wait_for_commit*) (sql_class.cc:7396)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x939DCE: register_wait_for_prior_event_group_commit(rpl_group_info*, rpl_parallel_entry*) (rpl_parallel.cc:299)
Oct 03 08:24:43 cst4-db4.c.sharpspring-us.internal docker[25403]: ==1==    by 0x93BFA6: handle_rpl_parallel_thread (rpl_parallel.cc:1189)

which indicates an assert DBUG_ASSERT(deadlock->count > 0);.

While the affected version is optimistically set to one of actual environment older version
can be vulnerable as well.


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