Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40891

MUC breaks on purge all caches - race condition when creating directories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide

      1/ enable js cache and disable theme designer mode
      2/ hit purge all caches repeatedly like crazy
      3/ verify the styles are always present and error log is polluted only with " PHP Warning: mkdir(): File exists in..."

      Show
      1/ enable js cache and disable theme designer mode 2/ hit purge all caches repeatedly like crazy 3/ verify the styles are always present and error log is polluted only with " PHP Warning: mkdir(): File exists in..."
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w31_MDL-40891_m26_mkdirrace

      Description

      I noticed a weird error in theme serving scripts:

      Invalid permissions detected in $CFG->dataroot directory, administrator has to fix permissions.

      Debug info: [cachedir]/cachestore_file/default_application/core_config can not be created, check permissions.
      Error code: invaliddatarootpermissions

      Stack trace:

      • line 1264 of /lib/setuplib.php: invalid_dataroot_permissions thrown
      • line 269 of /cache/stores/file/lib.php: call to make_writable_directory()
      • line 278 of /cache/classes/factory.php: call to cachestore_file->initialise()
        *line 152 of /cache/classes/helper.php: call to cache_factory->create_store_from_config()
        *line 137 of /cache/classes/helper.php: call to cache_helper::initialise_cachestore_instances()
      • line 234 of /cache/classes/factory.php: call to cache_helper::get_cache_stores()
        *line 183 of /cache/classes/factory.php: call to cache_factory->create_cache()
        *line 171 of /cache/classes/loaders.php: call to cache_factory->create_cache_from_definition()
      • line 1408 of /lib/moodlelib.php: call to cache::make()
      • line 741 of /lib/setuplib.php: call to get_config()
      • line 595 of /lib/setup.php: call to initialise_cfg()
      • line 122 of /theme/styles.php: call to require()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                skodak Petr Skoda
                Integrator:
                Sam Hemelryk
                Tester:
                Rossiani Wijaya
                Participants:
                Component watchers:
                Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/13