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

refresh_mod_calendar_events_task does not release lock when running cron in parallel

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.2
    • Fix Version/s: None
    • Component/s: Administration, Tasks
    • Labels:
      None
    • Affected Branches:
      MOODLE_33_STABLE

      Description

      Reference from post: https://moodle.org/mod/forum/discuss.php?d=365485

       

      Hello, I recently tried to run the cron of a Moodle instance from multiple nodes and I got the error below on one of the nodes:

      // Execute adhoc task: core\task\refresh_mod_calendar_events_task
      ... started 11:20:47. Current memory use 20MB.
      Refreshing events for assign
      !!! Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
      [dirroot]/lib/classes/task/manager.php on line 448
       
      Code should look like:
       
      $factory = \core\lock\lock_config::get_lock_factory('type');
      $lock = $factory->get_lock(Resource id #728);
      $lock->release(); // Locks must ALWAYS be released like this.
       
      !!!
      

      I posted a message to the forums (see above) but I though is a good idea to report it here as well.

      As I explained in the forums I couldnt find the task 

      core\task\refresh_mod_calendar_events_task

       
      Does anyone else noticed this issue? Is there a way to know why the lock is not released?

       

      The only plugin related to assignments I have installed is Turnitin plagiarism plugin.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                christos312 christos
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: