Bug #37543 server crashed with signal 11 when executing the system test (systest)
Submitted: 20 Jun 2008 11:35 Modified: 7 Oct 2008 6:27
Reporter: Horst Hunger Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:6.0.6-alpha-debug OS:Linux (SLES 10, 2.6.16.46-0.12-smp , NPTL 2.4, x86_64)
Assigned to: CPU Architecture:Any

[20 Jun 2008 11:35] Horst Hunger
Description:
The stack:
gdb /data0/bzr/mysql-6.0-system-test/sql/mysqld core.10673
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
Reading symbols from /lib64/libnsl.so.1...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/librt.so.1...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/lib64/libstdc++.so.6...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libgcc_s.so.1...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libresolv.so.2...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `/data0/bzr/mysql-6.0-system-test/sql/mysqld --no-defaults --basedir=/data0/bzr/'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002ba0172fcea3 in pthread_kill () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00002ba0172fcea3 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000008ae750 in write_core (sig=11) at stacktrace.c:302
#2  0x00000000006ee4ca in handle_segfault (sig=11) at mysqld.cc:2635
#3  <signal handler called>
#4  0x0000000000c8de18 in safe_mutex_lock (mp=0xa5a5a5a5a5a5a5bd, try_lock=0 '\0',
    file=0xeda06f "thr_lock.c", line=503) at thr_mutex.c:97
#5  0x0000000000c8bafd in thr_lock (data=0x5128998, owner=0x488f420,
    lock_type=-1515870811) at thr_lock.c:503
#6  0x0000000000c8ce77 in thr_multi_lock (data=0x2c83918, count=1, owner=0x488f420)
    at thr_lock.c:973
#7  0x00000000006e4bbe in mysql_lock_tables (thd=0x488e6e8, tables=0x4ad01f88,
    count=1, flags=51, need_reopen=0x4ad01e27) at lock.cc:309
#8  0x00000000007508e3 in open_ltable (thd=0x488e6e8, table_list=0x4ad01ee0,
    lock_type=TL_WRITE_CONCURRENT_INSERT, lock_flags=51) at sql_base.cc:4869
#9  0x00000000007509ca in open_performance_schema_table (thd=0x488e6e8,
    one_table=0x4ad01ee0, backup=0x4ad02450) at sql_base.cc:8848
#10 0x00000000007c8917 in Log_to_csv_event_handler::log_general (this=0x15144c0,
    thd=0x488e6e8, event_time=1213911469,
    user_host=0x4ad02580 "systuser[systuser] @ localhost []", user_host_len=33,
    thread_id=571, command_type=0xdc4b55 "Query", command_type_len=5,
    sql_text=0x1d23778 "SHOW WARNINGS", sql_text_len=13, client_cs=0x1277600)
    at log.cc:391
#11 0x00000000007c7296 in LOGGER::general_log_write (this=0x12897a0,
    thd=0x488e6e8, command=COM_QUERY, query=0x1d23778 "SHOW WARNINGS",
    query_length=13) at log.cc:1046
#12 0x00000000007c7346 in general_log_write (thd=0x488e6e8, command=COM_QUERY,
    query=0x1d23778 "SHOW WARNINGS", query_length=13) at log.cc:4084
#13 0x00000000007099ac in dispatch_command (command=COM_QUERY, thd=0x488e6e8,
    packet=0x4a25aa9 "SHOW WARNINGS", packet_length=13) at sql_parse.cc:1049
#14 0x000000000070af39 in do_command (thd=0x488e6e8) at sql_parse.cc:731
#15 0x00000000006f7517 in handle_one_connection (arg=0x488e6e8)
    at sql_connect.cc:1134
#16 0x00002ba0172f8143 in start_thread () from /lib64/libpthread.so.0
#17 0x00002ba01792a74d in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()
(gdb) q

the last sql statements in general_log.CSV:
...
"2008-06-20 00:37:20","root[root] @ localhost [localhost]",719,1,"Query","delete from tb0_eng1 where f1=@tmp_num"
"2008-06-20 00:37:24","root[root] @ localhost [localhost]",417,1,"Query","insert into tb1_logs (dt1, entry_dsc, f4)\nvalues (now(), concat('Update row ', old.f1,' ', old.f2, '->', \nnew.f2, ' ', old.f3, '->', new.f3, ' (tb1_eng2)'), new.f1)"
"2008-06-20 00:37:24","root[root] @ localhost [localhost]",722,1,"Query","SET @tmp_num=7"
"2008-06-20 00:37:24","root[root] @ localhost [localhost]",721,1,"Query","delete from tb0_eng2 where f1=@tmp_num"
"2008-06-20 00:37:25","root[root] @ localhost []",716,1,"Query","SET @WITH_TRIGGERS = IF( '1' = '', 0, '1')"
"2008-06-20 00:37:28","root[root] @ localhost [localhost]",720,1,"Query","SET @tmp_word='ev_ins_tb0_eng2'"
"2008-06-20 00:37:31","root[root] @ localhost [localhost]",417,1,"Query","insert into tb1_logs (dt1, entry_dsc, f4)\nvalues (now(), concat('Update row ', old.f1,' ', old.f2, '->', \nnew.f2, ' ', old.f3, '->', new.f3, ' (tb1_eng2)'), new.f1)"
"2008-06-20 00:37:31","root[root] @ localhost [localhost]",722,1,"Query","delete from tb1_eng2 where f1=@tmp_num"
"2008-06-20 00:37:32","root[root] @ localhost []",716,1,"Query","SET @CYCLE = IF( '@CYCLE' = '', 60, '60')"
"2008-06-20 00:37:39","root[root] @ localhost [localhost]",417,1,"Query","insert into tb1_logs (dt1, entry_dsc, f4)\nvalues (now(), concat('Update row ', old.f1,' ', old.f2, '->', \nnew.f2, ' ', old.f3, '->', new.f3, ' (tb1_eng2)'), new.f1)"
"2008-06-20 00:37:42","root[root] @ localhost [localhost]",719,1,"Query","insert into tb0_logs (dt1, entry_dsc, f4)\nvalues (now(), concat('Delete row ', old.f1,' ', old.f2, ' ',\nold.f3, ' (tb0_eng1)'), old.f1)"
"2008-06-20 00:37:43","root[root] @ localhost [localhost]",720,1,"Query","INSERT INTO tb0_eng2 (f1, f2, f3, f4) VALUES\n(7, CONCAT(@tmp_word,'-',@tmp_num),  NAME_CONST('v3',1.009), NOW())"
"2008-06-20 00:37:47","root[root] @ localhost [localhost]",417,1,"Query","insert into tb1_logs (dt1, entry_dsc, f4)\nvalues (now(), concat('Update row ', old.f1,' ', old.f2, '->', \nnew.f2, ' ', old.f3, '->', new.f3, ' (tb1_eng2)'), new.f1)"
"2008-06-20 00:37:49","root[root] @ localhost []",716,1,"Query","SET @ddl_sleep = IF( '60' = '', 60, '60')"
"2008-06-20 00:37:49","systuser[systuser] @ localhost []",658,1,"Query","SHOW WARNINGS"

How to repeat:
- ln -s mysql-test-extra-6.0/mysql-test/suite/systems .../mysql-test/suite
- update the config-file (use local.env as basis)
- ./run_systest --config=<your config file> --scenario=iuds6.tst

The shall run 24 hours, but should crash within the first 3 hours.
Save the var-directory and execute kill_tests in systems.
[2 Oct 2008 21:25] Konstantin Osipov
Maybe a duplicate of a closed bug. Please re-verify.
[6 Oct 2008 6:53] Susanne Ebrecht
Horst,

this seems to be fixed in newer version. Please try again with actual bzr tree.
[7 Oct 2008 6:27] Susanne Ebrecht
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html