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

debug-no-sync doesnt fully disable sync calls

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 11.0.0
    • should be reproducible on any linux where sync is really flushes changes onto disk (i.e. not faked).

    Description

      According to documentation debug-no-sync Disables system sync calls

      But it doesn't disable the calls from all places, which affects benchmarks and timing of testing where disk sync must be excluded from scope.

      There are two ways to prove it.
      1. running mysql_install_db with eatmydata is twice faster than with --debug-no-sync:

      > rm -rf dt ; mkdir dt; time ( mysql_install_db --no-defaults --data=$PWD/dt --debug-no-sync >& /dev/null )
       
      real	0m1.232s
      user	0m0.175s
      sys	0m0.082s
      > rm -rf dt ; mkdir dt; time ( eatmydata mysql_install_db --no-defaults --data=$PWD/dt >& /dev/null )
       
      real	0m0.676s
      user	0m0.148s
      sys	0m0.082s
      

      2. Capturing stack traces e.g. during mysql_install_db shows hanging calls to fdatasync().

      terminal1 (will show stack traces):

      while :; do gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $(pidof mariadbd) 2>&1 | grep -A15 fdatasync ; done
      

      terminal2 (run server, e.g. mysql_install_db):

      rm -rf dt ; mkdir dt; time ( mysql_install_db --no-defaults --data=$PWD/dt --debug-no-sync >& /dev/null )
      

      see the attached logs for details of stack traces.

      Attachments

        1. fdatasync1.log
          12 kB
          Andrii
        2. fdatasync2.log
          9 kB
          Andrii

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              anikitin1 Andrii
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.