Drizzle crash when running random query generator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
High
|
fmpwizard |
Bug Description
When running the basic random query generator test, drizzle crashes with more than 7 threads and 40 queries
See for more details on the Random Query Generator - http://
For now you can get the latest version that works with Drizzle at bzr branch lp:~kalebral/randgen/drizzle-fixes. Also need to have DBD::drizzle installed as this is a perl test framework
The following script runs the test and takes input as the number of threads and queries to run. It assumes you have a running drizzled to run the test against.
#! /bin/sh
if [ $# != 2 ]
then
echo "Usage $0: <number of threads> <number of queries>"
exit 1
else
threads=$1
queries=$2
fi
./gentest.pl \
--dsn=
--gendata=
--grammar=
--queries=
--threads=
--duration=1800 \
--engine=Innodb \
--executor=
total=`grep "Child process completed successfully" $logfile | wc -l`
echo "**** $total tests passed ****"
% run.sh 7 40
... lots of output......
# 16:13:16 Child process completed successfully.
# 16:13:17 Killing periodic reporting process with pid 13120...
# 16:13:17 Test completed successfully.
**** 7 tests passed ****
% run 8 50
....lots of output.....
# 16:14:39 Killing child process with pid 13241...
# 16:14:40 Killing periodic reporting process with pid 13225...
# 16:14:40 Test completed with failure status 34 <--- return status should be 0
**** 5 tests passed **** <---- should be 8
From drizzle.err file
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
090930 9:42:15 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 153154025
090930 9:42:15 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...
InnoDB: Doing recovery: scanned up to log sequence number 153274732
090930 9:42:15 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 0, file name foo
090930 9:42:16 InnoDB Plugin 1.0.3 started; log sequence number 153274732
Listening on 0.0.0.0:9306
Listening on :::9306
./sbin/drizzled: Forcing close of thread 0 user: '(null)'
./sbin/drizzled: ready for connections.
Version: '2009.09.1144' Source distribution (trunk)
drizzled: diagnostics_
090930 9:42:21 - drizzled 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_
read_buffer_
max_used_
connection_count=7
It is possible that drizzled could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
session: 0xa0396a0
Attempting backtrace. You can use the following information to find out
where drizzled died. If you see no messages after this, something went
terribly wrong...
./sbin/drizzled [0x8199762]
./sbin/drizzled [0x81998fb]
./sbin/drizzled [0x8063ecf]
[0xb7f31400]
[0xb7f31422]
/lib/tls/
/lib/tls/
/lib/tls/
./sbin/drizzled [0x80632f2]
./sbin/drizzled [0x818aa09]
./sbin/drizzled [0x8061005]
./sbin/drizzled [0x8162f3e]
./sbin/drizzled [0x8163ab2]
./sbin/drizzled [0x8163f44]
./sbin/drizzled [0x812a157]
./sbin/drizzled [0x812c132]
./sbin/drizzled [0x83614e3]
/lib/tls/
/lib/tls/
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
session->query at 0xa03ed10 = UPDATE `table10_
session-
session-
Related branches
- fmpwizard (community): Needs Resubmitting
- Brian Aker: Needs Information
- Drizzle Developers: Pending requested
-
Diff: 82 lines4 files modifieddrizzled/sql_delete.cc (+10/-0)
drizzled/sql_update.cc (+10/-0)
tests/r/update.result (+2/-0)
tests/t/update.test (+6/-0)
Changed in drizzle: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → bell |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
So far the reason could be that two threads are using the same session. and one resets Diagnostics_ area.m_ status while the other thread was hoping for m_status != DA_EMPTY.
Some more information, courtesy of gdb:
gdb) thread apply all bt
Thread 10 (process 18572 thread 0x293f): signal_ nocancel () area::set_ ok_status (this=0x1018669d8, session= 0x101865e00, affected_ rows_arg= 0, found_rows_arg=0, last_insert_ id_arg= 0, message_ arg=0x103646580 "Rows matched: 0 Changed: 0 Warnings: 0") at diagnostics_ area.cc: 89 0x101865e00, table_list= 0x101889f48, fields= @0x101866ff8, values= @0x101867298, conds=0x10188a3c8, order_num=0, order=0x0, limit=6, ignore=false) at sql_update.cc:637 :statement: :Update: :execute (this=0x1028aeff0) at statement/ update. cc:50 command (session= 0x101865e00) at sql_parse.cc:934 0x101865e00, inBuf=0x101889e10 "UPDATE `table0_ innodb_ int_autoinc` SET `int_key` = 6 WHERE `enum_not_null_key` = 0 LIMIT 6", length=90, found_semicolon =0x103646e28) at sql_parse.cc:1234 0x101865e00, packet=0x10268b001 "UPDATE `table0_ innodb_ int_autoinc` SET `int_key` = 6 WHERE `enum_not_null_key` = 0 LIMIT 6", packet_length=90) at sql_parse.cc:210 :executeStateme nt (this=0x101865e00) at session.cc:727 duler:: runSession (this=0x10289d4f0, session= 0x101865e00) at plugin/ multi_thread/ multi_thread. cc:102 multi_thread/ multi_thread. cc:123
#0 0x00007fff82b416be in __semwait_
#1 0x00007fff82b412f4 in nanosleep$NOCANCEL ()
#2 0x00007fff82b3b404 in usleep$NOCANCEL ()
#3 0x00007fff82b4ff77 in abort ()
#4 0x00007fff82b468c1 in __assert_rtn ()
#5 0x000000010000db1a in Diagnostics_
#6 0x0000000100005ce9 in Session::my_ok (this=0x101865e00, affected_rows=0, found_rows_arg=0, passed_id=0, message=0x103646580 "Rows matched: 0 Changed: 0 Warnings: 0") at session.h:
1288
#7 0x00000001001767cf in mysql_update (session=
#8 0x000000010000ae0a in drizzled:
#9 0x0000000100146e7b in mysql_execute_
#10 0x0000000100147070 in mysql_parse (session=
#11 0x00000001001475fc in dispatch_command (command=COM_QUERY, session=
#12 0x0000000100104819 in Session:
#13 0x0000000100104e99 in Session::run (this=0x101865e00) at session.cc:602
#14 0x0000000100370012 in MultiThreadSche
#15 0x000000010036ecc8 in session_thread (arg=0x101865e00) at plugin/
#16 0x00007fff82aa5e8b in _pthread_start ()
#17 0x00007fff82aa5d4d in thread_start ()
Thread 9 (process 18572 thread 0x2603): innobase/ os/os0thread. c:292 innobase/ srv/srv0srv. c:2326
#0 0x00007fff82ac3582 in select$DARWIN_EXTSN ()
#1 0x00000001002f7afd in os_thread_sleep (tm=1000000) at plugin/
#2 0x00000001003463ee in srv_master_thread (arg=0x0) at plugin/
#3 0x00007fff82aa5e8b in _pthread_start ()
#4 0x00007fff82aa5d4d in thread_start ()
Thread 8 (process 18572 thread 0x2503): innobase/ os/os0thread. c:292 monitor_ thread (arg=0x0) at plugin/ innobase/ srv/srv0srv. c:2195
#0 0x00007fff82ac3582 in select$DARWIN_EXTSN ()
#1 0x00000001002f7afd in os_thread_sleep (tm=1000000) at plugin/
#2 0x0000000100346155 in srv_error_
#3 0x00007fff82aa5e8b in _pthread_start ()
#4 0x00007fff82aa5d4d in thread_start ()
Thread 7 (process 18572 thread 0x2407):
#0 0x00007fff82ac3582 in select$DARWIN_EXTSN ()
#1 0x00000001002f7afd in os_thread_sleep (tm=1000000...