https://bugzilla.wikimedia.org/show_bug.cgi?id=67870
Bug ID: 67870
Summary: PythonSingleFFS fails under HHVM
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Translate
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
It doesn't seem to be related to any memory / time limits. The output of the
script is just truncated. It works when run under php. (php below is aliased to
hhvm)
php extensions/Translate/scripts/createMessageIndex.php --memory-limit=max
[e18f17bf] [no req] Exception from line 113 of
/www/dev.translatewiki.net/w/extensions/Translate/ffs/PythonSingleFFS.php:
Failed to decode python file /resources/projects/pywikibot/add_text.py
Backtrace:
#0
/www/dev.translatewiki.net/w/extensions/Translate/ffs/PythonSingleFFS.php(86):
PythonSingleFFS->parseFile()
#1
/www/dev.translatewiki.net/w/extensions/Translate/messagegroups/FileBasedMessageGroup.php(52):
PythonSingleFFS->read(string)
#2
/www/dev.translatewiki.net/w/extensions/Translate/messagegroups/MessageGroupBase.php(81):
FileBasedMessageGroup->load(string)
#3
/www/dev.translatewiki.net/w/extensions/Translate/messagegroups/MessageGroupBase.php(183):
MessageGroupBase->getDefinitions()
#4
/www/dev.translatewiki.net/w/extensions/Translate/utils/MessageIndex.php(186):
MessageGroupBase->getKeys()
#5
/www/dev.translatewiki.net/w/extensions/Translate/utils/MessageIndex.php(119):
MessageIndex->checkAndAdd(array, FileBasedMessageGroup)
#6
/www/dev.translatewiki.net/w/extensions/Translate/scripts/createMessageIndex.php(31):
MessageIndex->rebuild()
#7 /www/dev.translatewiki.net/w/maintenance/doMaintenance.php(109):
CreateMessageIndex->execute()
#8
/www/dev.translatewiki.net/w/extensions/Translate/scripts/createMessageIndex.php(36):
include(string)
#9 {main}
The relevant code:
$command = wfEscapeShellArg( "import json; execfile(\"$filename\"); " .
"print json.dumps(msg)" );
$json = wfShellExec( "python -c $command" );
$parsed = FormatJson::decode( $json, true );
if ( !is_array( $parsed ) ) {
throw new MWException( "Failed to decode python file $filename" );
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l