Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16977

Ofd_access_log_reader use fraction option wrongly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Lustre 2.14.0
    • None
    • 3
    • 9223372036854775807

    Description

      When ofd_access_log_reader has batch-fraction=100 (default), the calculation of the batch fraction is wrong.

      Details:

      In the below fragment the array sa is accessed beyond the upper boundary when

      aa->fraction=100

      lustre\utils\ofd_access_batch.c

      void *alr_sort_and_print_thread(void *arg)

      ...

          sa = calloc(nr, sizeof(*sa));

      ...

          i = nr * aa->fraction / 100;
          cut = sa[i];

      It is unlikely will cause a segfault, but the threshold of IO ops counter for the the printed ALR's might be chosen wrongly. As a result aaccess_log_reader may send not complete set of ALR's when the fraction is 100%

      Attachments

        Activity

          People

            aioffe Alexandre Ioffe
            aioffe Alexandre Ioffe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: