Assert in handler::update_auto_increment (sig6) | /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:3174: int handler::update_auto_increment(): Assertion `next_insert_id >= auto_inc_interval_for_cur_row.minimum()' failed.

Bug #1204381 reported by Roel Van de Paar on 2013-07-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.7
5.1
Undecided
Unassigned
5.5
High
Unassigned
5.6
High
Unassigned
5.7
High
Unassigned

Bug Description

2013-07-20 07:43:47 18107 [Note] /ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64/bin/mysqld: ready for connections.
Version: '5.6.12-rc60.4-debug-log' socket: '/ssd/209184/current1_5/tmp/master.sock' port: 13080 Percona Server with XtraDB (GPL), Release rc60.4, Revision 405-debug
mysqld: /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:3174: int handler::update_auto_increment(): Assertion `next_insert_id >= auto_inc_interval_for_cur_row.minimum()' failed.
04:48:06 UTC - mysqld got signal 6 ;

Thread 1 (LWP 18135):
+bt
#0 0x000000340cc0c69c in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000686bde in handle_fatal_signal (sig=6) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/signal_handler.cc:251
#2 <signal handler called>
#3 0x000000340c4328a5 in raise () from /lib64/libc.so.6
#4 0x000000340c434085 in abort () from /lib64/libc.so.6
#5 0x000000340c42ba1e in __assert_fail_base () from /lib64/libc.so.6
#6 0x000000340c42bae0 in __assert_fail () from /lib64/libc.so.6
#7 0x00000000005bc064 in handler::update_auto_increment (this=0x7fcbec084620) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:3174
#8 0x0000000000a06099 in ha_innobase::write_row (this=0x7fcbec084620, record=0x7fcbec08b000 <incomplete sequence \325>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/storage/innobase/handler/ha_innodb.cc:6888
#9 0x00000000005b9f44 in handler::ha_write_row (this=0x7fcbec084620, buf=0x7fcbec08b000 <incomplete sequence \325>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/handler.cc:7419
#10 0x00000000007040c0 in write_record (thd=0x27263a0, table=0x7fcbec0cd5e0, info=0x7fcbec0a6ab8, update=0x7fcbec0a6b30) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_insert.cc:1889
#11 0x0000000000704bf5 in select_insert::send_data (this=0x7fcbec0a6a70, values=...) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_insert.cc:3674
#12 0x00000000006f5fb8 in end_send (join=0x7fcbec0a6bb0, join_tab=0x7fcbec08f880, end_of_records=false) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_executor.cc:2774
#13 0x00000000006f75da in evaluate_join_record (join=0x7fcbec0a6bb0, join_tab=0x7fcbec08f580) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_executor.cc:1597
#14 0x00000000006fbcd6 in sub_select (join=0x7fcbec0a6bb0, join_tab=0x7fcbec08f580, end_of_records=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_executor.cc:1272
#15 0x00000000006fd38b in do_select (join=0x7fcbec0a6bb0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_executor.cc:930
#16 JOIN::exec (this=0x7fcbec0a6bb0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_executor.cc:191
#17 0x00000000007492d0 in mysql_execute_select (free_join=true, select_lex=0x2728e78, thd=0x27263a0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_select.cc:1101
#18 mysql_select (thd=0x27263a0, tables=0x7fcbec0055c8, wild_num=1, fields=..., conds=0x7fcbec0a6960, order=<optimized out>, group=0x2728f78, having=0x0, select_options=3489925888, result=0x7fcbec0a6a70, unit=0x2728830, select_lex=0x2728e78) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_select.cc:1222
#19 0x0000000000749dbb in handle_select (thd=0x27263a0, result=0x7fcbec0a6a70, setup_tables_done_option=1073741824) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_select.cc:111
#20 0x0000000000726748 in mysql_execute_command (thd=0xffffffffffffdc58) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:3727
#21 0x0000000000727818 in mysql_parse (thd=0x27263a0, rawbuf=0x2728768 "\360R7\001", length=<optimized out>, parser_state=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:6477
#22 0x000000000072871f in dispatch_command (command=COM_QUERY, thd=0x27263a0, packet=0x272e911 "INSERT IGNORE INTO `O` SELECT * FROM `G` WHERE EXISTS (SELECT * FROM `N` WHERE ( `col_varchar_255_key` = NULL OR `col_varchar_10_key` = 'can' ) AND `col_varchar_255` < NULL AND (`col_varchar_255_key` < REPEAT(27, 'mean'))) OR 779878400 > RAND(2470969344)", packet_length=254) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:1374
#23 0x0000000000729a47 in do_command (thd=0x27263a0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_parse.cc:1049
#24 0x00000000006ed63f in do_handle_one_connection (thd_arg=<optimized out>) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_connect.cc:1615
#25 0x00000000006ed727 in handle_one_connection (arg=0x27263a0) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/sql/sql_connect.cc:1526
#26 0x00000000009dd6c9 in pfs_spawn_thread (arg=0x266a330) at /bzr/5.6_dbg/Percona-Server-5.6.12-rc60.4/storage/perfschema/pfs.cc:1855
#27 0x000000340cc07851 in start_thread () from /lib64/libpthread.so.0
#28 0x000000340c4e890d in clone () from /lib64/libc.so.6

Roel Van de Paar (roel11) wrote :
Roel Van de Paar (roel11) wrote :
Roel Van de Paar (roel11) wrote :
summary: - Assert in handler::update_auto_increment (sig6) in /bzr/5.6_dbg/Percona-
+ Assert in handler::update_auto_increment (sig6) | /bzr/5.6_dbg/Percona-
Server-5.6.12-rc60.4/sql/handler.cc:3174: int
handler::update_auto_increment(): Assertion `next_insert_id >=
auto_inc_interval_for_cur_row.minimum()' failed.
Roel Van de Paar (roel11) wrote :

[roel@qaserver 209184]$ cat cmd853
ps -ef | grep 'cmdrun_853' | grep -v grep | awk '{print $2}' | xargs sudo kill -9
rm -Rf /ssd/209184/cmdrun_853
mkdir /ssd/209184/cmdrun_853
cd /ssd/randgen
bash -c "set -o pipefail; perl /ssd/randgen/runall.pl --queries=100000000 --seed=17787 --duration=300 --querytimeout=60 --reporter=Shutdown,Backtrace,Queut,ErrorLog,ErrorLogAlarm --mysqld=--log-output=none --mysqld=--sql_mode=ONLY_FULL_GROUP_BY --mysqld=--slow_query_log --mysqld=--userstat --threads=1 --b/ssd/Percona-Server-5.6.12-rc60.4-405-debug.Linux.x86_64 --grammar=/tmp/976291/46.yy --gendata=/ssd/randgen/conf/percona/outer_join_percona.zz --mtr-build=789 --mask=21133 --vardir1=/ssd/209184/cmdrun_853 > /ssd/209184/cmdrun853.log 2>&1"

Roel Van de Paar (roel11) wrote :

May or may not be upstream, need upstream verification first.

Roel Van de Paar (roel11) wrote :

I tried reproducing the bug (on PS, to then make testcase), but it didn't work, issue did not reproduce (though I got a bunch of Valgrind warnings logged now in bug 1204873 - please check if related). May be sporadic issue. Can code review or core analysis help us further here?

Bug 1204873 is unrelated. Will try to review the code.

tags: added: 56qual
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers