Description

If server has 10K tables and after restart, MySQL server crashes and refuses to start. Server cannot start.

 

024-07-11T13:03:54.829637Z 1 [Note] [MY-012357] [InnoDB] Reading DD tablespace files 2024-07-11T13:03:54Z UTC - mysqld got signal 11 ; Signal SIGSEGV (Address not mapped to object) at address 0x508 Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. BuildID[sha1]=16f2b92d4b462f8210539e0b256540bb5c12320c Thread pointer: 0x0 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 = 0 thread_stack 0x100000

 

How to reproduce:

sudo docker run --name mysql-9.0.0 -p 3306:3306 -p 3060:3060 -e MYSQL_ROOT_HOST='%' -e MYSQL_ROOT_PASSWORD='mysql' -d mysql:9.0.0 --log-error-verbosity=3


verify docker is running

use the following script from chatGPT to create 12K tables:
ensure that you have MySQL client available in the PATH.


#!/bin/bash # MySQL connection details MYSQL_HOST="127.0.0.1" MYSQL_PORT="3306" MYSQL_USER="root" MYSQL_PASSWORD="mysql" MYSQL_DATABASE="test" # Number of tables to create NUM_TABLES=12000 THREADS=16 # MySQL command to execute MYSQL_CMD="mysql -h $MYSQL_HOST -P $MYSQL_PORT -u $MYSQL_USER -p$MYSQL_PASSWORD" # Check MySQL connection echo "Checking MySQL connection..." echo "SELECT 1;" | $MYSQL_CMD 2>/dev/null if [ $? -ne 0 ]; then echo "Error: Unable to connect to MySQL. Please check your connection details." exit 1 fi # Create database if it doesn't exist echo "Creating database if it doesn't exist..." echo "CREATE DATABASE IF NOT EXISTS $MYSQL_DATABASE;" | $MYSQL_CMD # Use the created or existing database MYSQL_CMD="$MYSQL_CMD $MYSQL_DATABASE" # Function to create a table create_table() { local table_name="table_$1" local sql="CREATE TABLE IF NOT EXISTS $table_name (id INT PRIMARY KEY AUTO_INCREMENT, data VARCHAR(255));" echo "$sql" | $MYSQL_CMD if [ $? -eq 0 ]; then echo "success" else echo "failure" fi } export -f create_table export MYSQL_CMD # Generate a sequence of table numbers and run the create_table function in parallel success_count=$(seq 1 $NUM_TABLES | parallel -j $THREADS create_table | grep -c "success") echo "Completed creating $success_count tables out of $NUM_TABLES."



sudo docker stop mysql-9.0.0 sudo docker start mysql-9.0.0 sudo docker ps → nothing running here as MySQL crashed sudo docker logs mysql-9.0.0

Attachments

3
  • 11 Jul 2024, 07:03 PM
  • 11 Jul 2024, 04:17 PM
  • 11 Jul 2024, 03:15 PM

Smart Checklist

hide

Activity

Show:

Aaditya Dubey December 1, 2023 at 2:24 PM

Hi ,

Thank you for the report.

takis.stathopoulos October 5, 2023 at 12:06 PM

should we include in the Release Notes that this is fixed with 2.40 and that it might affect users upgrading to 2.38,39?

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Satya Bodapati

Reporter

Satya Bodapati

Priority

Needs QA

No

Regression Issue

Yes

Smart Checklist

Created July 11, 2024 at 1:15 PM
Updated November 4, 2024 at 12:34 PM
Resolved September 11, 2024 at 7:38 PM

Flag notifications