Last modified: 2014-07-01 01:32:08 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 T50877, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48877 - Lua error, interpreter exited with status 2.
Lua error, interpreter exited with status 2.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 01:59 UTC by Mark Redekop
Modified: 2014-07-01 01:32 UTC (History)
5 users (show)

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


Attachments

Description Mark Redekop 2013-05-28 01:59:29 UTC
I'm running 1.21 and the latest version of scribunto, whenever I try to create a lua module I get this error:

Lua error: Internal error: The interpreter exited with status 2.

If i check the box to ignore code errors the page will save, then when i try to invoke the module I get the same error with this back trace: 

http://dpaste.de/h8Srp/

I've logged in with the command line and lua is installed outside of the extension (version 5.1.4) and it's functional
Comment 1 Andre Klapper 2013-05-28 13:24:03 UTC
Thanks for reporting this!

(In reply to comment #0)
> I'm running 1.21 and the latest version of scribunto

That means Scribunto from git master?

> whenever I try to create a lua module

A minimal testcase (if possible) might be welcome, to make it easier to reproduce.

(In reply to comment #0)
> invoke the module I get the same error with this back trace: 
> http://dpaste.de/h8Srp/

Pasting it here so it does not get lost:

Lua error: Internal error: The interpreter exited with status 2.
Backtrace:
#0 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(448): ScribuntoEngineBase->newException('scribunto-luast...', Array)
#1 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(318): Scribunto_LuaStandaloneInterpreter->checkStatus()
#2 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(281): Scribunto_LuaStandaloneInterpreter->receiveMessage()
#3 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(213): Scribunto_LuaStandaloneInterpreter->dispatch(Array)
#4 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(112): Scribunto_LuaStandaloneInterpreter->registerLibrary('mw_interface', Array)
#5 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(87): Scribunto_LuaEngine->registerInterface('mw.lua', Array, Array)
#6 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(8): Scribunto_LuaEngine->load()
#7 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(156): Scribunto_LuaStandaloneEngine->load()
#8 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(514): Scribunto_LuaEngine->getInterpreter()
#9 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(498): Scribunto_LuaModule->getInitChunk()
#10 /home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(526): Scribunto_LuaModule->execute()
#11 /home/aiowiki/aiowiki/w/extensions/Scribunto/common/Hooks.php(96): Scribunto_LuaModule->invoke('hello', Object(PPTemplateFrame_DOM))
#12 [internal function]: ScribuntoHooks::invokeHook(Object(Parser), Object(PPFrame_DOM), Array)
#13 /home/aiowiki/aiowiki/w/includes/parser/Parser.php(3532): call_user_func_array('ScribuntoHooks:...', Array)
#14 /home/aiowiki/aiowiki/w/includes/parser/Parser.php(3251): Parser->callParserFunction(Object(PPFrame_DOM), '#invoke', Array)
#15 /home/aiowiki/aiowiki/w/includes/parser/Preprocessor_DOM.php(1077): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#16 /home/aiowiki/aiowiki/w/includes/parser/Parser.php(3073): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#17 /home/aiowiki/aiowiki/w/includes/parser/Parser.php(1153): Parser->replaceVariables('{{#invoke:Fooba...')
#18 /home/aiowiki/aiowiki/w/includes/parser/Parser.php(383): Parser->internalParse('{{#invoke:Fooba...')
#19 /home/aiowiki/aiowiki/w/includes/content/WikitextContent.php(299): Parser->parse('{{#invoke:Fooba...', Object(Title), Object(ParserOptions), true, true, NULL)
#20 /home/aiowiki/aiowiki/w/includes/WikiPage.php(1994): WikitextContent->getParserOutput(Object(Title), NULL, Object(ParserOptions))
#21 /home/aiowiki/aiowiki/w/includes/WikiPage.php(1689): WikiPage->prepareContentForEdit(Object(WikitextContent), NULL, Object(User), 'text/x-wiki')
#22 [internal function]: WikiPage->doEditContent(Object(WikitextContent), '', 97, false, NULL, 'text/x-wiki')
#23 /home/aiowiki/aiowiki/w/includes/Article.php(1951): call_user_func_array(Array, Array)
#24 /home/aiowiki/aiowiki/w/includes/EditPage.php(1708): Article->__call('doEditContent', Array)
#25 /home/aiowiki/aiowiki/w/includes/EditPage.php(1708): Article->doEditContent(Object(WikitextContent), '', 97, false, NULL, 'text/x-wiki')
#26 /home/aiowiki/aiowiki/w/includes/EditPage.php(1187): EditPage->internalAttemptSave(Array, false)
#27 /home/aiowiki/aiowiki/w/includes/EditPage.php(416): EditPage->attemptSave()
#28 /home/aiowiki/aiowiki/w/includes/actions/EditAction.php(59): EditPage->edit()
#29 /home/aiowiki/aiowiki/w/includes/actions/EditAction.php(86): EditAction->show()
#30 /home/aiowiki/aiowiki/w/includes/Wiki.php(439): SubmitAction->show()
#31 /home/aiowiki/aiowiki/w/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#32 /home/aiowiki/aiowiki/w/includes/Wiki.php(565): MediaWiki->performRequest()
#33 /home/aiowiki/aiowiki/w/includes/Wiki.php(458): MediaWiki->main()
#34 /home/aiowiki/aiowiki/w/index.php(59): MediaWiki->run()
#35 {main}
Comment 2 Brad Jorsch 2013-05-28 14:45:52 UTC
Please set $wgScribuntoEngineConf['luastandalone']['errorFile'] to an appropriate path, and see if anything useful is logged to that file.

Unfortunately, when something makes the standalone Lua interpreter die, it's very difficult to reliably get any information as to why it died back into Scribunto for a more useful error message.
Comment 3 Mark Redekop 2013-05-28 23:50:05 UTC
Yes I'm running Scribunto from git Master, 

I'm just trying to run the hello world example from the lua reference manual, here it is:

local p = {}

function p.hello( frame )
    return "Hello, world!"
end

return p


here's the contents of the error log after trying to save that page:

/home/aiowiki/aiowiki/w/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: xrealloc: ../bash/subst.c:658: cannot allocate 256 bytes (49152 bytes allocated)
Comment 4 Brad Jorsch 2013-05-29 00:58:33 UTC
What do you have $wgScribuntoEngineConf['luastandalone']['memoryLimit'] set to?
Comment 5 Mark Redekop 2013-05-29 05:01:49 UTC
(In reply to comment #4)
> What do you have $wgScribuntoEngineConf['luastandalone']['memoryLimit'] set
> to?

Originally I didn't have it set to anything, then I tried setting it to both 100 000 ad 1 000 000 and got the same error in the log. what's a reasonable value for it?
Comment 6 Brad Jorsch 2013-05-29 13:48:01 UTC
If you didn't have it set to anything, then the default should have been 52428800. Your error message looks like it was set somewhere around 50000.
Comment 7 Mark Redekop 2013-05-30 00:00:18 UTC
I've set it to 100 000 000 now, still the same error
Comment 8 Brad Jorsch 2013-05-30 13:36:41 UTC
That's not making a whole lot of sense. Could you add this line at about line 3 of the file engines/LuaStandalone/lua_ulimit.sh in the Scribunto extension?

 echo "DEBUG: 1=$1 2=$2 3=$3 4=$4" >&2

Then let's see what that outputs to that log file.
Comment 9 Mark Redekop 2013-05-30 23:47:11 UTC
Thanks that helped, log reported that permission was denied, so I checked the permissions of the binary and the execute bit was off, I turned it on and everything seems fully functional now
Comment 10 MZMcBride 2013-05-31 00:37:48 UTC
(In reply to comment #9)
> Thanks that helped, log reported that permission was denied, so I checked the
> permissions of the binary and the execute bit was off, I turned it on and
> everything seems fully functional now

Sweet! \o/

I'm not sure if there's a way to cleanly catch this error or if we should just update the relevant documentation.
Comment 11 Brad Jorsch 2013-05-31 16:05:57 UTC
(In reply to comment #10)
> 
> I'm not sure if there's a way to cleanly catch this error or if we should
> just
> update the relevant documentation.

There isn't any good way to catch it, I tried a few weeks ago but everything ran into the possibility of protocol deadlock.

But please do update the documentation.
Comment 12 Danny 2014-05-28 17:19:26 UTC
It's not 100% clear to me what the resolution to the problem was.  If it was an executable permission why would you get the memory errors?  Anyway, I had the same problem and changing memoryLimit from the default 52428800 to 104857600 solved it.
Comment 13 Mark Redekop 2014-07-01 01:32:08 UTC
For me it was an executable permission issue

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


Navigation
Links