Bug #59177 mysqlbinlog_row_big fails on Windows with out of memory
Submitted: 27 Dec 2010 5:10 Modified: 28 Jan 2011 12:24
Reporter: Zhenxing He Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1, 5.5, 5.6 OS:Any
Assigned to: Luis Soares CPU Architecture:Any
Tags: pb2, test, windows

[27 Dec 2010 5:10] Zhenxing He
Description:
Test mysqlbinlog_row_big fails on Windows platforms of PB2:

main.mysqlbinlog_row_big                 [ fail ]
        Test ended at 2010-12-24 03:31:00

CURRENT_TEST: main.mysqlbinlog_row_big
mysqltest: At line 104: query 'UPDATE t1 SET c1 = CONCAT(c1, c1)' failed: 1041: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

The result from queries just before the failure was:
< snip >
affected rows: 1
4MB
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 262144));
affected rows: 1
512KB
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 32768));
affected rows: 1
#
# Show what we have in the table.
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
LENGTH(c1)	268435456
LENGTH(c1)	33554432
LENGTH(c1)	4194304
LENGTH(c1)	524288
affected rows: 4
#
# Grow the rows by updating.
#

How to repeat:
http://pb2.norway.sun.com/?template=mysql_show_test_failure&search=yes&push_id=1857258&tes...
[5 Jan 2011 15:43] Luis Soares
This does not seem related to replication. 

The problem is that the execution of a statement that
concatenates two strings results in out of memory. The query is
the following:

  UPDATE t1 SET c1 = CONCAT(c1, c1);

where the lengths of c1 is (for all 4 rows are in the table at
UPDATE time):

  SELECT LENGTH(c1) FROM t1; 
  LENGTH(c1)      268435456
  LENGTH(c1)      33554432
  LENGTH(c1)      4194304
  LENGTH(c1)      524288

According to these lengths, this is actually a considerable amount of
memory...

Anyway this is probably env issue. However here are some observations:

  1. both x86 boxes have 8Gb mem
  2. MTR is not run in parallel
  3. It repeats itself consistently but only on MS Windows, on x86
     arch and on PB2
  4. I could not reproduce this behavior in other win x86 lab machine
     (the entire suite succeeded). AFAIK, The test only fails on PB2.
[5 Jan 2011 16:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/127992

3452 Luis Soares	2011-01-05
      BUG#59177: mysqlbinlog_row_big fails on Windows with out of memory
      
      The test case fails with out of memory while updating a table
      with several multi-megabytes sized rows. This can probably be too
      exhausting for PB2 env.
      
      The quick fix here is to reduce the size of the biggest
      row (256MB) so that it becomes a little smaller (64MB).
[12 Jan 2011 19:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128557

3546 Luis Soares	2011-01-12
      BUG#59177: mysqlbinlog_row_big fails on Windows with out of memory
            
      The test case fails with out of memory while updating a table
      with several multi-megabytes sized rows. This can probably be too
      exhausting for PB2 env.
            
      The quick fix here is to reduce the size of the biggest
      row (256MB) so that it becomes a little smaller (64MB).
[12 Jan 2011 19:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128558

3231 Luis Soares	2011-01-12 [merge]
      BUG#59177
      
      Automerge from mysql-5.1.
[12 Jan 2011 19:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/128559

3491 Luis Soares	2011-01-12 [merge]
      BUG#59177
      
      Automerge from mysql-5.5.
[13 Jan 2011 11:46] Bugs System
Pushed into mysql-5.1 5.1.56 (revid:luis.soares@oracle.com-20110113114100-82kaxaq975qkd8i2) (version source revid:luis.soares@oracle.com-20110113114100-82kaxaq975qkd8i2) (merge vers: 5.1.56) (pib:24)
[13 Jan 2011 11:46] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:luis.soares@oracle.com-20110113114439-flu4wfak5gtrk7xq) (version source revid:luis.soares@oracle.com-20110113114439-flu4wfak5gtrk7xq) (merge vers: 5.6.2) (pib:24)
[13 Jan 2011 11:46] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:luis.soares@oracle.com-20110113114234-1h6iz9wrcmwtcg9z) (version source revid:luis.soares@oracle.com-20110113114234-1h6iz9wrcmwtcg9z) (merge vers: 5.5.9) (pib:24)
[28 Jan 2011 10:50] Jon Stephens
Affects test case only; no end-user changes to document. Closed.
[28 Jan 2011 12:24] Jon Stephens
Returning to Closed state; see my previous comment.