Checksum error when backing up

Checksum error when backing up

by Jonas Graham -
Number of replies: 6

Using Moodle 2.7.19.
MS SQL Server 2012
After turning on debugging messages, etc.
Getting: Fatal error: Call to a member function is_checksum_correct() on a non-object in .../backup_controller_dbops.class.php on line 109
Intermittently.  Can't quite put my finger on what exactly is causing it.
Same as: https://moodle.org/mod/forum/discuss.php?d=329772&parent=1327771
Happened more often when freetds.conf settings were wrong.  But fixed that.  Still happens once in a blue moon.
Especially on very large courses when backing up for first time.
Still seems to back up even though I got the error.

Can't find a way to reproduce 100% of the time.

Doesn't happen in courses with folders.

Anyone know what could be going on?

Average of ratings: -
In reply to Jonas Graham

Re: Checksum error when backing up

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Is that the only logged error?  Do you have deugging up all the way?

I ask because it's not a checksum error so much as it is trying to call that method on a 'broken' object. The problem that caused an invalid object to be returned (probably null or false rather than an object at all) is somewhere else. I'm hoping that a prior notice or warning might uncover that. 

In reply to Howard Miller

Re: Checksum error when backing up

by Jonas Graham -

Hi Howard,

I do have Debug messages set to DEVELOPER mode.  I was displaying debug messages.  I can't seem to get the logs to work.  I have:

 error_log = “d:\logs\php_errors.log”

in php.ini.

There is a php_errors.log file in that folder, so it must have worked before.  And everyone has Read/write access, so I don't think it's a permissions issue.  Maybe the logging does work, but I just haven't gotten any errors in a while.

If I had it set to "Display debug messages" does it only show the last message?  Or all debug messages? 

In reply to Jonas Graham

Re: Checksum error when backing up

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You need to get logging to work. Displaying messages is very hit and miss. 

If you don't have that setting in php.ini all errors will go to the web server's error log which is generally fine. 

In reply to Howard Miller

Re: Checksum error when backing up

by Jonas Graham -

Hi Howard,

I set error_log = syslog

As I understand it, it sends the logs to Event Viewer in WIndows.  But where?  What do I filter for?

In reply to Jonas Graham

Re: Checksum error when backing up

by Jonas Graham -

Hi Howard,

I got the logs working again.  I set error_log = "D:\Logs\php_errors.log"  rather than using syslog.

If anybody else was having the same problem with logs not working, I had to give full control to IUSR and IIS_IUSR on D:\Logs\ and its contents.

I haven't encountered the error again, as it's intermittent.  But I guess we'll keep an eye out...

In reply to Jonas Graham

Re: Checksum error when backing up

by Jonas Graham -

Hi,

I've seen this error again.  It seems most likely to happen right after we upgrade from 2.7.7 to 2.7.19.
We are running MS SQL and we had also recently replaced the SQLSRV driver with MSSQL (FreeTDS).

Alas, when it happened the last time, we didn't have logging turned up to debug mode, so we weren't able to capture all the details.  We were unable to reproduce the issue since.  I'll keep on keeping an eye out...