Bug #114439 Mysql crash:mysqld: invalid fastbin entry (free):
Submitted: 21 Mar 2024 11:16 Modified: 21 Mar 2024 12:11
Reporter: Jack He Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.28 OS:CentOS
Assigned to: CPU Architecture:x86

[21 Mar 2024 11:16] Jack He
Description:
Hello,
Mysql Server:
RAM 128G
Core:128 processor
Mysql  crashed with this log:
*** glibc detected *** /newdata/app/mysql57/bin/mysqld: invalid fastbin entry (free): 0x00002bcb9d48a0b0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3261876166]
/newdata/app/mysql57/bin/mysqld[0xd10509]
/newdata/app/mysql57/bin/mysqld(_Z15mysql_change_dbP3THDRK25st_mysql_const_lex_stringb+0x3ce)[0xd1117e]
/newdata/app/mysql57/bin/mysqld(_Z21mysql_execute_commandP3THDb+0xac4)[0xd48e34]
/newdata/app/mysql57/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x3dd)[0xd4d6cd]
/newdata/app/mysql57/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x11d5)[0xd4e975]
/newdata/app/mysql57/bin/mysqld(_Z10do_commandP3THD+0x194)[0xd4f854]
/newdata/app/mysql57/bin/mysqld(handle_connection+0x2ac)[0xe21a8c]
/newdata/app/mysql57/bin/mysqld(pfs_spawn_thread+0x174)[0x10004e4]
/lib64/libpthread.so.0[0x3261c079d1]
/lib64/libc.so.6(clone+0x6d)[0x32618e8b6d]
======= Memory map: ========
...
7fff3874e000-7fff38764000 rw-p 00000000 00:00 0                          [stack]
7fff3878f000-7fff38790000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
06:15:44 UTC - 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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=67108864
read_buffer_size=4194304
max_used_connections=5001
max_threads=5000
thread_count=1469
connection_count=1468
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 143492450 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x2bcd21149720
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 = 2bd54a8dce28 thread_stack 0x40000
/newdata/app/mysql57/bin/mysqld(my_print_stacktrace+0x35)[0xf81bf5]
/newdata/app/mysql57/bin/mysqld(handle_fatal_signal+0x4a4)[0x7fb344]
/lib64/libpthread.so.0[0x3261c0f710]
/lib64/libc.so.6(gsignal+0x35)[0x3261832925]
/lib64/libc.so.6(abort+0x175)[0x3261834105]
/lib64/libc.so.6[0x3261870837]
/lib64/libc.so.6[0x3261876166]
/newdata/app/mysql57/bin/mysqld[0xd10509]
/newdata/app/mysql57/bin/mysqld(_Z15mysql_change_dbP3THDRK25st_mysql_const_lex_stringb+0x3ce)[0xd1117e]
/newdata/app/mysql57/bin/mysqld(_Z21mysql_execute_commandP3THDb+0xac4)[0xd48e34]
/newdata/app/mysql57/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x3dd)[0xd4d6cd]
/newdata/app/mysql57/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x11d5)[0xd4e975]
/newdata/app/mysql57/bin/mysqld(_Z10do_commandP3THD+0x194)[0xd4f854]
/newdata/app/mysql57/bin/mysqld(handle_connection+0x2ac)[0xe21a8c]
/newdata/app/mysql57/bin/mysqld(pfs_spawn_thread+0x174)[0x10004e4]
/lib64/libpthread.so.0[0x3261c079d1]
/lib64/libc.so.6(clone+0x6d)[0x32618e8b6d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (2bcb6195cf30): is an invalid pointer
Connection ID (thread ID): 963084984
Status: NOT_KILLED

Above is The Error Log,and Thread ID 963084984 is some Inserts :#240321 14:15:42 server id 75  end_log_pos 709795422 CRC32 0xd5a1241e   Query   thread_id=963084984     exec_time=0     error_code=0
SET TIMESTAMP=1711001742/*!*/;
BEGIN
/*!*/;
# at 709795422
#240321 14:15:42 server id 75  end_log_pos 709795512 CRC32 0x7eda287d   Table_map: `openser`.`ccpplus_req_local_record` mapped to number 45869883
# at 709795512
#240321 14:15:42 server id 75  end_log_pos 709795979 CRC32 0x876b1fcc   Write_rows: table id 45869883 flags: STMT_END_F
### INSERT INTO `openser`.`ccpplus_req_local_record`
### SET
###   @1=60892049
###   @2='c1d5d38299c00d2df5cc40c249d2da0a'
###   @3=2
###   @4='http://10.*.*.*:8***/DataSync';
###   @5='<?xml version="1.0" encoding="utf-8"?><Request><action>UPDATE</action><type>SQL_ID</type><sql_key>200026</sql_key><sql_cond>ff808081894f2503018e5</sql_cond></Reques
t>'
###   @6='000000'
###   @7='success'
###   @8='<?xml version="1.0" encoding="UTF-8"?>\x0d\x0a<response>\x0d\x0a<head>\x0d\x0a<statuscode>000000</statuscode>\x0d\x0a<statusmsg>success</statusmsg>\x0d\x0a</head>\x0d\x0a</res
ponse>\x0d\x0a'
###   @9='2024-03-21 14:15:42'
# at 709795979
#240321 14:15:42 server id 75  end_log_pos 709796010 CRC32 0xe4f4c1f7   Xid = 211027521743
COMMIT/*!*/;
# at 709796010
#240321 14:15:42 server id 75  end_log_pos 709796075 CRC32 0x6fe1fe6e   GTID    last_committed=39046    sequence_number=39047   rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= 'a827cef2-38e1-11e8-9070-78586064b1f7:3629542414'/*!*/;
# at 709796075

The Table Structure:
CREATE TABLE `ccpplus_req_local_record` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `relate_code` varchar(32) NOT NULL DEFAULT '-1' ,
  `module_type` int(11) NOT NULL ,
  `req_url` varchar(255) DEFAULT NULL ,
  `req_body` mediumtext COMMENT ,
  `send_code` varchar(32) NOT NULL ,
  `send_desc` varchar(255) DEFAULT ,
  `send_body` mediumtext COMMENT ,
  `inTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_mode` (`module_type`),
  KEY `index_intime` (`inTime`),
  KEY `index_code_desc` (`send_code`,`send_desc`) USING BTREE,
  KEY `index_desc` (`send_desc`) USING BTREE
) ENGINE=InnoDB。

All I can do is locating this:
(gdb) b *0xd1117e
Breakpoint 1 at 0xd1117e: file /export/home/pb2/build/sb_0-36131509-1569573142.98/mysql-5.7.28/sql/sql_db.cc, line 1689.
(gdb) b *0xd10509
Breakpoint 2 at 0xd10509: file /export/home/pb2/build/sb_0-36131509-1569573142.98/mysql-5.7.28/sql/sql_class.h, line 4178.

Also cannot find any similar bugs,any thoughts?

How to repeat:
Cannot repeat this
[21 Mar 2024 12:11] MySQL Verification Team
Hi Mr. He,

Thank you for your bug report.

However, version 5.7 is no longer supported.

If you hit any bug in MySQL version 8.0, please report it with a fully repeatable test case, which will consist of the set of SQL statements, that we can try to repeat.

Unsupported.