[MDEV-17437] Semisync master fires invalid fd value assert Created: 2018-10-12  Updated: 2020-08-25  Resolved: 2018-11-13

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.3
Fix Version/s: 10.3.11

Type: Bug Priority: Critical
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Fixed Votes: 0
Labels: None


 Description   

The semisync ack collector hits fd's out-of-bound value assert through

#12 0x00007f125ea0cce8 in abort () from /lib64/libc.so.6
No symbol table info available.
#13 0x00007f125ea4b317 in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#14 0x00007f125eae3a77 in __fortify_fail () from /lib64/libc.so.6
No symbol table info available.
#15 0x00007f125eae1c30 in __chk_fail () from /lib64/libc.so.6
No symbol table info available.
#16 0x00007f125eae39e7 in __fdelt_warn () from /lib64/libc.so.6
No symbol table info available.
#17 0x00007f1260f7f400 in Ack_receiver::get_slave_sockets (this=this@entry=0x7f1261f4acc0 <ack_receiver>, fds=<optimized out>, fds@entry=0x7f0c797f97c0, count=count@entry=0x7f0c797f979c)
    at mariadb-10.3.9/sql/semisync_master_ack_receiver.cc:189
        __d = 1616
        fd = 1616
        max_fd = 1616
        slave = 0x7f0bcc2f4e08
        it = {<base_ilist_iterator> = {list = 0x7f1261f4ad40 <ack_receiver+128>, el = 0x7f0bcc2f4e18, current = 0x7f0bcc2f4e08}, <No data fields>}
#18 0x00007f1260f7f980 in Ack_receiver::run (this=this@entry=0x7f1261f4acc0 <ack_receiver>)

The reason of the failure must be the same as in https://bugs.mysql.com/bug.php?id=79865
whose fixes should be tried out.

Representation in the error log:

*** buffer overflow detected ***: /usr/sbin/mysqld terminated
...
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7fa3b998ba77]
/lib64/libc.so.6(+0x10bc30)[0x7fa3b9989c30]
/lib64/libc.so.6(+0x10d9e7)[0x7fa3b998b9e7]
/usr/sbin/mysqld(_ZN12Ack_receiver17get_slave_socketsEP6fd_setPj+0x70)[0x7fa3bbe27400]
/usr/sbin/mysqld(_ZN12Ack_receiver3runEv+0x540)[0x7fa3bbe27980]
/usr/sbin/mysqld(ack_receive_handler+0x19)[0x7fa3bbe27a79]
/lib64/libpthread.so.0(+0x7dc5)[0x7fa3bb31ddc5]
/lib64/libc.so.6(clone+0x6d)[0x7fa3b99741cd]
======= Memory map: ========
...



 Comments   
Comment by Andrei Elkin [ 2018-11-13 ]

Checked a failing test to prove its not the patch's fault;
pushed.

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