Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.0.24, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
Debian Wheezy and Jessie amd64
-
5.5.50
Description
Running the attached query (either with EXPLAIN or by simply doing the SELECT) on the following empty table will exhaust system memory in seconds(uses more than 10G of memory in less than 2 minutes), killing the query even less than a second after having executed it can take up to 30 seconds to finish (the query will be in "Killed" command and "statistics" state on the Processlist) while still keep eating up more memory.
Tested on both Wheezy and Jessie packaged versions of 10.0.24 with the same result, it didnt seemed to happen on 5.5.48 as i hit the bug only since i upgraded.
The bug doesnt happens when :
- Switching the engine to Aria or MyISAM
- When the optimizer switch "extended_keys" = "off" (which was the default on 5.5 but not since 10.0)
- When both columns are "tinyint"
- With only two values on each IN()/NOT IN()
Using "smallint" for both columns result in the query to be faster to kill but still not ending while eating memory.
–
CREATE TABLE `memoryexhaust` (
|
`id` int NOT NULL,
|
`secondary_id` int NOT NULL,
|
PRIMARY KEY (`id`),
|
KEY `secondary_id` (`secondary_id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
Attachments
Issue Links
- causes
-
MDEV-25020 SELECT if there is IN clause with binary UUID in binary form is extremely slow since MariaDB 10.5.9
-
- Closed
-
- relates to
-
MDEV-9764 MariaDB does not limit memory used for range optimization
-
- Closed
-
-
MDEV-10046 InnoDB Range Optimizer Regression
-
- Open
-
-
MDEV-21958 Query having many NOT-IN clauses running forever and causing available free memory to use completely
-
- Closed
-
-
MDEV-24725 Assertion failure: prev_range_last_block_records < stats.block_size
-
- Stalled
-
- mentioned in
-
Page Loading...
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Running the attached query (either with _EXPLAIN_ or by simply doing the _SELECT_) on the following empty table will exhaust system memory in seconds, killing the query even less than a second after having executed it can take up to 30 seconds to finish (the query will be in "Killed" command and "statistics" state on the Processlist) while still keep eating up more memory.
Tested on both Wheezy and Jessie packaged versions of 10.0.24 with the same result, it didnt seemed to happen on 5.5.48 as i hit the bug only since i upgraded. The bug doesnt happens when switching the engine to Aria or MyISAM or when both columns are "tinyint". Using "smallint" for both columns result in the query to be faster to kill but still not ending while eating memory. -- {code}CREATE TABLE `memoryexhaust` ( `id` int NOT NULL, `secondary_id` int NOT NULL, PRIMARY KEY (`id`), KEY `secondary_id` (`secondary_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;{code} |
Running the attached query (either with _EXPLAIN_ or by simply doing the _SELECT_) on the following empty table will exhaust system memory in seconds(uses more than 10G of memory in less than 2 minutes), killing the query even less than a second after having executed it can take up to 30 seconds to finish (the query will be in "Killed" command and "statistics" state on the Processlist) while still keep eating up more memory.
Tested on both Wheezy and Jessie packaged versions of 10.0.24 with the same result, it didnt seemed to happen on 5.5.48 as i hit the bug only since i upgraded. The bug doesnt happens when switching the engine to Aria or MyISAM or when both columns are "tinyint", it also doesnt happen with only two values on each IN()/NOT IN(). Using "smallint" for both columns result in the query to be faster to kill but still not ending while eating memory. -- {code}CREATE TABLE `memoryexhaust` ( `id` int NOT NULL, `secondary_id` int NOT NULL, PRIMARY KEY (`id`), KEY `secondary_id` (`secondary_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;{code} |
Description |
Running the attached query (either with _EXPLAIN_ or by simply doing the _SELECT_) on the following empty table will exhaust system memory in seconds(uses more than 10G of memory in less than 2 minutes), killing the query even less than a second after having executed it can take up to 30 seconds to finish (the query will be in "Killed" command and "statistics" state on the Processlist) while still keep eating up more memory.
Tested on both Wheezy and Jessie packaged versions of 10.0.24 with the same result, it didnt seemed to happen on 5.5.48 as i hit the bug only since i upgraded. The bug doesnt happens when switching the engine to Aria or MyISAM or when both columns are "tinyint", it also doesnt happen with only two values on each IN()/NOT IN(). Using "smallint" for both columns result in the query to be faster to kill but still not ending while eating memory. -- {code}CREATE TABLE `memoryexhaust` ( `id` int NOT NULL, `secondary_id` int NOT NULL, PRIMARY KEY (`id`), KEY `secondary_id` (`secondary_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;{code} |
Running the attached query (either with _EXPLAIN_ or by simply doing the _SELECT_) on the following empty table will exhaust system memory in seconds(uses more than 10G of memory in less than 2 minutes), killing the query even less than a second after having executed it can take up to 30 seconds to finish (the query will be in "Killed" command and "statistics" state on the Processlist) while still keep eating up more memory.
Tested on both Wheezy and Jessie packaged versions of 10.0.24 with the same result, it didnt seemed to happen on 5.5.48 as i hit the bug only since i upgraded. The bug doesnt happens when : * Switching the engine to Aria or MyISAM * When the optimizer switch "_extended\_keys_" = "_off_" (which was the default on 5.5 but not since 10.0) * When both columns are "tinyint" * With only two values on each IN()/NOT IN() Using "smallint" for both columns result in the query to be faster to kill but still not ending while eating memory. -- {code}CREATE TABLE `memoryexhaust` ( `id` int NOT NULL, `secondary_id` int NOT NULL, PRIMARY KEY (`id`), KEY `secondary_id` (`secondary_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;{code} |
Summary | Quick memory exhaustion on queries having multiple "IN"/"NOT IN" using InnoDB | Quick memory exhaustion with 'extended_keys=on' on queries having multiple 'IN'/'NOT IN' using InnoDB |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Component/s | Optimizer [ 10200 ] | |
Fix Version/s | 5.5 [ 15800 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 5.5 [ 15800 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Assignee | Sergei Petrunia [ psergey ] |
Link | This issue relates to MDEV-10046 [ MDEV-10046 ] |
Sprint | 5.5.50 [ 71 ] |
Rank | Ranked higher |
Affects Version/s | 10.2 [ 14601 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Fix Version/s | 10.2 [ 14601 ] |
Support case ID | 23633 | not-23633 |
Priority | Critical [ 2 ] | Major [ 3 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Fix Version/s | 5.5 [ 15800 ] | |
Fix Version/s | 10.0 [ 16000 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Attachment | pic1.png [ 54381 ] |
Attachment | pic2.png [ 54382 ] |
Attachment | pic3.png [ 54383 ] |
Attachment | memoryexhaust-order2.sql [ 54384 ] |
Labels | range-optimizer |
Assignee | Sergei Petrunia [ psergey ] | Igor Babaev [ igor ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Link |
This issue relates to |
Fix Version/s | 10.1 [ 16100 ] |
Assignee | Igor Babaev [ igor ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Julien Fritsch [ julien.fritsch ] |
Assignee | Julien Fritsch [ julien.fritsch ] | Sergei Petrunia [ psergey ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Fix Version/s | 10.5.9 [ 25109 ] | |
Fix Version/s | 10.2 [ 14601 ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Labels | range-optimizer | ServiceNow range-optimizer |
Labels | ServiceNow range-optimizer | 76qDvLB8Gju6Hs7nk3VY3EX42G795W5z range-optimizer |
Labels | 76qDvLB8Gju6Hs7nk3VY3EX42G795W5z range-optimizer | range-optimizer |
Workflow | MariaDB v3 [ 74581 ] | MariaDB v4 [ 150238 ] |
Link | This issue relates to MDEV-24725 [ MDEV-24725 ] |
Link |
This issue causes |
Zendesk Related Tickets | 201658 176536 183515 | |
Zendesk active tickets | 201658 |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 37255 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 37258 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 37255 ] |
Thanks for the report and test case.