Bug #47277 | Query stuck "Sending data" locks table; query cache off; MyISAM | ||
---|---|---|---|
Submitted: | 11 Sep 2009 17:13 | Modified: | 26 Apr 2010 10:41 |
Reporter: | Brandon Low | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
Version: | 5.1.38 | OS: | FreeBSD (7.2-RELEASE) |
Assigned to: | CPU Architecture: | Any |
[11 Sep 2009 17:13]
Brandon Low
[11 Sep 2009 17:23]
Brandon Low
Slight correction -- the rows are selected by unique index, not by id in the problematic table.
[12 Sep 2009 13:48]
Valeriy Kravchuk
Thank you for the problem report. Please, send entire problematic SELECT, EXPLAIN results for it, SHOW CREATE TABLE and SHOW TABLE STATUS results for the table(s) used.
[14 Sep 2009 18:10]
Brandon Low
| air_schedule_price | CREATE TABLE `air_schedule_price` ( `id` int(11) NOT NULL AUTO_INCREMENT, `oac` char(4) DEFAULT NULL, `dac` char(4) DEFAULT NULL, `ac` char(3) DEFAULT NULL, `t` enum('U','O','R','M') DEFAULT NULL, `dd` date DEFAULT NULL, `do` int(11) DEFAULT NULL, `fc` enum('M','U','F','B','C') DEFAULT NULL, `vpc` int(11) NOT NULL DEFAULT '0', `ap` float NOT NULL, `lp` float NOT NULL, `hp` float NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `oac` (`oac`,`dac`,`ac`,`t`,`dd`,`do`,`fc`) ) ENGINE=MyISAM AUTO_INCREMENT=27450313 DEFAULT CHARSET=latin1 | SELECT air_schedule_price.oac AS air_schedule_price_oac, air_schedule_price.dac AS air_schedule_price_dac, air_schedule_price.ac AS air_schedule_price_ac, air_schedule_price.dd AS air_schedule_price_dd, air_schedule_price.do AS air_schedule_price_do, air_schedule_price.fc AS air_schedule_price_fc, air_schedule_price.vpc AS air_schedule_price_vpc, air_schedule_price.ap AS air_schedule_price_ap, air_schedule_price.lp AS air_schedule_price_lp, air_schedule_price.hp AS air_schedule_price_hp, air_schedule_price.created_at AS air_schedule_price_created_at, air_schedule_price.updated_at AS air_schedule_price_updated_at, air_schedule_price.id AS air_schedule_price_id, air_schedule_price.t AS air_schedule_price_t FROM air_schedule_price WHERE (air_schedule_price.oac,air_schedule_price.dac,air_schedule_price.ac,air_schedule_price.t,air_schedule_price.dd,air_schedule_price.do,air_schedule_price.fc) = (***VALUES***) OR ***99 more OR'd UniqueKey Values***
[14 Sep 2009 18:10]
Brandon Low
(In the above I shortened the names of everything and omitted the specific values for brevity)
[15 Sep 2009 8:22]
Valeriy Kravchuk
I still would like to see EXPLAIN results for the real query. Please, provide it.
[15 Sep 2009 9:46]
Sveta Smirnova
Please also send us UPDATE statement you use.
[15 Sep 2009 14:23]
Brandon Low
mysql> source explain.txt PAGER set to stdout PAGER set to stdout +----+-------------+--------------------+-------+---------------+-----+---------+------+-------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------------+-------+---------------+-----+---------+------+-------+-------------+ | 1 | SIMPLE | air_schedule_price | range | oac | oac | 27 | NULL | 61642 | Using where | +----+-------------+--------------------+-------+---------------+-----+---------+------+-------+-------------+ 1 row in set (5.34 sec) UPDATE air_schedule_price SET vpc=2, updated_at=CURRENT_TIMESTAMP WHERE air_schedule_price.id = 13886130;
[16 Sep 2009 9:05]
Valeriy Kravchuk
Please, send also the results of: show table status like 'air_schedule_price'\G and the results of: select count(*) from air_schedule_price where <the same where clause with 100 unique keys ORed...>;
[16 Sep 2009 14:16]
Brandon Low
I included the table status in the original report and the database has been in use since the original bug report. Here are the current results of what you asked for: mysql> source count.txt PAGER set to stdout +----------+ | count(*) | +----------+ | 94 | +----------+ 1 row in set (0.91 sec) mysql> show table status like 'air_schedule_price'; +--------------------+--------+---------+------------+----------+----------------+-------------+-------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +--------------------+--------+---------+------------+----------+----------------+-------------+-------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | air_schedule_price | MyISAM | 10 | Fixed | 34652414 | 57 | 1975187598 | 16044073672507391 | 2458752000 | 0 | 34652415 | 2009-08-11 21:29:16 | 2009-09-16 14:15:48 | NULL | latin1_swedish_ci | NULL | | | +--------------------+--------+---------+------------+----------+----------------+-------------+-------------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ 1 row in set (0.01 sec)
[22 Sep 2009 18:37]
Brandon Low
Just an update -- this problem is persisting. It originally presented on MySQL 5.1.36, which I forgot to mention in the original report. I have also now seen the problem raise its head even when using only 8 threads rather than 16. It took nearly a week to manifest with the reduced thread count, however.
[28 Sep 2009 15:41]
Susanne Ebrecht
This could be a duplicate of bug #43758
[28 Sep 2009 17:23]
Kristofer Pettersson
Susanne: I don't agree that it is a duplicate of bug #43758 since Brandon states that the query cache is off (ie query_cache_size=0).
[21 Nov 2009 17:00]
Valeriy Kravchuk
Please, check if this problem is repeatable with a newer version, 5.1.41.
[21 Nov 2009 18:08]
Brandon Low
I'm unable to continue testing this at this time as I am no longer working with the company that had the problem. I have forwarded the bug description to them in case they want to continue investigating with you. Thanks!
[31 Dec 2009 11:20]
Sveta Smirnova
Thank you for the feedback. Will wait news from your colleagues if any. Please also ask them if hang is still repeatable to attach gdb to running mysqld process, then run `thread apply all bt full`, so we can see what going on: problem is still not repeatable on our side.
[1 Feb 2010 0: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".
[24 Feb 2010 19:58]
Sheeri Cabral
I am running into this issue on 5.1.41: mysql> select @@version; +------------------+ | @@version | +------------------+ | 5.1.41-community | +------------------+ 1 row in set (0.00 sec) This also appears on a large (over 15 million rows) MyISAM table after an INSERT DELAYED is being run, it takes about 15 seconds to free the items. The query cache is indeed off: mysql> show global variables like 'query_cache%'; +------------------------------+---------+ | Variable_name | Value | +------------------------------+---------+ | query_cache_limit | 1048576 | | query_cache_min_res_unit | 4096 | | query_cache_size | 0 | | query_cache_type | OFF | | query_cache_wlock_invalidate | OFF | +------------------------------+---------+ 5 rows in set (0.00 sec) The only threads on this server are replication (and me trying to test this out). There are no reads, all the DML is INSERT DELAYED. concurrent_insert is 1 mysql> show global variables like 'myisam%'; +---------------------------+---------------------+ | Variable_name | Value | +---------------------------+---------------------+ | myisam_data_pointer_size | 6 | | myisam_max_sort_file_size | 9223372036853727232 | | myisam_recover_options | OFF | | myisam_repair_threads | 1 | | myisam_sort_buffer_size | 8388608 | | myisam_stats_method | nulls_unequal | | myisam_use_mmap | OFF | +---------------------------+---------------------+ 7 rows in set (0.01 sec) I cannot post the schema nor a sample INSERT query as they involves sensitive data.
[24 Feb 2010 19:58]
Sheeri Cabral
This is MySQL 5.1.41 on Red Hat Enterprise Linux Server release 5.4 (Tikanga) Kernel \r on an \m
[1 Mar 2010 18:33]
Sveta Smirnova
Sheeri, thank you for the feedback. Although would be good if you could provide schema/example query. Probably replacing field names and data with some dummy values will work?
[26 Mar 2010 10:41]
Sveta Smirnova
Sheeri, thank you for the feedback. > This also appears on a large (over 15 million rows) MyISAM table after an INSERT DELAYED is being run, it takes about 15 seconds to free the items. Is it only probelm on your side or is it additional detail for deadlock like in the initial report. Because single 15 seconds "freeing items" can be expected behavior which depends on machine capability and settings.
[26 Apr 2010 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".