Page MenuHomePhabricator

proc_open() - Memory allocation problem
Closed, DuplicatePublic

Description

I'm not sure what is causing this:

/srv/phan/vendor/symfony/console/Terminal.php:127 [2] proc_open(): fork failed - Cannot allocate memory
11:55:42 (Phan 1.2.6 crashed)
11:55:42 #0  phan_error_handler()
11:55:42 #1  proc_open() called at [/srv/phan/vendor/symfony/console/Terminal.php:127]
11:55:42 #2  Symfony\Component\Console\Terminal::getSttyColumns() called at [/srv/phan/vendor/symfony/console/Terminal.php:70]
11:55:42 #3  Symfony\Component\Console\Terminal::initDimensions() called at [/srv/phan/vendor/symfony/console/Terminal.php:32]
11:55:42 #4  Symfony\Component\Console\Terminal->getWidth() called at [/srv/phan/vendor/phan/phan/src/Phan/CLI.php:1405]
11:55:42 #5  Phan\CLI::progress() called at [/srv/phan/vendor/phan/phan/src/Phan/Analysis.php:347]
11:55:42 #6  Phan\Analysis::analyzeFunctions() called at [/srv/phan/vendor/phan/phan/src/Phan/Phan.php:369]
11:55:42 #7  Phan\Phan::finishAnalyzingRemainingStatements() called at [/srv/phan/vendor/phan/phan/src/Phan/Phan.php:301]
11:55:42 #8  Phan\Phan::analyzeFileList() called at [/srv/phan/vendor/phan/phan/src/phan.php:34]
11:55:42 #9  require_once(/srv/phan/vendor/phan/phan/src/phan.php) called at [/srv/phan/vendor/phan/phan/phan:2]
11:55:42 More details:
11:55:42 #1: proc_open() Args: ["stty -a | grep columns", {1:["pipe", "w"], 2:["pipe", "w"]}, null, null, null, {"suppress_errors":true}]
11:55:42 #2: Symfony\Component\Console\Terminal::getSttyColumns()
11:55:42 #3: Symfony\Component\Console\Terminal::initDimensions()
11:55:42 #4: Symfony\Component\Console\Terminal->getWidth()
11:55:42 #5: Phan\CLI::progress() Args: ["method", 0.083738587268819]
11:55:42 #6: Phan\Analysis::analyzeFunctions() Args: [Phan\CodeBase({}), null]
11:55:42 #7: Phan\Phan::finishAnalyzingRemainingStatements() Args: [Phan\CodeBase({}), null, ["includes/ApiCoreThank.php", "includes/ApiFlowThank.php", "includes/ApiThank.php", "includes/EchoCoreThanksPresentationModel.php", "includes/EchoFlowThanksPresentationModel.php", "includes/SpecialThanks.php", "includes/ThanksHooks.php", "includes/ThanksLogFormatter.php", "../../includes/ActorMigration.php", "../../includes/AjaxDispatcher.php", ... 6265 more element(s)], []]
11:55:42 #8: Phan\Phan::analyzeFileList() Args: [Phan\CodeBase({}), Closure]
11:55:42 #9: require_once() Args: ["/srv/phan/vendor/phan/phan/src/phan.php"]
11:55:44 Build step 'Execute shell' marked build as failure
11:55:44 [CHECKSTYLE] Collecting checkstyle analysis files...
11:55:44 [CHECKSTYLE] Searching for all files in /srv/jenkins-workspace/workspace/mwext-php70-phan-docker that match the pattern log/phan-issues
11:55:44 [CHECKSTYLE] No files found. Configuration error?
11:55:44 [CHECKSTYLE] Computing warning deltas based on reference build #28172
11:55:44 [CHECKSTYLE] Ignore new warnings since this is the first valid build
11:55:44 [CHECKSTYLE] Plug-in Result: Success - no threshold has been exceeded
11:55:44 [PostBuildScript] - Execution post build scripts.
11:55:44 [PostBuildScript] Build is not success : do not execute script
11:55:44 [PostBuildScript] - Execution post build scripts.
11:55:44 [mwext-php70-phan-docker] $ /bin/bash -xe /tmp/jenkins5432504544357346049.sh
11:55:44 + echo 'Clearing /srv/jenkins-workspace/workspace/mwext-php70-phan-docker/cache'
11:55:44 Clearing /srv/jenkins-workspace/workspace/mwext-php70-phan-docker/cache
11:55:44 [mwext-php70-phan-docker] $ /bin/bash /tmp/jenkins1921977901775054011.sh
11:55:44 ++ pwd
11:55:44 + exec docker run --volume /srv/jenkins-workspace/workspace/mwext-php70-phan-docker/cache:/cache --init --rm --label jenkins.job=mwext-php70-phan-docker --label jenkins.build=28173 --env-file /dev/fd/63 docker-registry.wikimedia.org/releng/castor:0.2.0 clear
11:55:44 ++ /usr/bin/env

Also, I'm not sure if it's related to the tagged extensions? Seems to be an issue with the mwext-php70-phan-docker job in the tests pipeline or Phan?

Patch(es) affected

Event Timeline

D3r1ck01 created this task.May 8 2019, 11:51 AM
Restricted Application added a project: Growth-Team. · View Herald TranscriptMay 8 2019, 11:51 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
D3r1ck01 updated the task description. (Show Details)

Not related to a specific extension, the same is happening for XAnalytics: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/XAnalytics/+/508684.
This has to do with some out of memory issues with Phan: T219114: phan 1.2.6 is OOMing on MediaWiki core.

Oh right, thanks @Mainframe98. I've removed the tags and left only Phan.