Bug #46081 Valgrind warnings (JOIN code) in test rpl_trigger

Submitted: 9 Jul 2009 13:08 Modified: 4 Aug 2009 7:48
Reporter: Guilhem Bichot Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.1-bzr OS:Linux (64)
Assigned to: Assigned Account CPU Architecture:Any

[9 Jul 2009 13:08] Guilhem Bichot
Description:
Using 5.1 with latest revision:
joro@sun.com-20090708131116-kyz8iotbum8w9yic
BUILD/compile-pentium64-valgrind-max,
./mtr --mysqld=--binlog-format=mixed rpl_trigger --valgrind
shows:
==30171== Thread 10:
==30171== Source and destination overlap in memcpy(0x77630A8, 0x77630A8, 28)
==30171==    at 0x4C271DA: memcpy (mc_replace_strmem.c:402)
==30171==    by 0x66A6EC: JOIN::init(THD*, List<Item>&, unsigned long long, select_result*) (sql_select.h:469)
==30171==    by 0x66A83D: JOIN::JOIN(THD*, List<Item>&, unsigned long long, select_result*) (sql_select.h:418)
==30171==    by 0x7589F1: mysql_select(THD*, Item***, TABLE_LIST*, unsigned, List<Item>&, Item*, unsigned, st_order*, st_order*, Item*, st
_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2361)
==30171==    by 0x75E1E0: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:268)
==30171==    by 0x6C827D: _ZL21execute_sqlcom_selectP3THDP10TABLE_LIST (sql_parse.cc:5012)
==30171==    by 0x6CA19D: mysql_execute_command(THD*) (sql_parse.cc:2207)
==30171==    by 0x895572: sp_instr_stmt::exec_core(THD*, unsigned*) (sp_head.cc:2907)
==30171==    by 0x8957AA: sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned*, bool, sp_instr*) (sp_head.cc:2735)
==30171==    by 0x89BD18: sp_instr_stmt::execute(THD*, unsigned*) (sp_head.cc:2849)
==30171==    by 0x897BED: sp_head::execute(THD*) (sp_head.cc:1253)
==30171==    by 0x8989BC: sp_head::execute_procedure(THD*, List<Item>*) (sp_head.cc:1983)
==30171==    by 0x6D0CFB: mysql_execute_command(THD*) (sql_parse.cc:4353)
==30171==    by 0x6D2EA7: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5932)
==30171==    by 0x6D3C5E: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1213)
==30171==    by 0x6D503C: do_command(THD*) (sql_parse.cc:854)
==30171== 
==30171== Source and destination overlap in memcpy(0x77630A8, 0x77630A8, 28)
==30171==    at 0x4C271DA: memcpy (mc_replace_strmem.c:402)
==30171==    by 0x712F8C: setup_wild(THD*, TABLE_LIST*, List<Item>&, List<Item>*, unsigned) (sql_base.cc:7378)
==30171==    by 0x757ABD: JOIN::prepare(Item***, TABLE_LIST*, unsigned, Item*, unsigned, st_order*, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) (sql_select.cc:494)
==30171==    by 0x758AC9: mysql_select(THD*, Item***, TABLE_LIST*, unsigned, List<Item>&, Item*, unsigned, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2367)
==30171==    by 0x75E1E0: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:268)
==30171==    by 0x6C827D: _ZL21execute_sqlcom_selectP3THDP10TABLE_LIST (sql_parse.cc:5012)
==30171==    by 0x6CA19D: mysql_execute_command(THD*) (sql_parse.cc:2207)
==30171==    by 0x895572: sp_instr_stmt::exec_core(THD*, unsigned*) (sp_head.cc:2907)
==30171==    by 0x8957AA: sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned*, bool, sp_instr*) (sp_head.cc:2735)
==30171==    by 0x89BD18: sp_instr_stmt::execute(THD*, unsigned*) (sp_head.cc:2849)
==30171==    by 0x897BED: sp_head::execute(THD*) (sp_head.cc:1253)
==30171==    by 0x8989BC: sp_head::execute_procedure(THD*, List<Item>*) (sp_head.cc:1983)
==30171==    by 0x6D0CFB: mysql_execute_command(THD*) (sql_parse.cc:4353)
==30171==    by 0x6D2EA7: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5932)
==30171==    by 0x6D3C5E: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1213)
==30171==    by 0x6D503C: do_command(THD*) (sql_parse.cc:854)

I'm using valgrind-3.3.1-Debian

How to repeat:
run the test.
However, I don't see this warning in pushbuild2 for 5.1, so maybe this is a problem of valgrind version, platform...
For example, my Valgrind also prints:
--30171-- WARNING: unhandled syscall: 142
--30171-- You may be able to write your own handler.
--30171-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--30171-- Nevertheless we consider this a bug.  Please report
--30171-- it at http://valgrind.org/support/bug_reports.html.
so maybe it has a bug.
[9 Jul 2009 13:13] Guilhem Bichot
With tree 5.1-performance-version, I don't have the "unhandled signal 142" but have the same JOIN warnings. So maybe my Valgrind is working.
[29 Jul 2009 21:03] Susanne Ebrecht
Verified as described
[4 Aug 2009 7:48] Sergei Glukhov
duplicated with bug#46003

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.