Bug #41535 main.bootstrap crashes: segmentation fault in intern_plugin_lock
Submitted: 17 Dec 2008 10:57 Modified: 17 Dec 2008 11:11
Reporter: Sven Sandberg Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:6.0-rpl OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: 6.0-rpl-green, pushbuild, sporadic, test failure

[17 Dec 2008 10:57] Sven Sandberg
Description:
main.bootstrap has crashed with segfault since Oct 29 in 6.0-rpl:

main.bootstrap                           [ fail ]

CURRENT_TEST: main.bootstrap
sh: line 1: 18023 Segmentation fault      (core dumped) /data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp/sql/mysqld --no-defaults --bootstrap --basedir=/data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp --datadir=/dev/shm/var-embedded-120/install.db --loose-skip-innodb --loose-skip-ndbcluster --tmpdir=/dev/shm/var-embedded-120/tmp/ --core-file --language=/data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp/sql/share/english --character-sets-dir=/data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp/sql/share/charsets --datadir=/dev/shm/var-embedded-120/3/mysqld.1/data/ </dev/shm/var-embedded-120/3/tmp/bootstrap_test.sql >>/dev/shm/var-embedded-120/3/tmp/bootstrap.log 2>&1
mysqltest: At line 20: command "$MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1" failed

The result from queries just before the failure was:
drop table if exists t1;

 - saving '/dev/shm/var-embedded-120/3/log/main.bootstrap/' to '/dev/shm/var-embedded-120/log/main.bootstrap/'
 - found 'core.18023' (0/5)

Trying 'gdb' to get a backtrace
Core generated by '/data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp/sql/mysqld'
Output from gdb follows. The first stack trace is from the failing thread.
The following stack traces are from all threads (so the failing one is
duplicated).
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data0/pushbuild/pb/bzr_mysql-6.0-rpl/92/bzr_mysql-6.0-rpl-exp/sql/mysqld --no-'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002b76de57b4c5 in pthread_kill () from /lib64/libpthread.so.0
#0  0x00002b76de57b4c5 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000d69285 in my_write_core (sig=11) at stacktrace.c:307
#2  0x000000000070540f in handle_segfault (sig=11) at mysqld.cc:2674
#3  <signal handler called>
#4  0x000000000090b644 in intern_plugin_lock (lex=0x1e4ab50, rc=0x13a2b60, 
    sFile=0xf18637 "handler.cc", uLine=169) at sql_plugin.cc:621
#5  0x000000000090bb4a in plugin_lock (thd=0x1e48fb8, ptr=0x40880b78, 
    sFile=0xf18637 "handler.cc", uLine=169) at sql_plugin.cc:659
#6  0x00000000008549af in ha_lock_engine (thd=0x1e48fb8, hton=0x1e3e778)
    at handler.cc:169
#7  0x0000000000854fcd in ha_resolve_by_legacy_type (thd=0x1e48fb8, 
    db_type=DB_TYPE_MYISAM) at handler.cc:192
#8  0x000000000085502b in ha_checktype (thd=0x1e48fb8, 
    database_type=DB_TYPE_MYISAM, no_substitute=false, report_error=true)
    at handler.cc:208
#9  0x0000000000869a44 in check_engine (thd=0x1e48fb8, 
    table_name=0x1e5bce0 "t1", create_info=0x408812e0) at sql_table.cc:7686
#10 0x0000000000873a1b in mysql_create_table_no_lock (thd=0x1e48fb8, 
    db=0x1e5c080 "test", table_name=0x1e5bce0 "t1", create_info=0x408812e0, 
    alter_info=0x40881c00, internal_tmp_table=false, select_field_count=0)
    at sql_table.cc:3320
#11 0x0000000000875000 in mysql_create_table (thd=0x1e48fb8, 
    db=0x1e5c080 "test", table_name=0x1e5bce0 "t1", create_info=0x408812e0, 
    alter_info=0x40881c00, internal_tmp_table=false, select_field_count=0)
    at sql_table.cc:3791
#12 0x0000000000717be8 in mysql_execute_command (thd=0x1e48fb8)
    at sql_parse.cc:2504
#13 0x000000000071e8eb in mysql_parse (thd=0x1e48fb8, 
    inBuf=0x1e5bc40 "CREATE TABLE t1(a int)", length=22, 
    found_semicolon=0x40882178) at sql_parse.cc:5636
#14 0x0000000000721440 in handle_bootstrap (arg=0x1e48fb8) at sql_parse.cc:491
#15 0x00002b76de577193 in start_thread () from /lib64/libpthread.so.0
#16 0x00002b76debab47d in clone () from /lib64/libc.so.6
#17 0x0000000000000000 in ?? ()

Thread 3 (process 18023):
#0  0x00002b76de57a7f6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
#1  0x0000000000d6e240 in safe_cond_wait (cond=0x139ad80, mp=0x139a340, 
    file=0xe96f58 "mysqld.cc", line=4954) at thr_mutex.c:249
#2  0x0000000000701f5f in bootstrap (file=0x2b76ded166a0) at mysqld.cc:4954
#3  0x0000000000708e87 in main (argc=12, argv=0x7fffcc86ffd8)
    at mysqld.cc:4651

Thread 2 (process 20549):
#0  0x00002b76de57def8 in do_sigwait () from /lib64/libpthread.so.0
#1  0x00002b76de57df9d in sigwait () from /lib64/libpthread.so.0
#2  0x0000000000704bff in signal_hand (arg=0x0) at mysqld.cc:2879
#3  0x00002b76de577193 in start_thread () from /lib64/libpthread.so.0
#4  0x00002b76debab47d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (process 20550):
#0  0x00002b76de57b4c5 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000d69285 in my_write_core (sig=11) at stacktrace.c:307
#2  0x000000000070540f in handle_segfault (sig=11) at mysqld.cc:2674
#3  <signal handler called>
#4  0x000000000090b644 in intern_plugin_lock (lex=0x1e4ab50, rc=0x13a2b60, 
    sFile=0xf18637 "handler.cc", uLine=169) at sql_plugin.cc:621
#5  0x000000000090bb4a in plugin_lock (thd=0x1e48fb8, ptr=0x40880b78, 
    sFile=0xf18637 "handler.cc", uLine=169) at sql_plugin.cc:659
#6  0x00000000008549af in ha_lock_engine (thd=0x1e48fb8, hton=0x1e3e778)
    at handler.cc:169
#7  0x0000000000854fcd in ha_resolve_by_legacy_type (thd=0x1e48fb8, 
    db_type=DB_TYPE_MYISAM) at handler.cc:192
#8  0x000000000085502b in ha_checktype (thd=0x1e48fb8, 
    database_type=DB_TYPE_MYISAM, no_substitute=false, report_error=true)
    at handler.cc:208
#9  0x0000000000869a44 in check_engine (thd=0x1e48fb8, 
    table_name=0x1e5bce0 "t1", create_info=0x408812e0) at sql_table.cc:7686
#10 0x0000000000873a1b in mysql_create_table_no_lock (thd=0x1e48fb8, 
    db=0x1e5c080 "test", table_name=0x1e5bce0 "t1", create_info=0x408812e0, 
    alter_info=0x40881c00, internal_tmp_table=false, select_field_count=0)
    at sql_table.cc:3320
#11 0x0000000000875000 in mysql_create_table (thd=0x1e48fb8, 
    db=0x1e5c080 "test", table_name=0x1e5bce0 "t1", create_info=0x408812e0, 
    alter_info=0x40881c00, internal_tmp_table=false, select_field_count=0)
    at sql_table.cc:3791
#12 0x0000000000717be8 in mysql_execute_command (thd=0x1e48fb8)
    at sql_parse.cc:2504
#13 0x000000000071e8eb in mysql_parse (thd=0x1e48fb8, 
    inBuf=0x1e5bc40 "CREATE TABLE t1(a int)", length=22, 
    found_semicolon=0x40882178) at sql_parse.cc:5636
#14 0x0000000000721440 in handle_bootstrap (arg=0x1e48fb8) at sql_parse.cc:491
#15 0x00002b76de577193 in start_thread () from /lib64/libpthread.so.0
#16 0x00002b76debab47d in clone () from /lib64/libc.so.6
#17 0x0000000000000000 in ?? ()

Retrying test, attempt(2/3)...

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=123 sapsrv1/embedded
xref: http://tinyurl.com/67fnvd
[17 Dec 2008 11:11] Sven Sandberg
Ooops, duplicate of BUG#41013