Description:
MySQL Server 5.0.22 is crashing with query from vBulletin Version 3.5.4 (see how to repeat). Also the very same query works with 5.0.18.
Both were built from sources with gcc 4.0.2
and CFLAGS="-O3 -pipe -fomit-frame-pointer -mfpmath=sse -march=pentium4"
060618 20:37:44 InnoDB: Started; log sequence number 0 1224300627
060618 20:37:44 [Note] /packages/mysql-5.0.22_p4_linux/libexec/mysqld: ready for connections.
Version: '5.0.22-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
mysqld got signal 11;
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=67108864
read_buffer_size=1044480
max_used_connections=22
max_connections=4096
threads_connected=22
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 49120 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0x8bdb120
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=0x5967bd20, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8bce590
New value of fp=0x8bdb120 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 0x8bcc3b8 = SELECT forum.forumid FROM forum AS forum LEFT JOIN forumread AS forumread ON (forum.forumid = forumread.forumid AND forumread.userid = 361) WHERE forum.forumid IN (14,11,2,-1) AND forum.forumid NOT IN (14, -1) AND (forum.lastpost = 0 OR IF(forumread.readtime IS NULL, 1149794936, forumread.readtime) > forum.lastpost)
thd->thread_id=86
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.
060618 20:39:18 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...
060618 20:39:18 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1224318772.
InnoDB: Doing recovery: scanned up to log sequence number 0 1224319096
060618 20:39:18 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
060618 20:39:19 InnoDB: Started; log sequence number 0 1224319096
060618 20:39:19 [Note] /packages/mysql-5.0.22_p4_linux/libexec/mysqld: ready for connections.
Version: '5.0.22-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
How to repeat:
CREATE DATABASE `test1` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
CREATE TABLE `test1`.`forum` (
`forumid` smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
`styleid` smallint( 5 ) unsigned NOT NULL default '0',
`title` varchar( 100 ) NOT NULL default '',
`title_clean` varchar( 100 ) NOT NULL default '',
`description` text,
`description_clean` text,
`options` int( 10 ) unsigned NOT NULL default '0',
`displayorder` smallint( 6 ) NOT NULL default '0',
`replycount` int( 10 ) unsigned NOT NULL default '0',
`lastpost` int( 11 ) NOT NULL default '0',
`lastposter` varchar( 100 ) NOT NULL default '',
`lastthread` varchar( 250 ) NOT NULL default '',
`lastthreadid` int( 10 ) unsigned NOT NULL default '0',
`lasticonid` smallint( 6 ) NOT NULL default '0',
`threadcount` mediumint( 8 ) unsigned NOT NULL default '0',
`daysprune` smallint( 6 ) NOT NULL default '0',
`newpostemail` varchar( 250 ) NOT NULL default '',
`newthreademail` varchar( 250 ) NOT NULL default '',
`parentid` smallint( 6 ) NOT NULL default '0',
`parentlist` varchar( 250 ) NOT NULL default '',
`password` varchar( 50 ) NOT NULL default '',
`link` varchar( 200 ) NOT NULL default '',
`childlist` varchar( 250 ) NOT NULL default '',
`importforumid` bigint( 20 ) NOT NULL default '0',
`importcategoryid` bigint( 20 ) NOT NULL default '0',
PRIMARY KEY ( `forumid` )
) ENGINE = InnoDB DEFAULT CHARSET = latin1;
CREATE TABLE `test1`.`forumread` (
`userid` int( 10 ) unsigned NOT NULL default '0',
`forumid` smallint( 5 ) unsigned NOT NULL default '0',
`readtime` int( 10 ) unsigned NOT NULL default '0',
PRIMARY KEY ( `forumid` , `userid` ) ,
KEY `readtime` ( `readtime` )
) ENGINE = InnoDB DEFAULT CHARSET = latin1;
USE test1;
SELECT forum.forumid FROM forum AS forum LEFT JOIN forumread AS forumread ON (forum.forumid = forumread.forumid AND forumread.userid = 361) WHERE forum.forumid IN (14,11,2,-1) AND forum.forumid NOT IN (14, -1) AND (forum.lastpost = 0 OR IF(forumread.readtime IS NULL, 1149794936, forumread.readtime) > forum.lastpost);