Bug #48145 ERROR 2013 (HY000) while do mysql-test-run test.
Submitted: 19 Oct 2009 9:39 Modified: 25 Oct 2009 12:54
Reporter: Billy Huang Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Errors Severity:S1 (Critical)
Version:Distrib 5.0.85 OS:Linux (kernel 2.6.26.7)
Assigned to: CPU Architecture:Any

[19 Oct 2009 9:39] Billy Huang
Description:
mysql-test-run failed during alias test.
 
CPU: tile arch with Linux kernel 2.6.26.7.

# mysqladmin version
mysqladmin  Ver 8.41 Distrib 5.0.85, for unknown-linux-gnu on tile
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.85-debug-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 27 min 10 sec

# ./mysql-test-run
...
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

alias                          [ fail ]

mysqltest: At line 64: query 'SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie' failed: 2013: Lost connection to MySQL server during query
..........
More results from queries before failure can be found in /usr/mysql-test/var/log/alias.log

Aborting: alias failed in default mode.

# cat master.err
..........
Version: '5.0.85-debug-log'  socket: '/usr/mysql-test/var/tmp/master.sock'  port: 9306  Source distribution
091019 12:33:51 - mysqld 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_size=1048576
read_buffer_size=131072
max_used_connections=1
max_connections=100
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 39424 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Writing a core file

How to repeat:
Install MySQL and run ./mysql-test-run on TILERA platform.
[19 Oct 2009 9:47] Billy Huang
During do step debug, I found that the test failed with group operation in SQL.

1. Test 1 is Ok.
mysql> CHECK TABLE t1;
+-----------------+-------+----------+----------+
| Table           | Op    | Msg_type | Msg_text |
+-----------------+-------+----------+----------+
| huangbenpeng.t1 | check | status   | OK       |
+-----------------+-------+----------+----------+
1 row in set (0.00 sec)

mysql> select * from t1 WHERE hdl_nr < 2000000  ORDER BY kategorie;
..........
6 rows in set (0.00 sec)

Test 2: failed. 
mysql> CHECK TABLE t1;
+-----------------+-------+----------+----------+
| Table           | Op    | Msg_type | Msg_text |
+-----------------+-------+----------+----------+
| huangbenpeng.t1 | check | status   | OK       |
+-----------------+-------+----------+----------+
1 row in set (0.00 sec)

mysql> select * from t1 WHERE hdl_nr < 2000000 GROUP BY kundentyp;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
091019 09:45:32  mysqld restarted
[19 Oct 2009 9:52] Billy Huang
I tried to use ENGINE=InnoDB to create table. Also failed in case 3.
Test case 1:
mysql> CHECK TABLE t1;
+---------+-------+----------+----------+
| Table   | Op    | Msg_type | Msg_text |
+---------+-------+----------+----------+
| test.t1 | check | status   | OK       |
+---------+-------+----------+----------+
1 row in set (0.01 sec)

mysql> select * from t1 WHERE hdl_nr < 2000000 GROUP BY kundentyp;
....
1 row in set (0.00 sec)

Test case 2:
mysql> CHECK TABLE t1;
+---------+-------+----------+----------+
| Table   | Op    | Msg_type | Msg_text |
+---------+-------+----------+----------+
| test.t1 | check | status   | OK       |
+---------+-------+----------+----------+
1 row in set (0.01 sec)

mysql> select * from t1 WHERE hdl_nr < 2000000  ORDER BY kategorie;
......
6 rows in set (0.01 sec)

Test case 3: 
mysql> CHECK TABLE t1;
+---------+-------+----------+----------+
| Table   | Op    | Msg_type | Msg_text |
+---------+-------+----------+----------+
| test.t1 | check | status   | OK       |
+---------+-------+----------+----------+
1 row in set (0.01 sec)

mysql> select * from t1 WHERE hdl_nr < 2000000 GROUP BY kundentyp ORDER BY kategorie;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
091019 09:50:46  mysqld restarted
[19 Oct 2009 9:55] Billy Huang
mysqladmin variables

Attachment: mysqladmin-variables.txt (text/plain), 17.08 KiB.

[19 Oct 2009 10:16] Miguel Solorzano
On Windows current source tree pass the test:

c:\build\mysql-5.0\mysql-test>perl mysql-test-run.pl alias
Logging: mysql-test-run.pl alias
MySQL Version 5.0.88
Disable Instance manager - testing not supported on Windows
Skipping ndbcluster, mysqld not compiled with ndbcluster
Setting mysqld to support SSL connections
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Installing Master Database
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

alias                          [ pass ]            333
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers were restarted 1 times
Spent 0.333 of 14 seconds executing testcases
[20 Oct 2009 0:35] Billy Huang
What parameter or configuration will influence select operation?  Operation with key "GROUP" will fail in my test. 
It is ok with "select * from t1 WHERE hdl_nr < 2000000  ORDER BY kategorie;"; but failed with "select * from t1 WHERE hdl_nr < 2000000 GROUP BY kundentyp;". 
The table is created with "ENGINE=MyISAM" .
[20 Oct 2009 7:50] Billy Huang
mysqld.trace

Attachment: mysqld.trace (application/octet-stream, text), 11.83 KiB.

[21 Oct 2009 17:48] Valeriy Kravchuk
Please, send the results of:

uname -a
free
file mysqld

Linux commands, just for completeness.
[24 Oct 2009 4:25] Billy Huang
# uname -a
Linux localhost 2.6.26.7-MDE-user-bhuang-mysql.86204 #2 SMP Tue Oct 13 20:45:43 PDT 2009 tile unknown
# free
              total         used         free       shared      buffers
  Mem:      8287168      1437952      6849216            0            0
 Swap:            0            0            0
Total:      8287168      1437952      6849216
# file mysqld
mysqld: ELF 32-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
[24 Oct 2009 4:26] Billy Huang
backtrace get from gdb

Attachment: Backtrace.log (application/octet-stream, text), 2.19 KiB.

[24 Oct 2009 4:27] Billy Huang
Analyze the backtrace info. It seems that the same issue as:http://bugs.mysql.com/bug.php?id=25285
[24 Oct 2009 5:32] Billy Huang
I have tried and find that it can be fixed as http://bugs.mysql.com/bug.php?id=25285 through http://lists.mysql.com/commits/27012.
Thanks.
[25 Oct 2009 12:54] Billy Huang
Change to duplicate