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

Database error when creating assignment with remind me to grade by unchecked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      I don't think it's reasonable to re-create the bug in a testing environment. You'd need ~70,000 random rows in mdl_event table, plus traffic. Confirm that the index is created in both the installation and upgrade scenarios is probably enough.

      Show
      I don't think it's reasonable to re-create the bug in a testing environment. You'd need ~70,000 random rows in mdl_event table, plus traffic. Confirm that the index is created in both the installation and upgrade scenarios is probably enough.
    • Affected Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-66603-master

      Description

      In some cases, creating an assignment with 'remind me to grade by' unchecked fails with the following error:

      Debug info: Deadlock found when trying to get lock; try restarting transaction
      DELETE FROM mdl_event WHERE modulename = ? AND instance = ? AND eventtype = ?
      [array (
      0 => 'assign',
      1 => '53500',
      2 => 'gradingdue',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1625 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1911 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->delete_records_select()
      line 1227 of /mod/assign/locallib.php: call to moodle_database->delete_records()
      line 702 of /mod/assign/locallib.php: call to assign->update_calendar()
      line 41 of /mod/assign/lib.php: call to assign->add_instance()
      line 124 of /course/modlib.php: call to assign_add_instance()
      line 154 of /course/modedit.php: call to add_moduleinfo()

      We're currently running 3.7.1+, but have seen this issue since about 3.3.x. It's intermittent, occuring during busy times.

      Related bugs -
      https://tracker.moodle.org/browse/CONTRIB-7241
      https://tracker.moodle.org/browse/MDL-63732

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cfulton Charles Fulton
                Reporter:
                adamann2 Ann Adamcik
                Participants:
                Component watchers:
                Damyon Wiese, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                8 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m