[MDEV-8826] Numerous "Out of memory" errors in MTR/Buildbot Created: 2015-09-22  Updated: 2015-09-22  Resolved: 2015-09-22

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: N/A
Fix Version/s: 10.0.22, 10.1.8

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-deb-precise-amd64/builds/4968/steps/test_4/logs/stdio

spider/bg.spider_fixes_part              w2 [ fail ]
        Test ended at 2015-09-21 18:45:38
 
CURRENT_TEST: spider/bg.spider_fixes_part
mysqltest: At line 167: query 'SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 WHERE a > 1
ORDER BY a' failed: 5: Out of memory (Needed 2143422432 bytes)
 
The result from queries just before the failure was:
< snip >
PRIMARY KEY(a)
) MASTER_1_ENGINE2 MASTER_1_CHARSET2
INSERT INTO tb_l (a, b, c) VALUES
(1, 'a', '2008-08-01 10:21:39'),
(2, 'b', '2000-01-01 00:00:00'),
(3, 'e', '2007-06-04 20:03:11'),
(4, 'd', '2003-11-30 05:01:03'),
(5, 'c', '2001-12-31 23:59:59');
 
2.17
partition with sort
CREATE TABLE ta_l2 (
a INT,
b CHAR(1),
c DATETIME,
PRIMARY KEY(a)
) MASTER_1_ENGINE MASTER_1_COMMENT2_P_2_1
INSERT INTO ta_l2 SELECT a, b, c FROM tb_l;
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l2 WHERE a > 1
ORDER BY a;
 
More results from queries before failure can be found in /run/shm/var/2/log/spider_fixes_part.log

... and many more. Reproducible locally (tried rpl.rpl_row_basic_8partition).

Apparently was introduced by the following commit:

commit 9b9e36ed4926edd896aa274e15286f64cfec4313
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Sun Sep 20 21:31:02 2015 +0300
 
    MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
    
    The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
    (and max_key) to store keys. Buffer size was a good upper bound for
    range analysis and partition pruning, but not for EITS selectivity
    calculations.
    
    Fixed by making these buffers variable-size. The sizes are calculated
    from [pseudo]indexes used for range analysis.



 Comments   
Comment by Sergei Petrunia [ 2015-09-22 ]

Should be fixed by
https://github.com/MariaDB/server/commit/e96f3c79b92f77df2edcd46867e2ef2d2880c2fe

keeping the issue open until the buildbot run confirms.

Comment by Sergei Petrunia [ 2015-09-22 ]

https://github.com/MariaDB/server/commit/e96f3c79b92f77df2edcd46867e2ef2d2880c2fe

Generated at Thu Feb 08 07:30:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.