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

Make "A lock was created but not released at:" more helpful

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 5.0
    • 4.4.6, 4.5.2, 5.0
    • Libraries

      At the moment, when a lock is claimed, but not relesed, you get an error like (e.g. from MDL-84695):

      Message:  Coding error detected, it must be fixed by a programmer:     A lock was created but not released at: /var/www/html/lib/classes/task/manager.php on line 831
      

      but, of course, that is not helpful at all. So, one secheduled task did something wrong, but which one?

      I think we need to change it to have a full stack trace.

      Also, currently the code was trying to only throw exceptions about un-released locks during PHPunit tests. However, I am pretty sure defined('PHPUNIT_TEST') is alwasy true. Anyway, I changed that to defined('BEHAT_SITE_RUNNING') || PHPUNIT_TEST || $CFG->debugdeveloper which I think is better.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Daniel Ziegenberg Daniel Ziegenberg
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.