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

innochecksum dies with Floating point exception

Details

    Description

      When using
      /usr/bin/innochecksum Ver 10.6.14, for debian-linux-gnu (x86_64)
      I get "Floating point exception" error at end of output for the command

      /usr/bin/innochecksum -S ./ibdata1
      ...
      Undo page type: 459
      Undo page state: 0 active, 285 cached, 0 to_purge, 0 prepared, 174 other
      index_id        #pages          #leaf_pages     #recs_per_page  #bytes_per_page
      1               1               1               171             15368
      2               10              9               138             9213
      3               5               4               91              7322
      4               4               3               145             6528
      5               1               1               171             7673
      11              3               2               58              6882
      12              1               1               174             12921
      13              1               1               174             11773
      14              1               1               184             14895
      Floating point exception
      
      

      Testing against the same ibdata1 file against innochecksum that is provided with mysql 5.7.42 I do not get any error.

      I have seen this on two recent cases. ibdata1 file is attached.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            The n_leaf_pages is 0 for a particular index it seems (bottom of defrag_analysis function in ./extra/innochecksum.cc).

            danblack Daniel Black added a comment - The n_leaf_pages is 0 for a particular index it seems (bottom of defrag_analysis function in ./extra/innochecksum.cc).

            This was caused by MDEV-25361. If an index or a table has been dropped and the page is marked as freed, we should not report anything. The floating point exception is being reported for entries that are all 0, except for the freed_pages member:

            			/* update per-index statistics */
            			{
            				per_index_stats &index = index_ids[id];
            				if (is_page_free(xdes, physical_page_size,
            						 page_no)) {
            					index.free_pages++;
            					return;
            				}
             
            				index.pages++;
            

            The invocation of std::map::operator[] will allocate and default-initialize an element.

            marko Marko Mäkelä added a comment - This was caused by MDEV-25361 . If an index or a table has been dropped and the page is marked as freed, we should not report anything. The floating point exception is being reported for entries that are all 0, except for the freed_pages member: /* update per-index statistics */ { per_index_stats &index = index_ids[id]; if (is_page_free(xdes, physical_page_size, page_no)) { index.free_pages++; return ; }   index.pages++; The invocation of std::map::operator[] will allocate and default-initialize an element.

            People

              marko Marko Mäkelä
              edward Edward Stoever
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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