Bug #25425 inserts followed by drop causes failure
Submitted: 4 Jan 2007 22:25 Modified: 17 Apr 2007 8:58
Reporter: Antony Curtis Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:5.1 OS:Linux (linux amd64)
Assigned to: CPU Architecture:Any

[4 Jan 2007 22:25] Antony Curtis
Description:
insert_multi_value in sql-bench test-insert causes falcon to fail to drop test table and a crash during mysqld shutdown.

I will attach a smaller test script which demonstrates the bug.

How to repeat:
The following patch should be applied to sql-bench to recognise falcon as a transactional storage engine. (maybe should use metadata to deduce this)

===== server-cfg.sh 1.56 vs edited =====
--- 1.56/sql-bench/server-cfg.sh        2007-01-04 14:20:59 -08:00
+++ edited/server-cfg.sh        2007-01-02 21:35:57 -08:00
@@ -202,6 +202,11 @@
     $limits{'max_tables'}      = 500;
     $self->{'transactions'}    = 1;    # Transactions enabled
   }
+  if (defined($main::opt_create_options) &&
+      $main::opt_create_options =~ /engine=falcon/i)
+  {
+    $self->{'transactions'}    = 1;    # Transactions enabled
+  }

   return $self;
 }

test run:

$./falconbug --create-options=ENGINE=Falcon --database=bench --user=sqlbench --password=1234 --dir=/home/antony/results/falcon --socket=/tmp/mysql.sock --fast
Testing server 'MySQL 5.1.14 falcon alpha' at 2007-01-04 14:23:08

Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.

Generating random keys
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000):  2 wallclock secs ( 0.20 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.22 CPU)

Unknown table 'bench1' at ./falconbug line 176.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When attempting to shutdown mysqld...

$libexec/mysqld --skip-innodb
070104 14:23:02 [Warning] Changed limits: max_open_files: 1024  max_connections: 300  table_cache: 357
070104 14:23:02 [Note] libexec/mysqld: ready for connections.
Version: '5.1.14-falcon-alpha'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
070104 14:23:02 [Note] SCHEDULER: Loaded 0 events
Serial Log possible gap: 1038628 - 1032816
070104 14:23:53 [Note] libexec/mysqld: Normal shutdown

070104 14:23:53 [Note] SCHEDULER: Purging queue. 0 events
mysqld got signal 4;
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=8388600
read_buffer_size=131072
max_used_connections=1
max_connections=300
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 660989 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
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=0x2aaaaf6347a0, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x63b26c
0x2aaaab30c127
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
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.
[4 Jan 2007 22:26] Antony Curtis
specific test extracted from sql-bench/test-insert

Attachment: falconbug (application/x-perl, text), 4.89 KiB.

[17 Apr 2007 8:58] Hakan Küçükyılmaz
Modified server-cfg.sh as described.

Cannot reproduce failure anymore.

hakan@lu0011:~/work/mysql/mysql-5.1-falcon/sql-bench$ ./falconbug --create-options=ENGINE=Falcon --database=test --user=root  --dir=/tmp --socket=/tmp/mysql.sock
Testing server 'MySQL 6.0.0 falcon alpha debug' at 2007-04-17 10:55:42

Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.

Generating random keys
Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000):  4 wallclock secs ( 0.12 usr  0.01 sys +  0.00 cusr  0.00 csys =  0.13 CPU)

Time for drop table(1):  0 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Total time:  4 wallclock secs ( 0.12 usr  0.01 sys +  0.00 cusr  0.00 csys =  0.13 CPU)

mysqld shutdown works without crash