Bug #60850 myisamchk: Error reading file '/storage/5/tmp/STVhtaM4' (Errcode: 22)
Submitted: 13 Apr 2011 10:13 Modified: 28 Apr 2011 17:22
Reporter: Oleg Alexeenkov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.5.10 OS:FreeBSD (amd64)
Assigned to: CPU Architecture:Any
Tags: error, MyISAMchk

[13 Apr 2011 10:13] Oleg Alexeenkov
Description:
running
/usr/local/mysql/bin/myisamchk -vvv --recover --force /var/db/storage/proiskt/*.M*I
after ~3 hours of creating MYI:

2011/04/12-13:15:07 [29089] dbg Starting [/usr/local/mysql/bin/myisamchk -vvv --recover --force /var/db/storage/proiskt/*.M*I]:
2011/04/12-13:15:07 [29089] dbg run ext: -| /usr/local/mysql/bin/myisamchk -vvv --recover --force /var/db/storage/proiskt/*.M*I 2>&1
2011/04/12-13:15:07 [29089] dbg Warning: option 'sort_key_blocks': unsigned value 1024 adjusted to 100
2011/04/12-13:15:07 [29089] dbg - recovering (with sort) MyISAM-table '/var/db/storage/proiskt/banned.MYI'
2011/04/12-13:15:07 [29089] dbg Data records: 0
2011/04/12-13:15:07 [29089] dbg - Fixing index 1
2011/04/12-13:15:07 [29089] dbg   - Searching for keys, allocating buffer for 2 keys
2011/04/12-13:15:07 [29089] dbg   - Dumping 0 keys
2011/04/12-13:15:07 [29089] dbg - Fixing index 2
2011/04/12-13:15:07 [29089] dbg   - Searching for keys, allocating buffer for 1 keys
2011/04/12-13:15:07 [29089] dbg   - Dumping 0 keys
2011/04/12-13:15:07 [29089] dbg - Fixing index 3
2011/04/12-13:15:07 [29089] dbg   - Searching for keys, allocating buffer for 1 keys
2011/04/12-13:15:07 [29089] dbg   - Dumping 0 keys
2011/04/12-13:15:07 [29089] dbg ---------
2011/04/13-02:07:10 [29089] dbg - recovering (with sort) MyISAM-table '/var/db/storage/proiskt/filebase.MYI'
2011/04/13-02:07:10 [29089] dbg Data records: 1852698361
2011/04/13-02:07:10 [29089] dbg - Fixing index 1
2011/04/13-02:07:10 [29089] dbg   - Searching for keys, allocating buffer for 195177975 keys
2011/04/13-02:07:10 [29089] dbg   - Last merge and dumping keys
2011/04/13-02:07:10 [29089] dbg ./usr/local/mysql/bin/myisamchk: Error reading file '/storage/5/tmp/STVhtaM4' (Errcode: 22)
2011/04/13-02:07:35 [29089] dbg myisamchk: error: 22 when fixing table
2011/04/13-02:08:02 [29089] dbg MyISAM-table '/var/db/storage/proiskt/filebase.MYI' is not fixed because of errors

i tried use other disk in tmpdir and got same error.
other big (~1bil rows) tables have no errors on repair.

myisamchk vars:
character-sets-dir                (No default value)
data-file-length                  0
keys-used                         18446744073709551615
max-record-length                 9223372036854775807
set-auto-increment                0
set-collation                     (No default value)
sort-records                      0
tmpdir                            /storage/5/tmp/:/storage/4/tmp/:/storage/1/tmp/:/storage/2/tmp/:/storage/3/tmp/:/storage/6/tmp/
key-buffer-size                   4293918720
key-cache-block-size              1024
myisam-block-size                 1024
read-buffer-size                  67108864
write-buffer-size                 67108864
sort-buffer-size                  4293918720
sort-key-blocks                   16
decode-bits                       9
ft-min-word-len                   1
ft-max-word-len                   20
ft-stopword-file
stats-method                      nulls_unequal

# /usr/local/mysql/bin/myisamchk -vvv -d /usr/local/www/searchftp/proiskt/filebase

MyISAM file:         /usr/local/www/searchftp/proiskt/filebase
Record format:       Packed
Character set:       utf8_general_ci (33)
File-version:        1
Creation time:       2011-03-02 20:32:03
Status:              checked,analyzed,optimized keys,sorted index pages
Auto increment key:              1  Last value:                     0
Keys are only flushed at close
Data records:                    0  Deleted blocks:                 0
Datafile parts:                  0  Deleted data:                   0
Datafile pointer (bytes):        6  Keyfile pointer (bytes):        6
Datafile length:                 0  Keyfile length:              4096
Max datafile length: 281474976710654  Max keyfile length: 288230376151710719
Recordlength:                65488

table description:
Key Start Len Index   Type                     Rec/key         Root  Blocksize
1   2     8   unique  ulonglong                      1                    1024
2   10    15  unique  varchar prefix NULL            0                    4096
    26    192         varchar NULL                   0
    219   390         ? NULL                         0
    611   279         ? NULL                         0
    892   48          varchar NULL                   0
3   10    9   multip. varchar prefix NULL            0                    1024
4   26    48  multip. varchar prefix NULL            0                    1024
5   219   384 multip. ? prefix NULL                  0                    2048
6   611   96  multip. ? prefix NULL                  0                    1024
7   892   24  multip. varchar prefix NULL            0                    1024
8   945   8   multip. ulonglong                      0                    1024
9   953   4   multip. unsigned long                  0                    1024
10  65476 4   multip. unsigned long                  0                    1024

Field Start Length Nullpos Nullbit Type
1     1     1
2     2     8                      no zeros
3     10    16     1       1       varchar
4     26    193    1       2       varchar
5     219   392    1       4       varchar
6     611   281    1       8       varchar
7     892   49     1       16      varchar
8     941   4                      no zeros
9     945   8                      no zeros
10    953   4                      no zeros
11    957   61445                  varchar
12    62402 3074                   varchar
13    65476 4                      no zeros
14    65480 4                      no zeros

CREATE TABLE `filebase` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `prot` varchar(5) DEFAULT '',
  `host` varchar(64) DEFAULT '',
  `path` varchar(130) DEFAULT '',
  `name` varchar(93) DEFAULT '',
  `ext` varchar(16) DEFAULT '',
  `type` int(10) unsigned NOT NULL DEFAULT '0',
  `size` bigint(20) unsigned NOT NULL DEFAULT '0',
  `time` int(10) unsigned NOT NULL DEFAULT '0',
  `desc` varchar(10752) NOT NULL DEFAULT '',
  `meta` varchar(10753) NOT NULL DEFAULT '',
  `scan` int(10) unsigned NOT NULL DEFAULT '0',
  `added` int(10) unsigned DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq` (`prot`,`host`,`path`,`name`,`ext`),
  KEY `prot_i` (`prot`(3)),
  KEY `host_i` (`host`(16)),
  KEY `path_i` (`path`(128)),
  KEY `name_i` (`name`(32)),
  KEY `ext_i` (`ext`(8)),
  KEY `size_i` (`size`),
  KEY `time_i` (`time`),
  KEY `scan_i` (`scan`)
) ENGINE=MyISAM AUTO_INCREMENT=1000001964165725 DEFAULT CHARSET=utf8 DELAY_KEY_WRITE=1

How to repeat:
id dont know
[15 Apr 2011 12:17] Oleg Alexeenkov
no  problem with 5.5.11
and this values:

character-sets-dir                (No default value)
data-file-length                  0
keys-used                         18446744073709551615
max-record-length                 9223372036854775807
set-auto-increment                0
set-collation                     (No default value)
sort-records                      0
tmpdir                            /storage/4/tmp/
key-buffer-size                   2147483648
key-cache-block-size              1024
myisam-block-size                 1024
read-buffer-size                  33554432
write-buffer-size                 33554432
sort-buffer-size                  2147483648
sort-key-blocks                   16
decode-bits                       9
ft-min-word-len                   1
ft-max-word-len                   20
ft-stopword-file
stats-method                      nulls_unequal
[28 Apr 2011 17:22] Sveta Smirnova
Thank you for the report.

Closing as "Can't repeat" according to last comment: "no  problem with 5.5.11"