Bug #42821 Assertion failed: maxcount!=0, file filesort.cc, line 1227 after Falcon recovery
Submitted: 13 Feb 2009 9:41 Modified: 2 Feb 2010 15:49
Reporter: Philip Stoev Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S1 (Critical)
Version:6.0-falcon-team OS:Any
Assigned to: CPU Architecture:Any
Tags: F_SERVER

[13 Feb 2009 9:41] Philip Stoev
Description:
When executing a SELECT on a Falcon table after recovery, the following assert is hit:

Assertion failed: maxcount!=0, file filesort.cc, line 1227

see

http://clustra.norway.sun.com/~bteam/pb2/web.py?action=archive_download&archive_id=319704&...

How to repeat:
With the RQG:

$ perl pb2gentest.pl \
/export/home/pb2/test/sb_1-318882-1234432708.69/mysql-6.0.10-alpha-solaris10-sparc-test \
/export/home/pb2/test/sb_1-318882-1234432708.69/mysql-6.0.10-alpha-solaris10-sparc-test/vardirs \
http://bk-internal.mysql.com/bzr-mysql/mysql-6.0-falcon-team/ \
falcon_limit
[13 Feb 2009 9:42] Philip Stoev
Backtrace

# 00:00:12 /lib64/libc.so.6(__assert_fail+0xe9) [0x315a42bec9]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(merge_buffers(st_sort_param*, st_io_cache*, st_io_cache*, unsigned char*, st_buffpek*, st_buffpek*, st_buffpek*, int)+0x1a5) [0x80d8a3]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld [0x80e1a7]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(filesort(THD*, TABLE*, st_sort_field*, unsigned int, SQL_SELECT*, unsigned long long, bool, unsigned long long*)+0x89a) [0x810bd3]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld [0x74f474]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(JOIN::exec()+0x208d) [0x773779]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0x31c) [0x76e5f4]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(handle_select(THD*, LEX*, select_result*, unsigned long)+0x1de) [0x773d8f]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld [0x6d10f6]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(mysql_execute_command(THD*)+0x7d6) [0x6d26a4]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x273) [0x6da9c1]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xa54) [0x6db5ac]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(do_command(THD*)+0x22b) [0x6dcad5]
# 00:00:12 /build/bzr/6.0-falcon-team/mysql-test/../sql/mysqld(handle_one_connection+0x11a) [0x6caaa5]
# 00:00:12 /lib64/libpthread.so.0 [0x315b0073da]
# 00:00:12 /lib64/libc.so.6(clone+0x6d) [0x315a4e627d]
# 00:00:12 Trying to get some variables.
# 00:00:12 Some pointers may be invalid and cause the dump to abort...
# 00:00:12 thd->query at 0x2ccf450 = SELECT * FROM `test`.`table10000_falcon_int_autoinc` ORDER BY `char_64_utf8_not_null_key` LIMIT 4294836225
[13 Feb 2009 9:45] Philip Stoev
Tablespaces:

http://fedora10.dyndns.org/bug42821-2.zip
[17 Nov 2009 9:08] Philip Stoev
Vardir has been uploaded to a more accessible location:

http://mysql-systemqa.s3.amazonaws.com/bug42821-2.zip
[13 Jan 2010 14:49] Philip Stoev
(4:44:30 PM) Roy: pstoev1: It seems that the problem occurs in filesort when you have row estimates that are seriously wrong.
(4:47:15 PM) Roy: I think it is worth looking into, e.g. hard-code all row count estimates to 1 (or 2) and run the test suite.
[2 Feb 2010 15:49] Manyi Lu
Will not fix since it has only been observed with falcon. We suspect that it is caused by falcon returning wrong estimates.