Issue Details (XML | Word | Printable)

Key: MDL-12009
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Martin Dougiamas
Reporter: Mike Street
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

"Fatal Error: Possible Integer Overflow..." during Moodle cronjob of forum posts and course backups

Created: 03/Nov/07 12:43 AM   Updated: 29/May/08 09:15 AM
Component/s: Backup, Forum
Affects Version/s: 1.6.2
Fix Version/s: None

Issue Links:
Dependency
 

Database: MySQL
Participants: Dan Marsden, Martin Dougiamas and Mike Street
Security Level: None
Affected Branches: MOODLE_16_STABLE


 Description  « Hide
Seems that large forum posts are causing the forum_cron cronjob to abort, with the above message. Unfortunately, it is also happening during the course backups through the cronjob. So far, files such as:

mode/forum/lib.php
datalib.php
moodlelib.php
backuplib.php

all crash with the "possible integer overlow" error.

The forum posts can go out to as many as 3800 people before crashing. However, it needs to go to 14K people.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mike Street added a comment - 05/Nov/07 11:59 PM
Here's an example of the error:

"Fatal error: Possible integer overflow in memory allocation (8 * 8 +0) in /var/www/moodle/lib/datalib.php on line 779"

I've added a memory_get_usage() before all the common points in the file where is breaks. It usually spits out a value in and around 48 MB. Never higher than that though, even though we have allocated 512 MB to both cli and web php scripts.

Our cronjob is set to run every 15 mins, in order to lighten the load of what it has to process.

For backups, it'll check and every 30 mins it will start to attempt to backup the courses again. It will eventually hit one (never the same course), and then spit out pages and pages of blank lines, followed by pages of periods (one per line), then a <br/> tag, more periods, and then the "Fatal error". Course size does not seem to matter, nor content. Our settings are set to backup up everything.

For forum posts, it will die at about the same memory usage (48 MB). I have seen it successful process posts of up to 3800 students before dying.

Also, many of the lines where it crashes are 'preg_replace' or similar. Usually something to do with an array of objects.

Here's some more details of our setup:

Moodle 1.6.3 (2006050530)

Mysql server version: 5.0.22-Debian_0ubuntu6.06.2

OS: Debian_0ubuntu6.06.2

PHP version: 5.1.2

First line of mod/forum/lib.php

<?php // $Id: lib.php,v 1.437.2.10 2006/10/10 05:15:10 vyshane Exp $

------

First line of backup/backuplib.php:

<?php //$Id: backuplib.php,v 1.107.2.5 2006/08/21 20:38:44 skodak Exp $

--------
First line of lib/datalib.php:

<?php // $Id: datalib.php,v 1.298.2.11 2006/10/08 19:44:34 skodak Exp $

--------


Dan Marsden added a comment - 29/May/08 09:15 AM
Hi Mike,

have you tried this with later versions of moodle? - is this still an issue?

thanks,

Dan