Moodle
  1. Moodle
  2. MDL-35066

import / backup / restore problems when using wincache 1.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Not a bug
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      windows, IIS
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1. enable wincache
      2. backup, restore or import a course
      3. get these errors.

      now, disable File Cache.
      the cannot_empty_backup_temp_dir problem is resolved.

      but while trying to import a course, you get "cannot_finish_ui_if_not_setting_ui"

      Show
      1. enable wincache 2. backup, restore or import a course 3. get these errors. now, disable File Cache. the cannot_empty_backup_temp_dir problem is resolved. but while trying to import a course, you get "cannot_finish_ui_if_not_setting_ui"
    • Affected Branches:
      MOODLE_23_STABLE
    • Rank:
      43685

      Description

      while using wincache 1.2, if i try to restore, backup or import a course i get
      cannot_finish_ui_if_not_setting_ui
      and
      cannot_empty_backup_temp_dir.

      the "cannot_empty_backup_temp_dir" problem was resolved by disabling "File Cache" on wincache.

      but i cant seem to get rid of "cannot_finish_ui_if_not_setting_ui"

      Win 2008 R2, IIS 7.5, WinCache 1.2, MySQL 5.5

        Activity

        Hide
        omer added a comment -

        not quite sure if this should be a moodle bug, or a wincache bug

        Show
        omer added a comment - not quite sure if this should be a moodle bug, or a wincache bug
        Hide
        Michael de Raadt added a comment -

        You could try disabling Wincache and see what the effect is.

        Wincache is not supported, as far as I can tell, so we might not be able to help you.

        Let me know if you have made any progress.

        Show
        Michael de Raadt added a comment - You could try disabling Wincache and see what the effect is. Wincache is not supported, as far as I can tell, so we might not be able to help you. Let me know if you have made any progress.
        Hide
        omer added a comment -

        obviously, when i disable winCache everything is fine.

        are there any php accelerators for windows that are supported ?

        Thanks
        Omer

        Show
        omer added a comment - obviously, when i disable winCache everything is fine. are there any php accelerators for windows that are supported ? Thanks Omer
        Hide
        omer added a comment -

        there may be a way around this.

        WinCache has a filter for file names not to cache.

        Michael, do you maybe have a list of files that i shouldnt cache ? may some kind of "rule" (mind my english)
        such as:

        • all files like "moodle_backup_*.php"
          or
        • all files under /moodle/admin/......

        anything ?

        Thanks again
        Omer

        Show
        omer added a comment - there may be a way around this. WinCache has a filter for file names not to cache. Michael, do you maybe have a list of files that i shouldnt cache ? may some kind of "rule" (mind my english) such as: all files like "moodle_backup_*.php" or all files under /moodle/admin/...... anything ? Thanks again Omer
        Hide
        Michael de Raadt added a comment -

        That question exceeds my knowledge, but I will refer this to someone who might be able to help.

        In general, this is more of a support request and should go to the forums.

        Show
        Michael de Raadt added a comment - That question exceeds my knowledge, but I will refer this to someone who might be able to help. In general, this is more of a support request and should go to the forums.
        Hide
        Sam Hemelryk added a comment -

        Hi Omer,

        I've just been having a quick look at this now (Michael pointed me towards it).

        I don't have any experience with WinCache and thus am not going to be able to be much help here, but this is how I see things at the moment.
        Given WinCache appears to operate as a Opcode cache when not used explicitly I would assume it should interact with PHP transparently. As you've already tested and found things work fine when it is disabled it sounds like this may in fact be an issue with WinCache.

        Unfortunately I can't think of anyone at HQ who may have experience with WinCache, and this is the first murmur I've heard of in regards to issues with it.
        I think your best bet may be at this point to post in the Moodle forums if you haven't already and see if you can attract the attention of anyone who is familiar enough with WinCache to be able to help you. (I found your comment in the WinCache forums, perhaps worth creating a separate thread there for this issue?)
        I'm sure if it is an issue with WinCache that they would like to know about it, but Moodle being what it is I'm sure it'd be a good idea to try to isolate the issue further if you can (although I myself can't think how).

        If you are able to exclude a directory from WinCache then you could try excluding the entire backup directory, I don't imagine that is one you will be hitting often anyway. However I have no idea the implications that may have and can't promise anything about it.
        Personally if you do go down that path I would have a very good test of the rest of the system as it would just be avoiding the issue rather than fixing it and there may be other similar issues.

        Please keep us up to date on any progress you make here, and certainly let us know if you do pin it back down to a Moodle issue.

        Many thanks
        Sam

        Show
        Sam Hemelryk added a comment - Hi Omer, I've just been having a quick look at this now (Michael pointed me towards it). I don't have any experience with WinCache and thus am not going to be able to be much help here, but this is how I see things at the moment. Given WinCache appears to operate as a Opcode cache when not used explicitly I would assume it should interact with PHP transparently. As you've already tested and found things work fine when it is disabled it sounds like this may in fact be an issue with WinCache. Unfortunately I can't think of anyone at HQ who may have experience with WinCache, and this is the first murmur I've heard of in regards to issues with it. I think your best bet may be at this point to post in the Moodle forums if you haven't already and see if you can attract the attention of anyone who is familiar enough with WinCache to be able to help you. (I found your comment in the WinCache forums, perhaps worth creating a separate thread there for this issue?) I'm sure if it is an issue with WinCache that they would like to know about it, but Moodle being what it is I'm sure it'd be a good idea to try to isolate the issue further if you can (although I myself can't think how). If you are able to exclude a directory from WinCache then you could try excluding the entire backup directory, I don't imagine that is one you will be hitting often anyway. However I have no idea the implications that may have and can't promise anything about it. Personally if you do go down that path I would have a very good test of the rest of the system as it would just be avoiding the issue rather than fixing it and there may be other similar issues. Please keep us up to date on any progress you make here, and certainly let us know if you do pin it back down to a Moodle issue. Many thanks Sam
        Hide
        Michael de Raadt added a comment -

        I hope Sam's advice is helpful to you.

        If you have further questions, you might try raising them on the forums.

        I'm going to close this issue now, but if you discover specific issues with Moodle through your work, please raise them as issues.

        Show
        Michael de Raadt added a comment - I hope Sam's advice is helpful to you. If you have further questions, you might try raising them on the forums. I'm going to close this issue now, but if you discover specific issues with Moodle through your work, please raise them as issues.
        Hide
        omer added a comment -

        Found it !

        Here it goes: https://forums.iis.net/t/1183946.aspx

        the latest Version (1.2.1208 - 1.2.1209) of wincache has a bug whcih causes memory corruption, here: https://bugs.php.net/bug.php?id=60743

        I downgraded to wincache 1.2.614, and it sovled it !!

        id'e appriciate if you put a refferance to on moodle-docs "how to install moodle on windows", (right after the recommendation to install wincache).
        if i had known about it earlier it would have saved me a few days of work.

        Omer

        Show
        omer added a comment - Found it ! Here it goes: https://forums.iis.net/t/1183946.aspx the latest Version (1.2.1208 - 1.2.1209) of wincache has a bug whcih causes memory corruption, here: https://bugs.php.net/bug.php?id=60743 I downgraded to wincache 1.2.614, and it sovled it !! id'e appriciate if you put a refferance to on moodle-docs "how to install moodle on windows", (right after the recommendation to install wincache). if i had known about it earlier it would have saved me a few days of work. Omer
        Hide
        Michael de Raadt added a comment -

        Hi, Omer.

        It sounds like you are in the best position to make that Docs change. You are free to edit those pages.

        Show
        Michael de Raadt added a comment - Hi, Omer. It sounds like you are in the best position to make that Docs change. You are free to edit those pages.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: