Bug #29553 Specifying a query cache of 5GB causes the server to crash
Submitted: 4 Jul 2007 14:52 Modified: 9 Jun 2008 16:56
Reporter: Horst Hunger Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.16 OS:Microsoft Windows (64 bit)
Assigned to: Assigned Account CPU Architecture:Any

[4 Jul 2007 14:52] Horst Hunger
Description:
With a qcache_size of 5GB on Windows my test program lost connection to server (2013) when executing a select. The "Task Manager/Processes" showed that it happend when 4GB are allocated and likely more memory will be allocated. 
Unfortunately, I only had a non debug version, so that no core or backtrace is available. So, that must be repeated with a debug version on Windows 2003 server with the attached test program, that hopefully will have the same behaviour (otherwise an initialazation problem?)

How to repeat:
put the test program into "mysql-test/t", create a result file and run it with
./mysql-test-run.pl
[4 Jul 2007 20:11] Sveta Smirnova
Thank you for the report.

You forgot to attach the test program. Please, attach it.
[14 Aug 2007 15:19] Iggy Galarza
Testing record.

Attachment: qcache_test_record.txt (text/plain), 7.31 KiB.

[14 Aug 2007 15:53] Iggy Galarza
I was not able to reproduce the problem exactly using the test script against post-5.1.21 bk repository.  On my test machine, the attempt to set the query_cache_size to anything greater than 4294966272 (as a mysqld startup parameter) resulted in the value being truncated.  I've opened bug#30409 for this problem.  When attempting to set the query_cache_size from the command line client, the results were very different.  The maximum value was elusive and seemed to vary from attempt to attempt.  This is illustrated in qcache_test_record.txt (my notes are in square brackets).  I was able to crash the server with just the SET GLOBAL VARIABLE query_cache_size=[X]; and SHOW VARIABLES LIKE 'query_cahce_size'; commands.  The value of X varied when the crash occurred but one thing was constant: SET GLOBAL VARIABLE query_cache_size=[X]; first resulted in a warning and when issued again was successful.  Once this occurred, the next SHOW VARIABLES LIKE 'query_cache_size'; causes the server to crash.
[8 Oct 2007 15:13] Iggy Galarza
The specific conditions necessary for me to recreate this problem are:

1. Physical RAM = Page File Size (Maximum).  
2. Attempt to set query_cache_size >= Physical RAM/page file size.  Actual values varied.

Condition #1 is the default Windows setting.  In my testing, I found that by increasing the page file size(+1GB), the symptom could not be replicated.  I also discovered that decreasing the physical RAM(-2GB) worked around the problem.
[9 Jun 2008 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".