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

"The session partition is full.": false positive

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 2.5.3, 2.6
    • Fix Version/s: 2.4.8, 2.5.4, 2.6.1
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      (difficulty: easy, requires server administrator access to the server)

      1. Change the PHP configuration under which your Moodle instances are running by disabling disk_free_space() e.g. by adding this line in your php.ini file:
        disable_functions = disk_free_space
      2. Double check that you've enough free disk space (some MBs) where $CFG->dataroot/sessions/ is hosted;
      3. Point your browser to the Moodle instance: no exception 1 will be thrown and you'll be able to access to its functionalities.

      1 The exception is The session partition is full. It is not possible to login at this time..

      Show
      (difficulty: easy, requires server administrator access to the server) Change the PHP configuration under which your Moodle instances are running by disabling disk_free_space() e.g. by adding this line in your php.ini file: disable_functions = disk_free_space Double check that you've enough free disk space (some MBs) where $CFG->dataroot/sessions/ is hosted; Point your browser to the Moodle instance: no exception 1 will be thrown and you'll be able to access to its functionalities. 1 The exception is The session partition is full. It is not possible to login at this time. .
    • Workaround:
      Hide

      Disable file based sessions by moving to database based sessions.

      Show
      Disable file based sessions by moving to database based sessions.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull 2.6 Branch:
      m26_MDL-43039_SessionDiskFull_False_Positive
    • Pull Master Branch:
      m27_MDL-43039_SessionDiskFull_False_Positive

      Description

      disk_free_space() returns null when the function is disabled (disable_functions = disk_free_space).

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            matteo Matteo Scaramuccia added a comment -

            I've read about that error first in the Italian forum and when I read about it again, https://moodle.org/mod/forum/discuss.php?d=244393, I've finally realized the potential issue here when Moodle is installed in shared environments.

            Being 2.6 configured by default to use file based sessions, this issue could impact a large number of installations under a shared hosting.

            Show
            matteo Matteo Scaramuccia added a comment - I've read about that error first in the Italian forum and when I read about it again, https://moodle.org/mod/forum/discuss.php?d=244393 , I've finally realized the potential issue here when Moodle is installed in shared environments. Being 2.6 configured by default to use file based sessions, this issue could impact a large number of installations under a shared hosting.
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi Petr,
            could you review this PR?

            TIA,
            Matteo

            Show
            matteo Matteo Scaramuccia added a comment - Hi Petr, could you review this PR? TIA, Matteo
            Hide
            skodak Petr Skoda added a comment -

            I still believe that disabling random functions in php is stupid, but anyway if this solves it +1.

            Just one issue, since we switch to git I do not think it is recommended to put MDL numbers directly into comments. Please ask one of the integrators.

            Show
            skodak Petr Skoda added a comment - I still believe that disabling random functions in php is stupid, but anyway if this solves it +1. Just one issue, since we switch to git I do not think it is recommended to put MDL numbers directly into comments. Please ask one of the integrators.
            Hide
            matteo Matteo Scaramuccia added a comment -

            Added Marina, based on the iTeam setup as found in http://moodle.com/hq/team/.
            @Marina: what do you think about Petr's comment? Generally speaking I agree with him but in this case there is already a mention of a MDL issue there in the code but referring to false whilst here we're talking about null. Should I remove my inline comment from the PR?

            TIA,
            Matteo

            Show
            matteo Matteo Scaramuccia added a comment - Added Marina, based on the iTeam setup as found in http://moodle.com/hq/team/ . @Marina: what do you think about Petr's comment? Generally speaking I agree with him but in this case there is already a mention of a MDL issue there in the code but referring to false whilst here we're talking about null . Should I remove my inline comment from the PR? TIA, Matteo
            Hide
            marina Marina Glancy added a comment -

            There is no strict policy about including MDL number in the code. Usually developers don't specify it. But imho it's all right to leave it in this case.
            I am linking to MDL-19222 anyway. Although I agree with Petr that disabling particular functions is not a good idea but it's not something that we can influence.
            Thanks for fixing this Matteo.

            Show
            marina Marina Glancy added a comment - There is no strict policy about including MDL number in the code. Usually developers don't specify it. But imho it's all right to leave it in this case. I am linking to MDL-19222 anyway. Although I agree with Petr that disabling particular functions is not a good idea but it's not something that we can influence. Thanks for fixing this Matteo.
            Hide
            matteo Matteo Scaramuccia added a comment - - edited

            Rebased while waiting for a feedback about the inline comment used in the PR Oops, missed to read Marina's comment .

            Show
            matteo Matteo Scaramuccia added a comment - - edited Rebased while waiting for a feedback about the inline comment used in the PR Oops, missed to read Marina's comment .
            Hide
            damyon Damyon Wiese added a comment -

            Thanks Matteo,

            While I think it's odd to code around disabled functions - this obviously came up somewhere and doesn't seem to hurt.

            Integrated to 24, 25, 26 and master.

            Cheers - Damyon

            Show
            damyon Damyon Wiese added a comment - Thanks Matteo, While I think it's odd to code around disabled functions - this obviously came up somewhere and doesn't seem to hurt. Integrated to 24, 25, 26 and master. Cheers - Damyon
            Hide
            dmonllao David Monllaó added a comment -

            It passes. No exception thrown. Checked in 24, 25 and master.

            Show
            dmonllao David Monllaó added a comment - It passes. No exception thrown. Checked in 24, 25 and master.
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks for your contributions, this change is now upstream!

            “ If debugging is the process of removing software bugs, then programming must be the process of putting them in. ” - Edsger Dijkstra

            Show
            poltawski Dan Poltawski added a comment - Thanks for your contributions, this change is now upstream! “ If debugging is the process of removing software bugs, then programming must be the process of putting them in. ” - Edsger Dijkstra

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14