Bug #39490 Falcon Crash: Assertion Failed at line 779 in file Transaction.cpp
Submitted: 16 Sep 2008 23:04 Modified: 18 Sep 2008 10:48
Reporter: Harita Chilukuri Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.6 OS:Linux (RHEL5)
Assigned to: Assigned Account CPU Architecture:Any
Tags: crash, falcon

[16 Sep 2008 23:04] Harita Chilukuri

Falcon crashes while using sysbench for 8 and above number of threads. Below is the backtrace from log file.

080916 09:16:46 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var/
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080916  9:16:47  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080916  9:16:47  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080916  9:16:47  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080916  9:16:47  InnoDB: Started; log sequence number 0 0
080916  9:16:47 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '6.0.6-alpha'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
[Falcon] Error: assertion (transaction->transactionId == state->transactionId || transaction->state == Available) failed at line 779 in file Transaction.cpp

080916  9:16:56 - 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.

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

thd: 0x441a6c0
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 = 0x4b4d4100 thread_stack 0x40000
/usr/local/mysql/libexec/mysqld(my_print_stacktrace+0x24) [0x9a1494]
/usr/local/mysql/libexec/mysqld(handle_segfault+0x33b) [0x6049fb]
/lib64/libpthread.so.0 [0x3e2e20de60]
/lib64/libpthread.so.0(raise+0x2d) [0x3e2e20dd3d]
/usr/local/mysql/libexec/mysqld(Error::error(char const*, ...)+0x102) [0x81b612]
/usr/local/mysql/libexec/mysqld(Transaction::releaseDependencies()+0xc5) [0x7ec765]
/usr/local/mysql/libexec/mysqld(Transaction::commitNoUpdates()+0x123) [0x7ecc83]
/usr/local/mysql/libexec/mysqld(Transaction::commit()+0xb8) [0x7ed1b8]
/usr/local/mysql/libexec/mysqld(Connection::commit()+0x56) [0x802f36]
/usr/local/mysql/libexec/mysqld(StorageConnection::commit()+0x4b) [0x7cdf8b]
/usr/local/mysql/libexec/mysqld(StorageInterface::external_lock(THD*, int)+0x25e) [0x7ca97e]
/usr/local/mysql/libexec/mysqld(handler::ha_external_lock(THD*, int)+0x1a) [0x6f156a]
/usr/local/mysql/libexec/mysqld(mysql_unlock_tables(THD*, st_mysql_lock*)+0x64) [0x5fe944]
/usr/local/mysql/libexec/mysqld(select_send::send_eof()+0x75) [0x5f0b85]
/usr/local/mysql/libexec/mysqld [0x671871]
/usr/local/mysql/libexec/mysqld(JOIN::exec()+0x8e4) [0x686044]
/usr/local/mysql/libexec/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0x1b0) [0x687be0]
/usr/local/mysql/libexec/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x169) [0x6885b9]
/usr/local/mysql/libexec/mysqld [0x60fe49]
/usr/local/mysql/libexec/mysqld(mysql_execute_command(THD*)+0x1b01) [0x6149d1]
/usr/local/mysql/libexec/mysqld(Prepared_statement::execute(String*, bool)+0x398) [0x693208]
/usr/local/mysql/libexec/mysqld(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*)+0x80) [0x6955e0]
/usr/local/mysql/libexec/mysqld(mysql_stmt_execute(THD*, char*, unsigned int)+0x19d) [0x69597d]
/usr/local/mysql/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x498) [0x619f48]
/usr/local/mysql/libexec/mysqld(do_command(THD*)+0xc7) [0x61ae87]
/usr/local/mysql/libexec/mysqld(handle_one_connection+0xf4) [0x60cda4]
/lib64/libpthread.so.0 [0x3e2e2062e7]
/lib64/libc.so.6(clone+0x6d) [0x3e2d6ce3bd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x4469748 = SELECT c from sbtest where id=?
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
080916 09:16:56 mysqld_safe Number of processes running now: 0
080916 09:16:56 mysqld_safe mysqld restarted
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
080916  9:16:57  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
080916  9:16:57  InnoDB: Started; log sequence number 0 46409
080916  9:16:57 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.

How to repeat:
sysbench test for 8 and above number of threads.
Include query_cache_type=0 in my.cnf

Suggested fix:
don't use query_cache_type=0, but you can assign a value to query_cache_size.(64M). However, this makes CPU utilization go very low and reduces the performance.
[17 Sep 2008 8:52] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with current development sources. Please indicate options you used when run sysbench.
[17 Sep 2008 17:25] Harita Chilukuri
I am using Intel® 2x Clovertown (quad core processor)with 16GB RAM. 

Below are the options that I used for Sysbench:

Prepare Stage: 
sysbench prepare --test=oltp --mysql-table-engine=falcon --mysql-engine-trx=yes --mysql-socket=/tmp/mysql.sock  --oltp-table-size=100000 --oltp-test-mode=simple

Run Stage:
./sysbench run --num-threads=8 --max-time=220 --max-requests=0 --mysql-table-engine=falcon --mysql-engine-trx=yes --test=oltp --oltp-test-mode=simple --oltp-table-size=100000 --mysql-socket=/tmp/mysql.sock
[18 Sep 2008 5:06] Sveta Smirnova
Thank you for the feedback.

I still can not repeat described behavior on Woodcrest. Please indicate which package (file name) you use and if you compiled server yourself please provide configuration string.
[18 Sep 2008 6:03] Harita Chilukuri
I am using the source distribution for version 6.0.6 (downloaded it from the mysql web site) and below is how I compiled the server:

./configure --prefix=/usr/local/mysql --enable-thread-safe-client --enable-local-infile --enable-assembler --with-plugins=innobase,falcon --with-fast-mutexes
[18 Sep 2008 6:24] Harita Chilukuri
I guess, I hit the same bug as this one: http://bugs.mysql.com/bug.php?id=35932
[18 Sep 2008 10:47] Olav Sandstå
Hi Harita,

Thanks for reporting issues and problems you find with Falcon. As you have already have guessed this is the same problem as reported in bug 35932 (and also in 36410).

This crash problem has been mostly solved and fixed (committed in bug 35932). The fix should be in the comming 6.0.7 release. The fix is already available in the mysql-6.0-falcon and mysql-6.0 trees in the source code repository.

Note that there is another bug in this area of Falcon that you may run into as you increase the number of concurrent threads, see bug 38739. This bug is not fixed yet but hopefully should occur much less frequently.

I will go ahead and close this bug as a duplicate of bug 35932.
[18 Sep 2008 10:48] Olav Sandstå
Duplicate of bug 35932.