Bug #10073 Crash on reading 32bit ISAM tables on 64bit
Submitted: 21 Apr 2005 21:06 Modified: 15 Jul 2005 13:56
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: ISAM storage engine Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (Linux with AMD64)
Assigned to: CPU Architecture:Any

[21 Apr 2005 21:06] Christian Hammers
Description:
When copying raw ISAM table files from a 32bit i386 system to a 64bit amd64 system
the table files cannot be read afterwards, the server simply crashes with

 mysql> SHOW CREATE TABLE games;
 ERROR 5 (HY000): Out of memory (Needed 3893742216 bytes)

Which leads to a sig11 when using grsecurity or similar things.

Even if this transportation is not supported and maybe even documentd somewhere,
MySQL should not simply do a malloc(rand()) but instead give a sane error message
as we can expect a lot of people moving to 64bit in the next month and many of them
will have old ISAM tables which were simply forgotten to convert to MyISAM as they just
worked fine the way they were. Also I guess many users don't read the docs which probably say "dump your database" but just try some MyISAM files, see that this works fine and then expect the same to be true for ISAM so let's be a bit more convenient :)

I will upload a tar file with two empty tables that can be used to reproduce the error
as it does may not occur with any table definition.

bye,

-christian-

How to repeat:
...

Suggested fix:
Improve error message.
[21 Apr 2005 21:07] Christian Hammers
Example i386 ISAM tables to reproduce the bug.

Attachment: gameserver.tar (application/x-tar, text), 30.00 KiB.

[15 Jul 2005 5:05] Aleksey Kishkin
Hi! 
In order to reproduce his bug, could you please attach here tables definition and my.cnf files from both (i386 and ia64) servers?
[15 Jul 2005 5:06] Aleksey Kishkin
Ah! I see tables already attached. Please put here my.cnf files also.
[15 Jul 2005 7:57] Christian Hammers
The config files were the default ones.

At least the Debian default ones :) I attache a copy.
[15 Jul 2005 7:57] Christian Hammers
my.cnf

Attachment: my.cnf (application/octet-stream, text), 3.27 KiB.

[15 Jul 2005 8:01] Christian Hammers
Table definitions:

 CREATE TABLE `users` (
  `name` char(100) NOT NULL default '',
  `pass` char(100) NOT NULL default '',
  `gameno` int(10) NOT NULL default '0',
  PRIMARY KEY  (`name`)
) ENGINE=ISAM DEFAULT CHARSET=latin1 PACK_KEYS=1

 CREATE TABLE `games` (
  `recno` int(10) NOT NULL auto_increment,
  `type` char(10) NOT NULL default '',
  `id` int(10) NOT NULL default '0',
  KEY `recno` (`recno`)
) ENGINE=ISAM DEFAULT CHARSET=latin1 PACK_KEYS=1
[15 Jul 2005 13:56] MySQL Verification Team
ISAM is not binary compatible, like MyISAM.

Besides, ISAM is no longer supported by us.