[MDEV-23214] Buffer overflow during insert Created: 2020-07-18  Updated: 2020-11-09  Resolved: 2020-11-09

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Insert, Galera
Affects Version/s: 10.4.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Xesh Assignee: Jan Lindström (Inactive)
Resolution: Incomplete Votes: 0
Labels: crash, need_feedback
Environment:

CentOS Linux release 8.1.1911 (Core)


Attachments: Text File conf.txt     Text File crash.txt    
Issue Links:
Relates
relates to MDEV-23147 Assertion `wsrep::this_thread::get_id... Closed

 Description   

After Mariadb is updated from 10.4.12 to 10.4.13, I ran sysbench this test :

sysbench /usr/share/sysbench/oltp_read_write.lua --threads=80 --events=0 --time=300 --mysql-host=127.0.0.1 --mysql-db=sbtest --mysql-user=root --mysql-password=xxx--mysql-port=3306 --tables=20 --delete_inserts=20 --index_updates=20 --non_index_updates=20 --table-size=1000000 --db-ps-mode=disable --report-interval=1 run

There are a lot of conflicts and on the last Insert it just crashes

(wsrep::unique_lock<wsrep::mutex>&, wsrep::client_state::state): Assertion `wsrep::this_thread::get_id() == owning_thread_id_' failed.
200718 18:05:36 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.4.13-MariaDB-log
key_buffer_size=1048576
read_buffer_size=4194304
max_used_connections=81
max_threads=102
thread_count=608
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 7105983 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7faba0000c08
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7faf58e52c68 thread_stack 0x40000

      • buffer overflow detected ***: /usr/sbin/mysqld terminated


 Comments   
Comment by Jan Lindström (Inactive) [ 2020-07-27 ]

Do you run same sysbench command line for every node in your cluster? Can you add error logs and configuration from all nodes please.

Comment by Xesh [ 2020-08-03 ]

If you run two tests with the same database on the same node at once or the one test with the same database on each node at the same time this message will appear on only one "failed" node. This his message was on appeared on the failed node, other nodes did not crash. Configuration is attached conf.txt.
All nodes are the same except IPs. I don't have error log.

Comment by Jan Lindström (Inactive) [ 2020-10-07 ]

I tested this with 3-node Galera cluster so that I had 2 sysbench runs on one node and 1 sysbench on another node (i.e. using multi-master case). However, I could not repeat any problems. Either, assertion mentioned is fixed on more recent version of MariaDB server and Galera library or I just could not reproduce the issue. Can you please try to upgrade and if issue reproduces I will try again. and then please provide error log and resolve stack dump see https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/

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