Bug #59022 Valgrind warning in write_delayed() after InnoDB merge
Submitted: 18 Dec 2010 6:47 Modified: 6 Jan 2011 1:19
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version: OS:Any
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: pb2, test failure

[18 Dec 2010 6:47] Alexander Nozdrin
Description:
Tree: mysql-trunk-bugfixing
Test: binlog.binlog_max_extension

==6019== 4 bytes in 1 blocks are definitely lost in loss record 2 of 237
==6019==    at 0x4C20E1C: malloc (vg_replace_malloc.c:195)
==6019==    by 0x90417C: my_malloc (my_malloc.c:38)
==6019==    by 0x5C3FB0: write_delayed(THD*, TABLE*, enum_duplicates, st_mysql_lex_string, bool, bool) (sql_insert.cc:2424)
==6019==    by 0x5C65E6: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:923)
==6019==    by 0x5DA265: mysql_execute_command(THD*) (sql_parse.cc:2845)
==6019==    by 0x5DF440: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5550)
==6019==    by 0x5E0A89: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078)
==6019==    by 0x5E1FD2: do_command(THD*) (sql_parse.cc:815)
==6019==    by 0x6B3795: do_handle_one_connection(THD*) (sql_connect.cc:748)
==6019==    by 0x6B388E: handle_one_connection (sql_connect.cc:684)
==6019==    by 0x92D973: pfs_spawn_thread (pfs.cc:1360)
==6019==    by 0x4E2B73C: start_thread (in /lib64/libpthread-2.5.so)
==6019==    by 0x59DBD1C: clone (in /lib64/libc-2.5.so)

How to repeat:
Check out PB.

It seems, this begun in trunk-innodb-pb2 and came to trunk-bugfixing
with the recent merge. Assigning to Vasil to start with.

Please push a fix into trunk-bugfixing directly!
[21 Dec 2010 16:59] Alexander Nozdrin
NOTE: I can not reproduce the warning by running that single test case.
Neither locally (Ubuntu 10.10, valgrind 3.6.0), nor on tyr29 (PB host).

However, it is perfectly reproducible in PB.
[22 Dec 2010 7:31] 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/127482

3465 Alexander Nozdrin	2010-12-22
      A patch for Bug#59022 (Valgrind warning in write_delayed() after InnoDB merge).
      
      Free allocated bitmap.
[22 Dec 2010 12:48] 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/127504

3465 Alexander Nozdrin	2010-12-22
      A patch for Bug#59022 (Valgrind warning in write_delayed() after InnoDB merge).
      
      Free allocated bitmap.
[22 Dec 2010 13:23] 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/127506

3465 Alexander Nozdrin	2010-12-22
      A patch for Bug#59022 (Valgrind warning in write_delayed() after InnoDB merge).
      
      Fix memory leak introduced by WL#5092 'RBR: Options for writing
      partial or full row images in RBR events'.
      
      Free memory which is allocated for column bitmap associated with
      each row to be processed by delayed insert handler thread.
[22 Dec 2010 13:25] Alexander Nozdrin
Pushed to trunk-bugfixing.
[22 Dec 2010 21:30] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (version source revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (merge vers: 5.6.1) (pib:24)
[6 Jan 2011 1:19] Paul DuBois
Bug does not appear in any released version. No changelog entry needed.