Last modified: 2013-06-21 08:33:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51870, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49870 - Fatal memory allocation error when using the parameter $article of the hook ArticlePageDataAfter on servers with little memory
Fatal memory allocation error when using the parameter $article of the hook A...
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.22.0
Other Linux
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 12:27 UTC by nanninga
Modified: 2013-06-21 08:33 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description nanninga 2013-06-20 12:27:41 UTC
In LocalSettings, without any extensions, put this:

$wgHooks[ 'ArticlePageDataAfter' ][] = 'onArticlePageDataAfter';

function onArticlePageDataAfter( $article, $row ) {

    // get_class($article) => 'WikiPage'

    $text = $article->getRawText();

    echo $text;
    die();
}

This fails with "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in [...]"

Granted, that's only 128 MB of RAM which is below the minimum hardware requirements.

I think the reason might be that at this point the WikiPage object may not be fully initialized. In later hooks the method works fine.
Comment 1 nanninga 2013-06-20 12:42:16 UTC
It seems to be in fact an infinite loop.
Comment 2 Andre Klapper 2013-06-21 01:43:07 UTC
> in [...]"

In where? :)

Which exact MediaWiki version is this about?
Comment 3 nanninga 2013-06-21 08:33:34 UTC
(In reply to comment #2)
> > in [...]"
> 
> In where? :)

I put [...] because that is pretty random. The process can run out of memory at any point, depending on a variety of factors.

> 
> Which exact MediaWiki version is this about?

1.22alpha (a232f4e) (https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;h=a232f4ee33a9ed6dee6b5e9790c2158ea945c1dd)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links