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

recentsessionlocks debugging clashes with readonly sessions

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1) Configure readonly sessions:

      $CFG->enable_read_only_sessions = true;

      2) As part of this you will need to configure MUC to store session caches in a place outside the session, ie make the default Session store 'file'. E.g.

      • Go to admin > plugins > caching > configuration and scroll to the bottom.
      • Click 'edit mappings'
      • Change sesssion to 'default file store for application caches'

      3) Also configure session lock debugging:

      $CFG->debugsessionlock = 100;

      4) Tail the error logs in a new terminal window:

      sudo tail -f /var/log/apache2/error.log 

      5) Visit the dashboard and some other random pages to fill the recent session lock list

      6) copy attached php file MDL-68983-recentsessionlocks.php to your site root and visit /MDL-68983-recentsessionlocks.php

      7) Confirm there are NOT any errors in the logs like this:

      The following SESSION params were either added, or were updated.
      SESSION key: recentsessionlocks

       

       

      Show
      1) Configure readonly sessions: $CFG->enable_read_only_sessions = true; 2) As part of this you will need to configure MUC to store session caches in a place outside the session, ie make the default Session store 'file'. E.g. Go to admin > plugins > caching > configuration and scroll to the bottom. Click 'edit mappings' Change sesssion to 'default file store for application caches' 3) Also configure session lock debugging: $CFG->debugsessionlock = 100; 4) Tail the error logs in a new terminal window: sudo tail -f /var/log/apache2/error.log 5) Visit the dashboard and some other random pages to fill the recent session lock list 6) copy attached php file  MDL-68983 -recentsessionlocks.php to your site root and visit / MDL-68983 -recentsessionlocks.php 7) Confirm there are NOT any errors in the logs like this: The following SESSION params were either added, or were updated. SESSION key: recentsessionlocks    
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull 3.9 Branch:
      MDL-68983-recent-session-lock-ro-MOODLE_39_STABLE
    • Pull 3.10 Branch:
      MDL-68983-recent-session-lock-ro-MOODLE_310_STABLE
    • Pull Master Branch:
      MDL-68983-recent-session-lock-ro

      Description

      Error logs:

      This session was started as a read-only session but writes have been detected.#012PHP message: The following SESSION params were either added, or were updated.#012PHP message: SESSION key: recentsessionlocks"

      If readonly sessions is on, then the recentsessionlocks debugging is moot as we don't even have a lock. It should just not run at all

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brendanheywood Brendan Heywood
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Dmitrii Metelkin
              Integrator:
              Jake Dallimore
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h