Bug #97223 Core at flst_read_addr addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
Submitted: 15 Oct 2019 8:09 Modified: 15 Nov 2019 8:37
Reporter: dave do Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:8.0.16 OS:Any
Assigned to: CPU Architecture:Any

[15 Oct 2019 8:09] dave do
Description:
Got a core with pquery test which is got quite frequent, 4 out of 50 iterate.

The stack is shown as below:

#0  0x00007fca32d1d9b1 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000045b0380 in my_write_core (sig=6) at /export/home/duyu/mysql_code/mysql-8.0.16/mysys/stacktrace.cc:284
#2  0x0000000003312551 in handle_fatal_signal (sig=6) at /export/home/duyu/mysql_code/mysql-8.0.16/sql/signal_handler.cc:168
#3  <signal handler called>
#4  0x00007fca30fcb1f7 in raise () from /lib64/libc.so.6
#5  0x00007fca30fcc8e8 in abort () from /lib64/libc.so.6
#6  0x00000000049cd484 in ut_dbg_assertion_failed (expr=0x632c0b0 "addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA",
    file=0x632bff0 "/export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/include/fut0lst.ic", line=86)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/ut/ut0dbg.cc:92
#7  0x00000000049c6e1c in flst_read_addr (faddr=0x7fca0826c050 "", mtr=0x7fca1df61c60)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/include/fut0lst.ic:86
#8  0x00000000049c6f54 in flst_get_last (base=0x7fca0826c046 "", mtr=0x7fca1df61c60)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/include/fut0lst.ic:129
#9  0x00000000049c9a67 in trx_undo_mem_init (rseg=0x7fca1846d698, id=1, page_no=370, mtr=0x7fca1df61c60)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/trx/trx0undo.cc:1134
#10 0x00000000049c9e87 in trx_undo_lists_init (rseg=0x7fca1846d698) at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/trx/trx0undo.cc:1205
#11 0x00000000049a9bef in trx_rseg_mem_create (id=0, space_id=4294967278, page_no=4, page_size=..., purge_queue=0x7fca187bcd88, mtr=0x7fca1df62290)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/trx/trx0rseg.cc:208
#12 0x00000000049aa1f0 in trx_rsegs_init (purge_queue=0x7fca187bcd88) at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/trx/trx0rseg.cc:341
#13 0x00000000049ae5df in trx_sys_init_at_db_start () at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/trx/trx0sys.cc:314
#14 0x000000000494817a in srv_start (create_new_db=false, scan_directories=...)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/srv/srv0start.cc:2627
#15 0x00000000046cb5b5 in innobase_init_files (dict_init_mode=DICT_INIT_CHECK_FILES, tablespaces=0x7fca1df6b620)
    at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/handler/ha_innodb.cc:4994
#16 0x00000000046da281 in innobase_ddse_dict_init (dict_init_mode=DICT_INIT_CHECK_FILES, version=80016, tables=0x7fca1df6b640,
    tablespaces=0x7fca1df6b620) at /export/home/duyu/mysql_code/mysql-8.0.16/storage/innobase/handler/ha_innodb.cc:11657
#17 0x00000000042fac31 in dd::bootstrap::DDSE_dict_init (thd=0x79aa1d0, dict_init_mode=DICT_INIT_CHECK_FILES, version=80016)
    at /export/home/duyu/mysql_code/mysql-8.0.16/sql/dd/impl/bootstrap/bootstrapper.cc:745
#18 0x00000000044f9048 in dd::upgrade_57::do_pre_checks_and_initialize_dd (thd=0x79aa1d0)
    at /export/home/duyu/mysql_code/mysql-8.0.16/sql/dd/upgrade_57/upgrade.cc:911
#19 0x0000000003434c41 in bootstrap::handle_bootstrap (arg=0x79aa1d0) at /export/home/duyu/mysql_code/mysql-8.0.16/sql/bootstrap.cc:347
#20 0x0000000004cc058b in pfs_spawn_thread (arg=0x79b3220) at /export/home/duyu/mysql_code/mysql-8.0.16/storage/perfschema/pfs.cc:2836
#21 0x00007fca32d18e25 in start_thread () from /lib64/libpthread.so.0
#22 0x00007fca3108e34d in clone () from /lib64/libc.so.6

How to repeat:
run pquery with ./pquery-run.sh pquery-run-MS80-816.conf

conf file content:

#!/bin/bash
# Created by Roel Van de Paar, Percona LLC
# Updated by Ramesh Sivaraman, Percona LLC

# Welcome to the pquery-run.sh configuration file (pquery-run.conf). Feel free to copy this file, edit the copy & change the CONFIGURATION_FILE variable in pquery-run.sh to match! 
# Please do not change this file unless your name is listed above. As a template/default, it is the only configuration file which is maintained whenever pquery-run.sh is updated.

# ========================================= User configurable variables: generics 1 ===============================================
PQUERY_BIN=${SCRIPT_PWD}/pquery/pquery2-ms                           # pquery2-ps: Percona Server, pquery2-ms: MySQL, pquery2-ws: WS/FB: WSS/fb-mysql, pquery-md: MariaDB
USE_GENERATOR_INSTEAD_OF_INFILE=0                                    # If enabled, high quality generated SQL is used (the generator is located in percona-qa/generator)
ADD_INFILE_TO_GENERATED_SQL=0                                        # If enabled, and if USE_GENERATOR_INSTEAD_OF_INFILE=1, then the INFILE is added to the generator output
                                                                     # Should be used with caution when a lage INFILE is used. It is ideal for small input files (feature testing)
#INFILE=${SCRIPT_PWD}/pquery/main-ms-ps-md.sql.tar.xz                 # Default: main-ms-ps-md.sql (mtr_to_sql.sh of all major distro's + engine mix). Use main-ws.sql for mysql-fb
INFILE=${SCRIPT_PWD}/zxf21t2.sql
#INFILE=${SCRIPT_PWD}/zxf6t.sql
OPTIONS_INFILE=${SCRIPT_PWD}/pquery/mysqld_options_ms_80.txt         # Set to the right distribution + version to match mysqld options (as generated by generate_mysqld_options.sh)
                                                                     # mysqld_options_ps_56.txt, mysqld_options_ms_56.txt, mysqld_options_ms_57.txt, mysqld_options_ps_55.txt etc.
#TOKUDB_OPTIONS_INFILE=${SCRIPT_PWD}/pquery/mysqld_options_tokudb.txt # TokuDB options list
BASEDIR=/export/home/duyu/mysql-8016                 # MySQL Basedir. Required for all runs, including PXC 
WORKDIR=/export/home/duyu/percona/logs/$RANDOMD                                                # Working directory. Here we keep the log files, option list, failed items. Please leave $RANDOMD!
RUNDIR=/export/home/duyu/percona/tmp/$RANDOMD                                             # Run directory. Keeps a copy of the data dir template & stores mysqld runs (--datadir=x). Pls leave $RANDOMD!
SYSBENCH_DATALOAD=0                                                  # Sysbench data load. Normally set to 0 (off)

mkdir -p $(dirname ${WORKDIR})
mkdir -p $(dirname ${RUNDIR}) 

# ========================================= User configurable variables: generics 2 ===============================================
TRIALS=150                                                     # Number of individual trials to execute (one can always interrupt with ctrl+c also)
ADD_RANDOM_OPTIONS=0                                           # Add random mysqld --options to MYEXTRA using an input file. 1=On, 0=off. (Auto-disabled if PXC=1)
ADD_RANDOM_TOKUDB_OPTIONS=0                                    # Add random tokudb --options to MYEXTRA using an input file. 1=On, 0=off. (Auto-disabled if PXC=1)
MAX_NR_OF_RND_OPTS_TO_ADD=5                                    # Max nr of random options to add (minimum is always 1). Recommended: 4. Counts per ADD_RANDOM_... option above (x2)
SAVE_TRIALS_WITH_CORE_OR_VALGRIND_ONLY=1                       # Save only trials that generate a core file (good for initial few runs where there are lot of crashes/asserts)
SAVE_SQL=1                                                     # Saves per-trial SQL even if SAVE_TRIALS_WITH_CORE_OR_VALGRIND_ONLY=1. Main usecase: full server lockups/hangs
STORE_COPY_OF_INFILE=1                                         # Store a copy of the INFILE SQL input file in the work directory (not related to per-trial SQL)
PQUERY_RUN_TIMEOUT=1800                                          # x sec max trial runtime within which pquery tries to process QUERIES_PER_THREAD x THREADS queries against 1 mysqld
QUERIES_PER_THREAD=30000                                       # Maximum number of queries executed per thread (THREADS) per trial (small = faster reduction, large = more crashes)
QUERIES_PER_GENERATOR_RUN=100000                                # Used when USE_GENERATOR_INSTEAD_OF_INFILE=1. Default: 20000. Generating 10K queries takes about 15 seconds on SSD
GENERATE_NEW_QUERIES_EVERY_X_TRIALS=10                         # Run the SQL Generator every x trials. Default is 10. This aids runs as less time is spent generating queries
MYINIT="--log-bin --innodb_strict_mode=OFF --innodb_adaptive_hash_index=OFF --innodb_checksum_algorithm=none --innodb_change_buffering=none --default_authentication_plugin=mysql_native_password --skip-ssl --skip-mysqlx "                                                      # Extra options to pass to mysqld AND at data directory init time, for 
MYEXTRA="--log-bin --innodb_strict_mode=OFF --innodb_adaptive_hash_index=OFF --innodb_checksum_algorithm=none --innodb_change_buffering=none --default_authentication_plugin=mysql_native_password --skip-ssl --skip-mysqlx "                                                     # Extra options to pass to mysqld. Examples below
MYSAFE="--no-defaults --max_allowed_packet=33554432 --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY" #5.6/5.7
                                                               # MYSAFE: See http://bugs.mysql.com/?id=73916 re: testing env setup. MYSAFE ensures cleaner/better QA runs
THREADS=50                                                      # Number of threads to use. Default: 1. Set to >1 to enable multi-threaded runs. Also see MULTI_THREADED_TESTC_LINES
MULTI_THREADED_TESTC_LINES=50000                               # Only takes effect if THREADS>1. pquery-run will take this amount of lines to form individual testcases for multi-threaded runs. IOW, if THREADS=1, pquery-run will just run one client, continously getting random queries out of INFILE, untill QUERIES_PER_THREAD queries is reached (if mysqld does not crash earlier). On the other hand, if THREADS>1, pquery-run will take a random chunk out of INFILE (to the amount of MULTI_THREADED_TESTC_LINES lines) _before_ starting each trial run. It will then run pquery, with THREADS threads, only using that smaller chunk extracted from INFILE. These individual SQL input files are saved in the trial's dirtory. You may want to keep this number small to ensure that true-multi-threaded testcase reduction using reducer.sh is still sufficiently fast (25K lines takes a few days to reduce), while keeping it large enough to ensure crashes/asserts to start with.

# ==== PS 8.0 example: 
#NO FEATURES ARE PRESENT YET! MYEXTRA="--log-bin --server-id=0 --thread_handling=pool-of-threads --plugin-load=tokudb=ha_tokudb.so --tokudb-check-jemalloc=0 --init-file=${SCRIPT_PWD}/plugins_80.sql"
#MYEXTRA="--log-bin --server-id=0 --init-file=${SCRIPT_PWD}/plugins_80.sql --innodb_file_per_table=1 --binlog_format=STATEMENT"

# ==== Other MYEXTRA examples
#MYEXTRA="--max-connections=2048 --performance-schema --performance-schema-instrument='%=on'"                                         # Use for PMM testing   
#MYEXTRA="--default-tmp-storage-engine=MyISAM --rocksdb --skip-innodb --default-storage-engine=RocksDB"                               # Use for generic RocksDB testing
#MYEXTRA="--innodb_file_per_table=1 --innodb_flush_method=O_DIRECT --log-bin --binlog_format=MIXED"                                   # Example of some specific options
#MYEXTRA="--innodb_track_changed_pages"                                                                                               # Example of PS specific option

# ========================================= User configurable variables to enable query correctness testing ======================
# Note: if/when using RocksDB as a primary or secondary engine, it must be spelled correctly as: RocksDB. Variations like: rocksdb will cause failures in this script
QUERY_CORRECTNESS_TESTING=0                                    # Set to 1 to enable query correctness testing. Normally set to 0 (off)
QUERY_CORRECTNESS_MODE=2                                       # Sets the result comparison modes: 0: errors/warnings, 1: 'changed rows' comparision, 2: actual query results
QC_NR_OF_STATEMENTS_PER_TRIAL=2000                             # Number of queries sampled/used per trial (executed against both engines below, then results are compared)
QC_PRI_ENGINE=RocksDB                                          # Primary comparison engine for query correctness testing. Make sure to match this with MYEXTRA ('left engine')
QC_SEC_ENGINE=InnoDB                                           # Secondary comparison engine for query correctness testing. Make sure to match this with MYEXTRA2 ('right engine')
MYEXTRA2="--default-tmp-storage-engine=MyISAM --default-storage-engine=InnoDB --collation-server=latin1_bin"                          # Used for secondary mysqld (RocksDB testing)

# ========================================= User configurable variables to enable query duration testing =========================
QUERY_DURATION_TESTING=0                                       # Partially implemented only. Needs further development.

# ========================================= User configurable variables to enable Valgrind testing only ==========================
VALGRIND_RUN=0                                                 # Set to 1 to make this a Valgrind run. Do not change VALGRIND_CMD unless you fully understand the change being made
VALGRIND_CMD="valgrind --suppressions=${BASEDIR}/mysql-test/valgrind.supp --num-callers=40 --show-reachable=yes --track-origins=yes"
VALGRIND_ERRORS_FOUND=0

# ========================================= User configurable variables to enable crash recovery testing only ====================
CRASH_RECOVERY_TESTING=1                                      # Set to 1 to make this a crash recovery test (terminates server after x seconds and then attempts crash recovery)
#CRASH_RECOVERY_INFILE=${SCRIPT_PWD}/zxf6t.sql 
CRASH_RECOVERY_INFILE=${SCRIPT_PWD}/zxf21t2.sql                 # Currently using simple.sql for crash recovery testing. This can be changed/expanded upon
CRASH_RECOVERY_KILL_BEFORE_END_SEC=121                          # Kill the server x seconds before the end of the trial. Ensure trial duration is somewhat larger then this

# ========================================= User configurable variables to configure PS testing only =============================
SKIP_JEMALLOC_FOR_PS=0                                         # Skip LD_PRELOAD'ing of JEMALLOC. Only indicated for testing PS without TokuDB against default memory manager

# ========================================= User configurable variables to enable/for PXC testing only ===========================
PXC=0                                                          # Set to 1 to make this a PXC testing run
PXC_CLUSTER_RUN=0                                              # Set to 1 to make this a pxc pquery cluster run (enables multi-node SQL instead of using a single node only)
PXC_CLUSTER_CONFIG=${SCRIPT_PWD}/pquery/pquery-cluster.cfg     # Default pquery cluster configuration file.
PXC_START_TIMEOUT=200                                          # Should not be necessary to change. Default: 200
PXC_ADD_RANDOM_OPTIONS=1                                       # Set to 1 to add random PXC mysqld options
PXC_MAX_NR_OF_RND_OPTS_TO_ADD=4                                # Max nr of random PXC mysqld options to add (minimum is always 1). Recommended: 4
PXC_OPTIONS_INFILE=${SCRIPT_PWD}/pquery/mysqld_options_pxc_56.txt  # PXC mysqld options list
PXC_WSREP_ADD_RANDOM_WSREP_MYSQLD_OPTIONS=1                    # Set to 1 to add PXC wsrep mysqld options 
PXC_WSREP_MAX_NR_OF_RND_OPTS_TO_ADD=3                          # Maximum number of random PXC wsrep mysqld options to add 
PXC_WSREP_OPTIONS_INFILE=${SCRIPT_PWD}/pquery/mysqld_options_pxc_wsrep_56.txt  # PXC wsrep mysqld options list
PXC_WSREP_PROVIDER_ADD_RANDOM_WSREP_PROVIDER_CONFIG_OPTIONS=1  # Set to 1 to add PXC wsrep provider (Galera) configuration options
PXC_WSREP_PROVIDER_MAX_NR_OF_RND_OPTS_TO_ADD=2                 # Maximum number of PXC wsrep provider (Galera) configuration options to add 
PXC_WSREP_PROVIDER_OPTIONS_INFILE=${SCRIPT_PWD}/pquery/wsrep_provider_options_pxc_56.txt  # PXC wsrep provider (Galera) configuration options list
PXC_IGNORE_ALL_OPTION_ISSUES=1                                 # Never end a run if wsrep mysqld or wsrep configuration option issues were detected. This is a powerful option, 
                                                               # which does come with responsibility: you should check that your runs are running fine without them all ending
                                                               # immediately on mysqld startup, due to some faulty base MYEXTRA setting for example!

# ========================================= User configurable variables to enable/for Group Replication testing only =============
GRP_RPL=0                                                      # Set to 1 to make this a Group Replication testing run
GRP_RPL_CLUSTER_RUN=0                                          # Set to 1 to make this a Group Replication pquery cluster run (enables multi-node SQL instead of using a single node only)
GRP_RPL_CLUSTER_CONFIG=${SCRIPT_PWD}/pquery/pquery-cluster.cfg  # Default group replication pquery cluster configuration file.
GRP_RPL_START_TIMEOUT=200                                      # Should not be necessary to change. Default: 200

# ========================================= User configurable variables to enable pmm testing only ===============================
PMM=0                                                          # Set to 1 to make this a PMM testing run
PMM_CLEAN_TRIAL=0                                              # Set to 1 to clean pmm-client service after every trial
PMM_VERSION_CHECK="1.0.5"                                      # Set PMM admin version to use PMM testing
[15 Oct 2019 8:37] MySQL Verification Team
Thank you for the bug report. We don't use pquery tool for test, anyway you are using an older version of server, please test new release 8.0.18. Thanks.
[16 Nov 2019 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".