Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-38551

MSAN/Valgrind uninitialised value errors in maria_page_crc

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a INT);
      INSERT INTO t VALUES (1),(2);
      SET histogram_size = 255, histogram_type = 'DOUBLE_PREC_HB';
      ANALYZE TABLE t PERSISTENT FOR ALL;
       
      DROP TABLE t;
      

      10.11 29a986a0247904e026584e3f2ae250c81a1486d5 valgrind

      ==1478555== Conditional jump or move depends on uninitialised value(s)
      ==1478555==    at 0x12D4211: maria_page_crc (ma_pagecrc.c:37)
      ==1478555==    by 0x12D4546: maria_page_crc_set_normal (ma_pagecrc.c:137)
      ==1478555==    by 0x12B73EE: pagecache_fwrite (ma_pagecache.c:681)
      ==1478555==    by 0x12C55AD: flush_cached_blocks (ma_pagecache.c:4829)
      ==1478555==    by 0x12C6149: flush_pagecache_blocks_int (ma_pagecache.c:5126)
      ==1478555==    by 0x12C65C7: flush_pagecache_blocks_with_filter (ma_pagecache.c:5241)
      ==1478555==    by 0x12E3DC3: _ma_flush_table_files (ma_extra.c:663)
      ==1478555==    by 0x12E368D: maria_extra (ma_extra.c:419)
      ==1478555==    by 0x128FA3E: ha_maria::extra(ha_extra_function) (ha_maria.cc:2770)
      ==1478555==    by 0xD42942: update_statistics_for_table(THD*, TABLE*) (sql_statistics.cc:2983)
      ==1478555==    by 0xE48D0B: mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool) (sql_admin.cc:1075)
      ==1478555==    by 0xE4AA53: Sql_cmd_analyze_table::execute(THD*) (sql_admin.cc:1570)
      ==1478555==    by 0xC3989D: mysql_execute_command(THD*, bool) (sql_parse.cc:6208)
      ==1478555==    by 0xC3FBE2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:8230)
      ==1478555==    by 0xC2AE22: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:1924)
      ==1478555==    by 0xC29741: do_command(THD*, bool) (sql_parse.cc:1434)
      ==1478555== Syscall param pwrite64(buf) points to uninitialised byte(s)
      ==1478555==    at 0x4D73437: __libc_pwrite64 (pwrite64.c:25)
      ==1478555==    by 0x4D73437: pwrite (pwrite64.c:23)
      ==1478555==    by 0x1A61EA6: my_pwrite (my_pread.c:159)
      ==1478555==    by 0x12B7493: pagecache_fwrite (ma_pagecache.c:692)
      ==1478555==    by 0x12C55AD: flush_cached_blocks (ma_pagecache.c:4829)
      ==1478555==    by 0x12C6149: flush_pagecache_blocks_int (ma_pagecache.c:5126)
      ==1478555==    by 0x12C65C7: flush_pagecache_blocks_with_filter (ma_pagecache.c:5241)
      ==1478555==    by 0x12E3DC3: _ma_flush_table_files (ma_extra.c:663)
      ==1478555==    by 0x12E368D: maria_extra (ma_extra.c:419)
      ==1478555==    by 0x128FA3E: ha_maria::extra(ha_extra_function) (ha_maria.cc:2770)
      ==1478555==    by 0xD42942: update_statistics_for_table(THD*, TABLE*) (sql_statistics.cc:2983)
      ==1478555==    by 0xE48D0B: mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool) (sql_admin.cc:1075)
      ==1478555==    by 0xE4AA53: Sql_cmd_analyze_table::execute(THD*) (sql_admin.cc:1570)
      ==1478555==    by 0xC3989D: mysql_execute_command(THD*, bool) (sql_parse.cc:6208)
      ==1478555==    by 0xC3FBE2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:8230)
      ==1478555==    by 0xC2AE22: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:1924)
      ==1478555==    by 0xC29741: do_command(THD*, bool) (sql_parse.cc:1434)
      ==1478555==  Address 0xa376133 is in a rw- anonymous segment
      

      11.8 9446b9178844e5ef291a181e2778b8f525a043d5 MSAN

      ==20961==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x55ac681b548f in crcr32_calc_pclmulqdq /home/jenkins/11.8-msan/mysys/crc32/crc32_x86.c:322:1
          #1 0x55ac681b5010 in crc32_pclmul /home/jenkins/11.8-msan/mysys/crc32/crc32_x86.c:343:11
          #2 0x55ac673c4a31 in maria_page_crc /home/jenkins/11.8-msan/storage/maria/ma_pagecrc.c:31:15
          #3 0x55ac673c4a31 in maria_page_crc_set_normal /home/jenkins/11.8-msan/storage/maria/ma_pagecrc.c:137:15
          #4 0x55ac6739f387 in pagecache_fwrite /home/jenkins/11.8-msan/storage/maria/ma_pagecache.c:681:7
          #5 0x55ac673a65bb in flush_cached_blocks /home/jenkins/11.8-msan/storage/maria/ma_pagecache.c:4829:12
          #6 0x55ac673a0cec in flush_pagecache_blocks_int /home/jenkins/11.8-msan/storage/maria/ma_pagecache.c:5126:17
          #7 0x55ac673a0cec in flush_pagecache_blocks_with_filter /home/jenkins/11.8-msan/storage/maria/ma_pagecache.c:5241:8
          #8 0x55ac673e6daa in _ma_flush_table_files /home/jenkins/11.8-msan/storage/maria/ma_extra.c:672:11
          #9 0x55ac673e47ca in maria_extra /home/jenkins/11.8-msan/storage/maria/ma_extra.c:419:14
          #10 0x55ac67341d1f in ha_maria::extra(ha_extra_function) /home/jenkins/11.8-msan/storage/maria/ha_maria.cc:2781:8
          #11 0x55ac665c2656 in update_statistics_for_table(THD*, TABLE*) /home/jenkins/11.8-msan/sql/sql_statistics.cc:2985:36
          #12 0x55ac66802668 in mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool) /home/jenkins/11.8-msan/sql/sql_admin.cc:1096:30
          #13 0x55ac6680561f in Sql_cmd_analyze_table::execute(THD*) /home/jenkins/11.8-msan/sql/sql_admin.cc:1622:8
          #14 0x55ac66348a8b in mysql_execute_command(THD*, bool) /home/jenkins/11.8-msan/sql/sql_parse.cc:5924:26
          #15 0x55ac66337b29 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /home/jenkins/11.8-msan/sql/sql_parse.cc:7953:18
          #16 0x55ac6633098c in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /home/jenkins/11.8-msan/sql/sql_parse.cc:1921:7
          #17 0x55ac66338be1 in do_command(THD*, bool) /home/jenkins/11.8-msan/sql/sql_parse.cc:1431:17
          #18 0x55ac667cd4dc in do_handle_one_connection(CONNECT*, bool) /home/jenkins/11.8-msan/sql/sql_connect.cc:1504:11
          #19 0x55ac667ccfb6 in handle_one_connection /home/jenkins/11.8-msan/sql/sql_connect.cc:1416:5
          #20 0x55ac6754ade7 in pfs_spawn_thread /home/jenkins/11.8-msan/storage/perfschema/pfs.cc:2198:3
          #21 0x7f58ebea5b7a  (/lib/x86_64-linux-gnu/libc.so.6+0x92b7a) (BuildId: fce446c9d4ad48e2b0c90cce1a11722897805281)
          #22 0x7f58ebf237b7  (/lib/x86_64-linux-gnu/libc.so.6+0x1107b7) (BuildId: fce446c9d4ad48e2b0c90cce1a11722897805281)
       
        Uninitialized value was stored to memory at
          #0 0x55ac65f115be in __msan_memcpy (/home/jenkins/11.8-msan/sql/mariadbd+0x89c5be) (BuildId: 0073301696182ec6043dd29b3a3671a4ec034654)
          #1 0x55ac6739dce7 in pagecache_write_part /home/jenkins/11.8-msan/storage/maria/ma_pagecache.c:4512:7
          #2 0x55ac6743d3b7 in write_block_record /home/jenkins/11.8-msan/storage/maria/ma_blockrec.c:3198:9
       
        Memory was marked as uninitialized
          #0 0x55ac65f1c1f1 in __msan_allocated_memory (/home/jenkins/11.8-msan/sql/mariadbd+0x8a71f1) (BuildId: 0073301696182ec6043dd29b3a3671a4ec034654)
          #1 0x55ac68151f14 in my_malloc /home/jenkins/11.8-msan/mysys/my_malloc.c:117:7
       
      SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/jenkins/11.8-msan/mysys/crc32/crc32_x86.c:322:1 in crcr32_calc_pclmulqdq
      

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.