Crash with flush query cache in MySQL-4.1
am 01.01.2003 13:34:07 von Jocelyn FournierHi,
How-to-repeat :
mysql> flush query cache;
Query OK, 0 rows affected (0.01 sec)
mysql> flush query cache;
ERROR 2013: Lost connection to MySQL server during query
mysql> flush query cache;
Query OK, 0 rows affected (0.00 sec)
mysql> flush query cache;
Query OK, 0 rows affected (0.01 sec)
mysql> show status LIKE "Qcache%";
+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| Qcache_queries_in_cache | 724 |
| Qcache_inserts | 1241 |
| Qcache_hits | 2572 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 30 |
| Qcache_free_memory | 32275096 |
| Qcache_free_blocks | 15 |
| Qcache_total_blocks | 1540 |
+-------------------------+----------+
8 rows in set (0.00 sec)
mysql> flush query cache;
ERROR 2013: Lost connection to MySQL server during query
Stack trace :
0x80a9a91 handle_segfault + 481
0x8296fd8 pthread_sighandler + 176
0x813a520 Query_cache::move_by_type(char**, Query_cache_block**, unsigned
long*, Query_cache_block*) + 1376
0x8139f21 Query_cache::pack_cache() + 97
0x8137bda Query_cache::pack(unsigned long, unsigned) + 26
0x80bcd89 reload_acl_and_cache(THD*, unsigned long, st_table_list*) + 537
0x80ba2f4 mysql_execute_command(THD*) + 14196
0x80bba68 mysql_parse(THD*, char*, unsigned) + 248
0x80b5a8a dispatch_command(enum_server_command, THD*, char*, unsigned) + 842
0x80b5726 do_command(THD*) + 118
0x80b500e handle_one_connection + 910
0x82949fa pthread_start_thread + 218
0x82c8d1a thread_start + 4
Note in sql_cache.h I have
#define QUERY_CACHE_MIN_RESULT_DATA_SIZE 2500
instead of
#define QUERY_CACHE_MIN_RESULT_DATA_SIZE 1024*4
In my my.cnf :
set-variable = query_cache_size=32M
I even succeeded in locking the server (missing mutex ?) :
mysql> show status LIKE "Qcache%";
+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| Qcache_queries_in_cache | 1057 |
| Qcache_inserts | 2576 |
| Qcache_hits | 4898 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 60 |
| Qcache_free_memory | 32056208 |
| Qcache_free_blocks | 9 |
| Qcache_total_blocks | 2221 |
+-------------------------+----------+
8 rows in set (0.00 sec)
mysql> flush query cache;
A show processlist showed a lot of NULL state process:
+-----+---------+-----------+------------+----------------+- -----+----------
----------+------------------------------------------------- ----------------
-------------------------------------+
| Id | User | Host | db | Command | Time | State
| Info
|
+-----+---------+-----------+------------+----------------+- -----+----------
----------+------------------------------------------------- ----------------
-------------------------------------+
| 12 | DELAYED | localhost | Hardwarefr | Delayed_insert | 56 | Waiting
for INSERT |
|
| 13 | DELAYED | localhost | Hardwarefr | Delayed_insert | 56 | Waiting
for INSERT |
|
| 63 | DELAYED | localhost | Hardwarefr | Delayed_insert | 35 | Waiting
for INSERT |
|
| 64 | DELAYED | localhost | Hardwarefr | Delayed_insert | 35 | Waiting
for INSERT |
|
| 113 | root | localhost | NULL | Query | 24 | NULL
| flush query cache
|
| 163 | mysql | localhost | Hardwarefr | Query | 31 | query end
| SELECT IF(nom IS NULL,0,nom),forumadmin.forum FROM online,forumadmin LEFT
JOIN forumcathardwarefr ON |
| 165 | mysql | localhost | Hardwarefr | Query | 31 | update
| INSERT INTO threadhardwarefr12
(numeropost,icone,contenu,pseudo,date,signature,ip,realip) VALUES (74 |
| 166 | mysql | localhost | Hardwarefr | Query | 31 | NULL
| SELECT PostMax1,PostMax2,freemodo,positionPub,LOWER(forum),up FROM
forumadmin WHERE defaut=1 |
| 167 | mysql | localhost | Hardwarefr | Query | 31 | NULL
| SELECT admin,nb_inscrit,PostMax2,da,LOWER(forum),positionPub,up,son dage
FROM forumadmin WHERE defaut |
| 168 | mysql | localhost | Hardwarefr | Query | 31 | NULL
| SELECT
LOWER(forum),PostMax2,freemodo,HTML,positionPub,up,maxsignat ure,maxsmilies,n
bdrap FROM foruma |
| 169 | mysql | localhost | Hardwarefr | Query | 30 | NULL
| SELECT admin,nb_inscrit,PostMax2,da,LOWER(forum),positionPub,up,son dage
FROM forumadmin WHERE defaut |
| 170 | mysql | localhost | Hardwarefr | Query | 30 | NULL
| SELECT admin,nb_inscrit,PostMax2,da,LOWER(forum),positionPub,up,son dage
FROM forumadmin WHERE defaut |
| 311 | mysql | localhost | Hardwarefr | Query | 0 | NULL
| SELECT
LOWER(forum),PostMax2,freemodo,HTML,positionPub,up,maxsignat ure,maxsmilies,n
bdrap FROM foruma |
| 312 | mysql | localhost | Hardwarefr | Query | 0 | NULL
| SELECT PostMax2,da,PostMax1,freemodo,nbr_sondage,LOWER(forum),nbdra p FROM
forumadmin WHERE defaut=1 |
+-----+---------+-----------+------------+----------------+- -----+----------
----------+------------------------------------------------- ----------------
-------------------------------------+
154 rows in set (0.00 sec)
Regards,
Jocelyn
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread13386@lists.mysql.com
To unsubscribe, e-mail