4.1.21: ---------- [sbester@fc4 sqlthreads]$ ./sqlthreads 30 60 1 0 "drop table if exists t1;create table t1 (i int);lock tables t1 read;show open tables;unlock tables;" 127.0.0.1 3306 test root Testing DB connection before spawning threads.... Connecting.... Connected.... Thread Safe is ON Spawning 30 new threads 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Database connections are setup! Check above for errors. Completed spawning new threads from the application! Now running for 60 seconds (until 1153581873) mysql_next_result returned 1, mysql error Lost connection to MySQL server during query, (2013) Query failed (2013) - Lost connection to MySQL server during query: drop table if exists t1;create table t1 (i int);lock tables t1 read;show open tables;unlock tables; /home/sbester/servers/4.1-bk/bin/mysqld: ready for connections. Version: '4.1.21-debug' socket: '/tmp/my.sock' port: 3306 yes mysqld: sql_base.cc:144: OPEN_TABLE_LIST* list_open_tables(THD*, const char*): Assertion `entry->real_name' failed. mysqld got signal 6; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8388572 read_buffer_size=131072 max_used_connections=30 max_connections=100 threads_connected=30 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225788 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd=0x8d2b668 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... Cannot determine thread, fp=0x6253bc, backtrace may not be correct. Stack range sanity check OK, backtrace follows: 0x80bdaed handle_segfault + 461 0x4da420 data.7108 + 5088244 0x8d67d74 __stop___libc_freeres_ptrs + 7786792 0x8380d8b __assert_fail + 167 0x80ece5c _Z16list_open_tablesP3THDPKc + 232 0x81732ae _Z23mysqld_show_open_tablesP3THDPKc + 798 0x80d4abc _Z21mysql_execute_commandP3THD + 12274 0x80d6ad1 _Z11mysql_parseP3THDPcj + 289 0x80d7419 _Z16dispatch_command19enum_server_commandP3THDPcj + 2181 0x80d8552 _Z10do_commandP3THD + 530 0x80d9033 handle_one_connection + 2617 0x8374252 start_thread + 98 0x83a4fbe __clone + 110 New value of fp=(nil) failed sanity check, terminating stack trace! Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved stack trace is much more helpful in diagnosing the problem, so please do resolve it Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 0x8d2cacc = show open tables;unlock tables thd->thread_id=27 The manual page at http://www.mysql.com/doc/en/Crashing.html contains information that should help you find out what is causing the crash.