Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Incomplete
    • Affects Version/s: 5.7.20-18
    • Fix Version/s: None
    • Component/s: TokuDB
    • Labels:
      None

      Description

      Our tokudb server down due to the following error:

      sgrdbd: /mnt/workspace/percona-server-5.7-binaries-release-rocks/label_exp/centos6-64/percona-server-5.7.20-18/storage/tokudb/PerconaFT/src/ydb.cc:232: int env_fs_poller(void*): Assertion `r == 0' failed.

       

      I check the code:

      r = toku_get_filesystem_sizes(env->i->dir, &avail_size, NULL, &total_size);
      assert(r == 0);

      And I check the code of toku_get_filesystem_sizes, find the below code:

      int
      toku_get_filesystem_sizes(const char *path, uint64_t *avail_size, uint64_t *free_size, uint64_t *total_size) {
      struct statvfs s;
      int r = statvfs(path, &s);
      if (r == -1) {
      r = get_error_errno();
      } else {
      // get the block size in bytes
      uint64_t bsize = s.f_frsize ? s.f_frsize : s.f_bsize;
      // convert blocks to bytes
      if (avail_size)
      *avail_size = (uint64_t) s.f_bavail * bsize;
      if (free_size)
      *free_size = (uint64_t) s.f_bfree * bsize;
      if (total_size)
      *total_size = (uint64_t) s.f_blocks * bsize;
      }
      return r;
      }

      If the statvfs get any system error, tokudb will assert 0.

      IMO, tokudb should print an error, and handle the error according to the errno, and avoid to assert 0 directly.

      It may be a temp error.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gao1738 dennis
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: