Bug #22666 Mysql crashes cause of a large query
Submitted: 25 Sep 2006 15:04 Modified: 27 Oct 2006 8:02
Reporter: Tamas Michalik Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.24a OS:Linux (Linux Debian Etch)
Assigned to: Assigned Account CPU Architecture:Any
Tags: crash, large query

[25 Sep 2006 15:04] Tamas Michalik
Description:
Hello!

I found the following error:

I imported tables from Oracle 9i to Mysql Server 5.0.24a with Migration toolkit (fine app, gratulations!). I would like to run a large query, just to test the speed difference (if there is any..).

I have a select, where 12 tables joined togother, the smallest contains a few hundresd records, the largest around 3 million.

When I run this select, the database crashes with the following error (nearly immediatelly):

#2013 - Lost connection to MySQL server during query

In the log I found this:

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=402653184
read_buffer_size=2093056
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 = 802415 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8ba21e0
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=0xb30d8638, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x81b98bc
0xffffe420
(nil)
0x81f7286
0x81f7286
0x81f7286
0x81f7286
0x81f72860x81f819d
0x81f826c
0x820d52c
0x8219723
0x8219a8c
0x81d0c2a
0x81d4fc9
0x81d5520
0x81d67b8
0x81d71c4
0xb7eaa0bd
0xb7cea8fe
New value of fp=(nil) 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 0x8bc1cc0 = 

(here comes my select) 

thd->thread_id=1
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.

I tried the default settings (I copied, and renamed my-large.cnf, my-huge.cnf..), but I got the same error message. 

I also tried to start the client, and the server like this:

mysql --max_allowed_packet=1000M
mysqld --max_allowed_packet=1000M

Is there any configuration, what I should do to support large select like this?

I'm not so familiar with mysql, so maybe I do something wrong, but the answers I saw in connection with this error message, didn't solve my problem.

sorry for my english!

Thank a lot!!!

Tamas Michalik Hungary

mchtamas@port.hu (please reply me in email.. thanks!)

How to repeat:
mysql server crashes on large query
[27 Sep 2006 8:02] Sveta Smirnova
Thank you for the report.

Could you please provide output of SHOW CREATE TABLE statement for each of 12 tables in your select. Also provide select statement itself.
[27 Oct 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".