Bug #26019 valgrind warning ndbcluster_log_schema_op/safe_mutex_lock invalid read
Submitted: 1 Feb 2007 16:48 Modified: 8 Feb 2007 8:03
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Tomas Ulin CPU Architecture:Any

[1 Feb 2007 16:48] Tomas Ulin
Description:
VALGRIND: 'Invalid read of size 8'
    COUNT: 1
    FUNCTION: safe_mutex_lock    FILES:    master.err
    TESTS:    ndb_dd_disk2memory
    STACK: at 0x9BE9D6: safe_mutex_lock (thr_mutex.c:97)
             by 0x743F55: ndbcluster_log_schema_op(THD*, st_ndbcluster_share*, char const*, int, char const*, char const*, unsigned, unsigned, SCHEMA_OP_TYPE, char const*, char const*, int) (ha_ndbcluster_binlog.cc:1481)
             by 0x730C9C: ha_ndbcluster::create(char const*, st_table*, st_ha_create_information*) (ha_ndbcluster.cc:5064)
             by 0x7034E9: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool) (handler.cc:2610)
             by 0x6DE584: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<create_field>&, unsigned, st_key*, handler*) (unireg.cc:361)
             by 0x754997: mysql_create_table_internal(THD*, char const*, char const*, st_ha_create_information*, List<create_field>&, List<Key>&, bool, unsigned, bool) (sql_table.cc:3509)
             by 0x754E85: mysql_create_table(THD*, char const*, char const*, st_ha_create_information*, List<create_field>&, List<Key>&, bool, unsigned, bool) (sql_table.cc:3589)
             by 0x634C35: mysql_execute_command(THD*) (sql_parse.cc:3091)
             by 0x69C1C9: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3000)
             by 0x69F492: mysql_stmt_execute(THD*, char*, unsigned) (sql_prepare.cc:2299)
             by 0x6375CF: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1816)
             by 0x637CAC: do_command(THD*) (sql_parse.cc:1626)
             by 0x6388EC: handle_one_connection (sql_parse.cc:1232)
             by 0x4D44192: start_thread (in /lib64/libpthread-2.4.so)
             by 0x52B745C: clone (in /lib64/libc-2.4.so)
           Address 0x180 is not stack'd, malloc'd or (recently) free'd

How to repeat:
occationally on pb valgrind
[2 Feb 2007 7:01] Tomas Ulin
proposed patch

Attachment: bug26019.patch (text/x-patch), 2.71 KiB.

[2 Feb 2007 7:02] Tomas Ulin
the patch protect ndb_schema_share global variable with a mutex
[5 Feb 2007 5:40] 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/19302
[7 Feb 2007 16:51] Tomas Ulin
pushed to 5.1.16
[8 Feb 2007 8:03] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented in 5.1.16 changelog.