Bug #44820 Server crash in ha_external_lock with Assertion `next_insert_id == 0' failed
Submitted: 12 May 2009 12:08 Modified: 7 Dec 2009 9:16
Reporter: Elena Stepanova Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.1.35-debug, 5.1.37-enterprise-commercial-advanced-debug, 5.4.4-alpha-debug OS:Linux
Assigned to: CPU Architecture:Any

[12 May 2009 12:08] Elena Stepanova
Description:
mysqld: handler.cc:4548: int handler::ha_external_lock(THD*, int): Assertion `next_insert_id == 0' failed.
090511 17:31:19 - mysqld got signal 6 ;

key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=67
max_threads=120
threads_connected=52
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 48336 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x2aaaac07ac20
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 = 0x44783190 thread_stack 0x40000
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(my_print_stacktrace+0x32) [0x9c53a2]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(handle_segfault+0x28a) [0x6389ec]
/lib64/libpthread.so.0 [0x2b6ab0354c00]
/lib64/libc.so.6(gsignal+0x35) [0x2b6ab09f4bb5]
/lib64/libc.so.6(abort+0x110) [0x2b6ab09f5fb0]
/lib64/libc.so.6(__assert_fail+0xf6) [0x2b6ab09ee286]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(handler::ha_external_lock(THD*, int)+0x6d) [0x77a371]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(ha_partition::external_lock(THD*, int)+0xef) [0x78a159]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(handler::ha_external_lock(THD*, int)+0x8a) [0x77a38e]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld [0x62e545]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(mysql_unlock_tables(THD*, st_mysql_lock*)+0x82) [0x62e8c6]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(close_thread_tables(THD*)+0x244) [0x69b186]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x1c84) [0x654a16]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(do_command(THD*)+0x24a) [0x654d82]
/export/home/pb2/test/sb_1-495515-1242050757.63/mysql-5.1.35-linux-x86_64-test/libexec/mysqld(handle_one_connection+0x11c) [0x641888]
/lib64/libpthread.so.0 [0x2b6ab034d143]
/lib64/libc.so.6(__clone+0x6d) [0x2b6ab0a858cd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x1ebee50 = INSERT INTO systest1.tb1_eng1 (i1, f1, f2, f3, f4)
SELECT i1, f1, f2, f3, f4
FROM systest1.t1_tmp WHERE pk = 4
thd->thread_id=13082
thd->killed=NOT_KILLED

backtrace:

#0  0x00002b6ab0351ea3 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000009c5446 in my_write_core (sig=6) at stacktrace.c:310
#2  0x0000000000638bd5 in handle_segfault (sig=6) at mysqld.cc:2536
#3  <signal handler called>
#4  0x00002b6ab09f4bb5 in raise () from /lib64/libc.so.6
#5  0x00002b6ab09f5fb0 in abort () from /lib64/libc.so.6
#6  0x00002b6ab09ee286 in __assert_fail () from /lib64/libc.so.6
#7  0x000000000077a371 in handler::ha_external_lock (this=0x195be50,
    thd=0x2aaaac07ac20, lock_type=2) at handler.cc:4548
#8  0x000000000078a159 in ha_partition::external_lock (this=0x1656b90,
    thd=0x2aaaac07ac20, lock_type=2) at ha_partition.cc:2657
#9  0x000000000077a38e in handler::ha_external_lock (this=0x1656b90,
    thd=0x2aaaac07ac20, lock_type=2) at handler.cc:4554
#10 0x000000000062e545 in unlock_external (thd=0x2aaaac07ac20,
    table=0x2aaaabeb3958, count=2) at lock.cc:786
#11 0x000000000062e8c6 in mysql_unlock_tables (thd=0x2aaaac07ac20,
    sql_lock=0x2aaaabeb38a0) at lock.cc:391
#12 0x000000000069b186 in close_thread_tables (thd=0x2aaaac07ac20)
    at sql_base.cc:1336
#13 0x0000000000654a16 in dispatch_command (command=COM_QUERY,
    thd=0x2aaaac07ac20, packet=0x2aaaac52b511 "", packet_length=110)
    at sql_parse.cc:1591
#14 0x0000000000654d82 in do_command (thd=0x2aaaac07ac20) at sql_parse.cc:857
#15 0x0000000000641888 in handle_one_connection (arg=0x2aaaac07ac20)
    at sql_connect.cc:1115
#16 0x00002b6ab034d143 in start_thread () from /lib64/libpthread.so.0
#17 0x00002b6ab0a858cd in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()

How to repeat:
No test case yet.
[8 Aug 2009 13:16] Elena Stepanova
Same as bug#45823 (debug version, stack trace provided by Shane Bester). Setting this one as a duplicate.
[7 Dec 2009 9:03] Philip Stoev
Still happens with 6.0-codebase-bugfixing, so must be a separate bug. Will upload the core and the binary.
[7 Dec 2009 9:16] Philip Stoev
Disregard last comment, bug please see bug #48155