Bug #88276 Assertion `next_insert_id == 0' failed.
Submitted: 28 Oct 2017 4:29 Modified: 4 Jan 2018 16:32
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:8.0.3 RC OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[28 Oct 2017 4:29] Roel Van de Paar
Description:
2017-10-28T03:59:52.570532Z 0 [Note] /sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.3-rc-debug-log'  socket: '/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/socket.sock'  port: 16654  MySQL Community Server (GPL)
mysqld: /git/mysql-server_dbg/sql/handler.cc:8257: int handler::ha_external_lock(THD*, int): Assertion `next_insert_id == 0' failed.
04:00:12 UTC - mysqld got signal 6 ;

Core was generated by `/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld --no-defaults --core'.
Program terminated with signal 6, Aborted.
#0  0x00007fd2127e29b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007fd2127e29b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x000000000369e428 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:291
#2  0x000000000286b8f6 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007fd210afa1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007fd210afb8e8 in __GI_abort () at abort.c:90
#6  0x00007fd210af3266 in __assert_fail_base (fmt=0x7fd210c45e68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x4434427 "next_insert_id == 0", file=file@entry=0x4432340 "/git/mysql-server_dbg/sql/handler.cc", 
    line=line@entry=8257, 
    function=function@entry=0x4437580 <handler::ha_external_lock(THD*, int)::__PRETTY_FUNCTION__> "int handler::ha_external_lock(THD*, int)") at assert.c:92
#7  0x00007fd210af3312 in __GI___assert_fail (assertion=0x4434427 "next_insert_id == 0", 
    file=0x4432340 "/git/mysql-server_dbg/sql/handler.cc", line=8257, 
    function=0x4437580 <handler::ha_external_lock(THD*, int)::__PRETTY_FUNCTION__> "int handler::ha_external_lock(THD*, int)")
    at assert.c:101
#8  0x00000000029d6e0d in handler::ha_external_lock (this=0x7fd1ca0ba030, thd=0x7fd1ca019000, lock_type=2)
    at /git/mysql-server_dbg/sql/handler.cc:8257
#9  0x0000000002b64bdc in unlock_external (thd=0x7fd1ca019000, table=0x7fd1ca0ca278, count=1) at /git/mysql-server_dbg/sql/lock.cc:676
#10 0x0000000002b64328 in mysql_unlock_tables (thd=0x7fd1ca019000, sql_lock=0x7fd1ca0ca260) at /git/mysql-server_dbg/sql/lock.cc:442
#11 0x0000000002419e9e in close_thread_tables (thd=0x7fd1ca019000) at /git/mysql-server_dbg/sql/sql_base.cc:1799
#12 0x000000000242c898 in close_mysql_tables (thd=0x7fd1ca019000) at /git/mysql-server_dbg/sql/sql_base.cc:10851
#13 0x000000000283cd58 in mysql_persistent_dynamic_loader_imp::__lambda1::operator() (__closure=0x7fd212d86138)
    at /git/mysql-server_dbg/sql/server_component/persistent_dynamic_loader.cc:373
#14 0x000000000283d772 in Scope_guard<mysql_persistent_dynamic_loader_imp::load(void*, char const**, int)::__lambda1>::~Scope_guard(void) (this=0x7fd212d86130, __in_chrg=<optimized out>) at /git/mysql-server_dbg/include/scope_guard.h:41
#15 0x000000000283d107 in mysql_persistent_dynamic_loader_imp::load (thd_ptr=0x7fd1ca019000, urns=0x7fd1ca00e210, component_count=2)
    at /git/mysql-server_dbg/sql/server_component/persistent_dynamic_loader.cc:374
#16 0x0000000002c02c6b in Sql_cmd_install_component::execute (this=0x7fd1ca02fca0, thd=0x7fd1ca019000)
    at /git/mysql-server_dbg/sql/sql_component.cc:62
#17 0x00000000024be1ff in mysql_execute_command (thd=0x7fd1ca019000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:4628
#18 0x00000000024c042b in mysql_parse (thd=0x7fd1ca019000, parser_state=0x7fd212d882f0) at /git/mysql-server_dbg/sql/sql_parse.cc:5414
#19 0x00000000024b68e7 in dispatch_command (thd=0x7fd1ca019000, com_data=0x7fd212d88b80, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1708
#20 0x00000000024b53f5 in do_command (thd=0x7fd1ca019000) at /git/mysql-server_dbg/sql/sql_parse.cc:1291
#21 0x000000000285b2d6 in handle_connection (arg=0x7fd1feeeb3c0)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:328
#22 0x00000000036ec54d in pfs_spawn_thread (arg=0x7fd1fef91620) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2985
#23 0x00007fd2127dde25 in start_thread (arg=0x7fd212d89700) at pthread_create.c:308
#24 0x00007fd210bbd34d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
SET @@session.insert_id=42949672950;
INSTALL COMPONENT "file://component_example_component2","file://component_example_component3";
[28 Oct 2017 18:05] MySQL Verification Team
Thank you for the bug report. Verified as described.
[4 Jan 2018 16:32] Paul DuBois
Posted by developer:
 
Fixed in 8.0.4, 9.0.0.

Server component installation did not properly perform auto-increment
handling, which could result in a server exit.