Last modified: 2014-07-01 01:32:08 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
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}
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.
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)
What do you have $wgScribuntoEngineConf['luastandalone']['memoryLimit'] set to?
(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?
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.
I've set it to 100 000 000 now, still the same error
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.
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
(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.
(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.
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.
For me it was an executable permission issue