Bug #80179 mtr rpl.rpl_innodb_bug28430 asserts on power8
Submitted: 28 Jan 2016 3:48 Modified: 7 Nov 2017 4:02
Reporter: Daniel Black Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.10 OS:Linux (ppc64le)
Assigned to: CPU Architecture:Any
Tags: power, POWER8

[28 Jan 2016 3:48] Daniel Black
Description:
CURRENT_TEST: rpl.rpl_innodb_bug28430
mysqltest: At line 135: query 'CALL test.proc_norm()' failed: 2013: Lost connection to MySQL server during query

The result from queries just before the failure was:
< snip >
BEGIN
DECLARE ins_count INT DEFAULT 1000;
DECLARE del_count INT;
DECLARE cur_user VARCHAR(255);
DECLARE local_uuid VARCHAR(255);
DECLARE local_time TIMESTAMP;
SET local_time= NOW();
SET cur_user = CURRENT_USER();
SET local_uuid=UUID();
WHILE ins_count > 0 DO
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(),
ins_count,'Going to test MBR for MySQL');
SET ins_count = ins_count - 1;
END WHILE;
SELECT MAX(id) FROM test.byrange_tbl INTO del_count;
WHILE del_count > 0 DO
DELETE FROM test.byrange_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
safe_process[55536]: Child process: 55541, exit: 1

 - the logfile can be found in '/build/build/mysql-test/var/log/rpl.rpl_innodb_bug28430-mix/rpl_innodb_bug28430.log'
 - found 'core' (0/5)

Trying 'dbx' to get a backtrace

Trying 'gdb' to get a backtrace
Compressed file /build/build/mysql-test/var/log/rpl.rpl_innodb_bug28430-mix/mysqld.1/data/core

Only  821  of 4755 completed.
mysql-test-run: *** ERROR: Not all tests completed

#5  0x00003fff893119a0 in abort () from /opt/at9.0-2-rc2/lib64/power8/libc.so.6
No symbol table info available.
#6  0x0000000010335e20 in ut_dbg_assertion_failed (expr=0x112c5a98 "srv_sys->n_threads_active[type] < srv_n_purge_threads - 1", file=0x112c5978 "/build/mysql/storage/innobase/srv/srv0srv.cc", line=897)
    at /build/mysql/storage/innobase/ut/ut0dbg.cc:67
No locals.
#7  0x0000000010d30e24 in srv_release_threads (type=<optimized out>, n=<optimized out>) at /build/mysql/storage/innobase/srv/srv0srv.cc:896
        slot = <optimized out>
        i = 4
        count = 0
#8  0x0000000010d36d34 in srv_que_task_enqueue_low (thr=0x100364c43b8) at /build/mysql/storage/innobase/srv/srv0srv.cc:2861
No locals.
#9  0x0000000010d66d48 in trx_purge (n_purge_threads=4, batch_size=<optimized out>, truncate=<optimized out>) at /build/mysql/storage/innobase/trx/trx0purge.cc:1835
        i = 2
        thr = <optimized out>
#10 0x0000000010d38490 in srv_do_purge (n_total_purged=<synthetic pointer>, n_threads=4) at /build/mysql/storage/innobase/srv/srv0srv.cc:2605
        count = 1347
        rseg_history_len = 462
        n_pages_purged = <optimized out>
        old_activity_count = 1675
        n_use_threads = 4
#11 srv_purge_coordinator_thread (arg=<optimized out>) at /build/mysql/storage/innobase/srv/srv0srv.cc:2777
        thd = <optimized out>
        slot = 0x10036177188
        n_total_purged = 0
        rseg_history_len = <optimized out>
        n_pages_purged = <optimized out>
        temp_batch_size = <optimized out>
#12 0x00003fff898c7efc in ?? () from /opt/at9.0-2-rc2/lib64/power8/libpthread.so.0
No symbol table info available.
#13 0x00003fff893ff920 in clone () from /opt/at9.0-2-rc2/lib64/power8/libc.so.6
No symbol table info available.
(gdb) up
#1  0x0000000010b9b3c0 in my_write_core (sig=<optimized out>) at /build/mysql/mysys/stacktrace.c:247
247       pthread_kill(my_thread_self(), sig);
(gdb) up
#2  0x000000001036e404 in handle_fatal_signal (sig=<optimized out>) at /build/mysql/sql/signal_handler.cc:220
220         my_write_core(sig);
(gdb) up
#3  <signal handler called>
(gdb) up
#4  0x00003fff8930efc0 in raise () from /opt/at9.0-2-rc2/lib64/power8/libc.so.6
(gdb) up
#5  0x00003fff893119a0 in abort () from /opt/at9.0-2-rc2/lib64/power8/libc.so.6
(gdb) up
#6  0x0000000010335e20 in ut_dbg_assertion_failed (expr=0x112c5a98 "srv_sys->n_threads_active[type] < srv_n_purge_threads - 1", file=0x112c5978 "/build/mysql/storage/innobase/srv/srv0srv.cc", line=897)
    at /build/mysql/storage/innobase/ut/ut0dbg.cc:67
67              abort();
(gdb) p srv_n_purge_threads
$1 = 4
(gdb) p type
No symbol "type" in current context.
(gdb) p srv_sys->n_threads_active
$2 = {0, 3, 1, 1}

How to repeat:
cmake ../mysql -DBUILD_CONFIG=mysql_release -DDOWNLOAD_BOOST=1 -DWITH_BOOST=build_boost -DCMAKE_C_COMPILER=${CC:-gcc} -DCMAKE_CXX_COMPILER=${CXX:-g++}

build@333bd30a77c3:~/build$ $CC --version
gcc (GCC) 5.3.1 20151214 (Advance-Toolchain-) [ibm/gcc-5-branch, revision: 231629 merged from gcc-5-branch, revision 231573]

build@333bd30a77c3:~/build$ $CXX --version
g++ (GCC) 5.3.1 20151214 (Advance-Toolchain-) [ibm/gcc-5-branch, revision: 231629 merged from gcc-5-branch, revision 231573]
[28 Jan 2016 3:49] Daniel Black
backtrace

Attachment: bt.log (text/x-log), 44.98 KiB.

[7 Nov 2017 4:02] Daniel Black
duplicate of bug #80426