Last modified: 2014-02-26 15:45:53 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 T53886, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51886 - LuaStandalone leaks memory for functions returned to PHP
LuaStandalone leaks memory for functions returned to PHP
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-23 15:28 UTC by Brad Jorsch
Modified: 2014-02-26 15:45 UTC (History)
3 users (show)

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


Attachments

Description Brad Jorsch 2013-07-23 15:28:08 UTC
The LuaStandalone engine holds an id=>function mapping for all the functions it returns to PHP, as happens for example every time a module is invoked. The functions in this mapping are never removed, even after PHP releases all references to the functions on its end. So if a module defines a lot of functions and is invoked many times in a page, it can easily run out the memory limit and cause the interpreter to exit.

LuaSandbox doesn't have this problem, as it does properly unreference the Lua functions when the PHP object is destroyed.
Comment 1 Gerrit Notification Bot 2013-11-01 15:58:01 UTC
Change 93073 had a related patch set uploaded by Anomie:
LuaStandalone: Release functions when no longer referenced

https://gerrit.wikimedia.org/r/93073
Comment 2 Gerrit Notification Bot 2014-02-25 23:02:42 UTC
Change 93073 merged by jenkins-bot:
LuaStandalone: Release functions when no longer referenced

https://gerrit.wikimedia.org/r/93073

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


Navigation
Links