Bug #53309 valgrind: warnings in main.ps_3innodb
Submitted: 30 Apr 2010 10:00 Modified: 5 May 2010 11:32
Reporter: Vasil Dimov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-innodb OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[30 Apr 2010 10:00] Vasil Dimov
Description:
==27676== Thread 5:
==27676== Syscall param pwrite64(buf) points to uninitialised byte(s)
==27676==    at 0x3A9A60E2E8: (within /lib64/libpthread-2.5.so)
==27676==    by 0x89CADA: os_file_write (os0file.c:2130)
==27676==    by 0x89E3E8: os_aio_simulated_handle (os0file.c:4190)
==27676==    by 0x86BE60: fil_aio_wait (fil0fil.c:4251)
==27676==    by 0x8CE4DB: io_handler_thread (srv0start.c:435)
==27676==    by 0x3A9A606616: start_thread (in /lib64/libpthread-2.5.so)
==27676==    by 0x3A99AD3C2C: clone (in /lib64/libc-2.5.so)
==27676==  Address 0x6C5C000 is 15,744 bytes inside a block of size 753,696 alloc'd
==27676==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==27676==    by 0x8E7E49: ut_malloc_low (ut0mem.c:82)
==27676==    by 0x89E345: os_aio_simulated_handle (os0file.c:4138)
==27676==    by 0x86BE60: fil_aio_wait (fil0fil.c:4251)
==27676==    by 0x8CE4DB: io_handler_thread (srv0start.c:435)
==27676==    by 0x3A9A606616: start_thread (in /lib64/libpthread-2.5.so)
==27676==    by 0x3A99AD3C2C: clone (in /lib64/libc-2.5.so)
==27676== Thread 9:
==27676== Syscall param pwrite64(buf) points to uninitialised byte(s)
==27676==    at 0x3A9A60E2E8: (within /lib64/libpthread-2.5.so)
==27676==    by 0x89CADA: os_file_write (os0file.c:2130)
==27676==    by 0x86C1BB: fil_io (fil0fil.c:4140)
==27676==    by 0x853B87: buf_flush_buffered_writes (buf0flu.c:293)
==27676==    by 0x8554BD: buf_flush_batch (buf0flu.c:958)
==27676==    by 0x8CE1C1: srv_master_thread (srv0srv.c:2632)
==27676==    by 0x3A9A606616: start_thread (in /lib64/libpthread-2.5.so)
==27676==    by 0x3A99AD3C2C: clone (in /lib64/libc-2.5.so)
==27676==  Address 0xAE4C000 is 4,048 bytes inside a block of size 2,113,568 alloc'd
==27676==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==27676==    by 0x8E7E49: ut_malloc_low (ut0mem.c:82)
==27676==    by 0x8DF0BC: trx_doublewrite_init (trx0sys.c:113)
==27676==    by 0x8DF9A8: trx_sys_create_doublewrite_buf (trx0sys.c:198)
==27676==    by 0x8CFE7C: innobase_start_or_create_for_mysql (srv0start.c:1619)
==27676==    by 0x835DB8: innobase_init(void*) (ha_innodb.cc:1971)
==27676==    by 0x731C4E: ha_initialize_handlerton(st_plugin_int*) (handler.cc:435)
==27676==    by 0x7D471C: plugin_initialize(st_plugin_int*) (sql_plugin.cc:1014)
==27676==    by 0x7D78BD: plugin_init(int*, char**, int) (sql_plugin.cc:1238)
==27676==    by 0x624B23: init_server_components() (mysqld.cc:3950)
==27676==    by 0x629374: main (mysqld.cc:4421)
==27676== Thread 11:
==27676== Conditional jump or move depends on uninitialised value(s)
==27676==    at 0x6C7509: compare_record(st_table*) (sql_update.cc:35)
==27676==    by 0x6B4D9B: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
==27676==    by 0x6B93C6: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
==27676==    by 0x638335: mysql_execute_command(THD*) (sql_parse.cc:3183)
==27676==    by 0x6C1016: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
==27676==    by 0x6C1598: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
==27676==    by 0x6C18F9: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
==27676==    by 0x636266: mysql_execute_command(THD*) (sql_parse.cc:2257)
==27676==    by 0x63C203: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5971)
==27676==    by 0x63CCC5: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
==27676==    by 0x63E0C9: do_command(THD*) (sql_parse.cc:874)
==27676==    by 0x62D74B: handle_one_connection (sql_connect.cc:1127)
==27676==    by 0x3A9A606616: start_thread (in /lib64/libpthread-2.5.so)
==27676==    by 0x3A99AD3C2C: clone (in /lib64/libc-2.5.so)
==27676== Conditional jump or move depends on uninitialised value(s)
==27676==    at 0x6C750B: compare_record(st_table*) (sql_update.cc:35)
==27676==    by 0x6B4D9B: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
==27676==    by 0x6B93C6: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
==27676==    by 0x638335: mysql_execute_command(THD*) (sql_parse.cc:3183)
==27676==    by 0x6C1016: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
==27676==    by 0x6C1598: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
==27676==    by 0x6C18F9: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
==27676==    by 0x636266: mysql_execute_command(THD*) (sql_parse.cc:2257)
==27676==    by 0x63C203: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5971)
==27676==    by 0x63CCC5: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
==27676==    by 0x63E0C9: do_command(THD*) (sql_parse.cc:874)
==27676==    by 0x62D74B: handle_one_connection (sql_connect.cc:1127)
==27676==    by 0x3A9A606616: start_thread (in /lib64/libpthread-2.5.so)
==27676==    by 0x3A99AD3C2C: clone (in /lib64/libc-2.5.so)

How to repeat:
fetch mysql-5.1-innodb

$ ./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-debug --prefix=/home/vdimov/mysql-5.1-innodb-install
[30 Apr 2010 10:00] Vasil Dimov
Full output from mtr

Attachment: main.ps_3innodb.valgrind.txt (text/plain), 7.06 KiB.

[5 May 2010 11:32] Marko Mäkelä
The uninitialized writes are a duplicate of Bug #53306. I did not see the conditional jump on uninitialized value in compare_record(), but that one could share a common cause with Bug #38999.