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

False positive session mutation errors when read only session debugging is off

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-81192_403_STABLE
    • MDL-81192_main
    • Hide

      Prerequisites: 

      1. On your server, run `tail -f /var/log/error.log` where /var/log/error.log is the file your PHP error logs to go.
      2. Set "Debug" to "Developer" (In site administration / Development / Debugging)
      3. In your config.php this is NOT set: 

      $CFG->enable_read_only_sessions_debug = true

      Test "core_calendar_get_action_events_by_timesort"

      0. Enable block "Timeline" "My dashboard" page
      1. Create a course set the start and end date so as to be in progress
      2. Add an activity
      3. Enroll a student (S1), and login as the new student.
      4. Check no error related to "READ_ONLY_SESSION" is displayed in error.log (Before fix: a message was logged).
      5. Now, set `$CFG->enable_read_only_sessions_debug = true;` in config.php
      6. Log in as the student (S1) again (or just reload the page).
      7. Check no error related to "READ_ONLY_SESSION" is displayed in error.log

      Show
      Prerequisites:  1. On your server, run `tail -f /var/log/error.log` where /var/log/error.log is the file your PHP error logs to go. 2. Set "Debug" to "Developer" (In site administration / Development / Debugging) 3. In your config.php this is NOT set:  $CFG->enable_read_only_sessions_debug = true ;  Test "core_calendar_get_action_events_by_timesort" 0. Enable block "Timeline" "My dashboard" page 1. Create a course set the start and end date so as to be in progress 2. Add an activity 3. Enroll a student (S1), and login as the new student. 4. Check no error related to "READ_ONLY_SESSION" is displayed in error.log (Before fix: a message was logged). 5. Now, set `$CFG->enable_read_only_sessions_debug = true;` in config.php 6. Log in as the student (S1) again (or just reload the page). 7. Check no error related to "READ_ONLY_SESSION" is displayed in error.log
    • 2
    • Team Hedgehog 2024 Sprint 1.4

      This has been detected by MDL-76444 (inspecting apache logs before PHP 8.3 / Moodle 4.4 release). It was called "Problem X, Y & Z" there.

      Apparently, it happens when, from the my (and others) view page, some ajax stuff or page is loaded. Here there are 3 different, but similar, stack traces:

      core_calendar_get_action_events_by_timesort (happens 1000 times per behat run, estimated)

      501894:[Fri Mar 08 18:57:05.108128 2024] [php:notice] [pid 7053] [client 172.24.0.5:40908] Script /behatrun1/lib/ajax/service.php?sesskey=8qf4DqQB2W&info=core_calendar_get_action_events_by_timesort defined READ_ONLY_SESSION but the following SESSION attributes were changed: $SESSION->isnewsessioncookie $SESSION->cachestore_session $SESSION->userpreviousip $SESSION->fullysetupstrict $SESSION->tool_mfa_authenticated $SESSION->custom_block_regions $SESSION->navcache $SESSION->calendarshoweventtype, referer: http://webserver2e5e798ccb8d055d/behatrun1/my/

      core_course_get_enrolled_courses_with_action_events_by_timeline_classification (happens 48 times per behat run, estimated)

      83280:[Fri Mar 08 18:46:48.218199 2024] [php:notice] [pid 2511] [client 172.25.0.14:33368] Script /behatrun3/lib/ajax/service.php?sesskey=a9RWfH9Cn4&info=core_course_get_enrolled_courses_with_action_events_by_timeline_classification defined READ_ONLY_SESSION but the following SESSION attributes were changed: $SESSION->isnewsessioncookie $SESSION->cachestore_session $SESSION->userpreviousip $SESSION->fullysetupstrict $SESSION->tool_mfa_authenticated $SESSION->custom_block_regions $SESSION->navcache $SESSION->calendarshoweventtype, referer: http://webserver63976c3e94796505/behatrun3/my/

      core_message_send_instant_messages (happens 13 times per behat run, estimated)

      246658:[Fri Mar 08 21:29:47.940414 2024] [php:notice] [pid 8204] [client 172.25.0.6:49878] Script /behatrun1/lib/ajax/service.php?sesskey=8inTnmrRiL&info=core_message_send_instant_messages defined READ_ONLY_SESSION but the following SESSION attributes were changed: $SESSION->isnewsessioncookie $SESSION->cachestore_session $SESSION->userpreviousip $SESSION->tool_mfa_authenticated $SESSION->fullysetupstrict $SESSION->fromdiscussion $SESSION->navcache $SESSION->flextable, referer: http://webserver63976c3e94796505/behatrun1/mod/forum/report/summary/index.php?courseid=100000&forumid=382000

      It has been detected in main (4.4dev) although it may affect to previous (stable) branches too.

            marxjohnson Mark Johnson
            stronk7 Eloy Lafuente (stronk7)
            David Woloszyn David Woloszyn
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours, 12 minutes
                2d 2h 12m

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