Not the answer you need?
Register and ask your own question!

why tokudb crash when using statement "replace into"?

leafonswordleafonsword ContributorInactive User Role Beginner
OS : Linux TENCENT64 2.6.32.43-tlinux-1.0.9-default #1 SMP Fri Jun 27 14:18:34 CST 2014 x86_64 x86_64 x86_64 GNU/Linux(Based on CentOS 6)
DB : 5.6.25-73.1-log Percona Server (GPL), Release 73.1, Revision 07b797f
TokuDB : tokudb-7.5.8 

I use sysbench to test, but I modify insert.lua 's "insert into" statement to "replace into",below is my sysbench command:
#!/bin/bash
# init
table_rows=10000000
query_num=10000000

for engine in   "tokudb" 
do
        for test_type in  "/tmp/sysbench-0.5/sysbench/tests/db/insert.lua"  
        do

                # benchmark for different threads
                for threads in 24
                do
                        echo ""
                        echo "------------Begin test:engine--$engine ;test_type--$test_type ; thread_number--$thread_num ; Time:$(date)----------------------"
                echo ""
                        ./sysbench \
                        --test=${test_type} \
                        --mysql-host=127.0.0.1 \
                        --mysql-port=3306 \
                        --mysql-user=sbtest \
                        --mysql-password=sbtest \
                        --mysql-db=sbtest_$engine \
                        --mysql-table-engine=${engine} \
                        --oltp-tables-count=8 \
                        --oltp-test-mode=complex \
                        --oltp-read-only=off \
                        --oltp-reconnect=on \
                        --oltp-table-size=${table_rows} \
                        --num-threads=${threads} \
                        --report-interval=1 \
                        --report-checkpoints=10 \
                        --rand-init=on \
                        --max-requests=${query_num} \
                        run
                done

        done
done

Then Mysqld gives error--"failed: 2013 Lost connection to MySQL server during query" as below:
ALERT: mysql_drv_query() for query 'replace INTO sbtest1 (id, k, c, pad) VALUES (0, 5002186, '58536965495-78773881251-34917510647-97357903386-71273091302-82245336611-03903471871-97500059011-30392441317-37372903787', '81653820896-01377506960-65675023330-38622363197-27224403063')' failed: 2013 Lost connection to MySQL server during query
ALERT: mysql_drv_query() for query 'replace INTO sbtest8 (id, k, c, pad) VALUES (0, 5037668, '05069356639-56212159833-52658096667-80229040948-57572676893-03567184272-52225645313-98776709024-48773142329-43534595806', '54851911957-38855482592-16106245067-69454628330-96967394971')' failed: 2013 Lost connection to MySQL server during query
ALERT: mysql_drv_query() for query 'replace INTO sbtest5 (id, k, c, pad) VALUES (0, 4972552, '69055276063-43896213498-66445197428-33159881555-57475295544-23474704055-59334563380-90000749927-81616390566-51696050375', '58609786519-56043350264-46943200872-62486635192-90807996939')' failed: 2013 Lost connection to MySQL server during query
ALERT: mysql_drv_query() for query 'replace INTO sbtest6 (id, k, c, pad) VALUES (0, 5244590, '70686473544-81685735035-19257510634-93032728167-26640870795-01349760706-77384806727-47139896920-91469343596-78191787149', '06868973854-84821871579-01570156066-52552011347-66169492803')' failed: 2013 Lost connection to MySQL server during query
ALERT: mysql_drv_query() for query 'replace INTO sbtest5 (id, k, c, pad) VALUES (0, 4970284, '09493593876-68752512190-34739388240-00120715715-00726234437-44338656972-32600027230-40682733701-06922053650-59590518876', '18633596638-75136226624-24500001003-88852002762-10602199479')' failed: 2013 Lost connection to MySQL server during query
...................................................................................

And mysql.err gives below information:
06:42:15 UTC - mysqld got signal 11 ;
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.
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.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=33554432
read_buffer_size=2097152
max_used_connections=24
max_threads=1002
thread_count=24
connection_count=24
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4150794 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7ff2f98fe000
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 = 7ff75e275ce0 thread_stack 0x30000
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(my_print_stacktrace+0x2c)[0x8f44ec]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(handle_fatal_signal+0x461)[0x67bc71]
/lib64/libpthread.so.0(+0xf4a0)[0x7ff7875134a0]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/lib/mysql/plugin/ha_tokudb.so(+0x7c8c6)[0x7ff75b4ce8c6]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/lib/mysql/plugin/ha_tokudb.so(_Z53toku_txn_manager_handle_snapshot_create_for_child_txnP7tokutxnP11txn_manager19__TXN_SNAPSHOT_TYPE+0x1b5)[0x7ff75b50e145]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/lib/mysql/plugin/ha_tokudb.so(_Z23toku_txn_begin_with_xidP7tokutxnPS0_P10tokulogger12txnid_pair_s19__TXN_SNAPSHOT_TYPEP13__toku_db_txnbb+0x143)[0x7ff75b566d63]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/lib/mysql/plugin/ha_tokudb.so(_Z14toku_txn_beginP13__toku_db_envP13__toku_db_txnPS2_j+0x30b)[0x7ff75b5671bb]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/lib/mysql/plugin/ha_tokudb.so(_ZN9ha_tokudb9write_rowEPh+0x5a5)[0x7ff75b4b8c25]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_ZN7handler12ha_write_rowEPh+0x97)[0x5c6907]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z12write_recordP3THDP5TABLEP9COPY_INFOS4_+0x215)[0x6e5045]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z12mysql_insertP3THDP10TABLE_LISTR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0x10a1)[0x6ea951]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z21mysql_execute_commandP3THD+0x1d73)[0x6fd803]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5a8)[0x702b28]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x107b)[0x70433b]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x162)[0x6d1842]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(handle_one_connection+0x40)[0x6d1930]
/usr/local/Percona-Server-5.6.25-rel73.1-Linux.x86_64.ssl098e/bin/mysqld(pfs_spawn_thread+0x143)[0x92bb43]
/lib64/libpthread.so.0(+0x77f1)[0x7ff78750b7f1]
/lib64/libc.so.6(clone+0x6d)[0x7ff785ccaccd]

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

You may download the Percona Server operations manual by visiting
http://www.percona.com/software/percona-server/. You may find information
in the manual which will help you identify the cause of the crash.
150730 14:42:15 mysqld_safe Number of processes running now: 0
150730 14:42:15 mysqld_safe mysqld restarted
------------------------------------------------------------------------------------------------------------
This ignored section is mysql's crash restart 's information.because word count limit ,I ignored
-------------------------------------------------------------------------------------------------------------
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.