Page MenuHomePhabricator

Special:Version Broken on 1.31 with proc_open Disabled
Closed, ResolvedPublic

Description

After having performed an upgrade through git from REL1_30 -> REL1_31

Special:Version page displays the following error: https://i.imgur.com/3xIRP0j.png

[946e1245c71e1a346e6d4c15] /wiki/index.php?title=Special:Version MediaWiki\ShellDisabledError from line 88 of /var/www/html/wiki/includes/shell/Command.php: Unable to run external programs, proc_open() is disabled



Backtrace:



#0 /var/www/html/wiki/includes/shell/CommandFactory.php(105): MediaWiki\Shell\Command->__construct()

#1 /var/www/html/wiki/includes/shell/Shell.php(128): MediaWiki\Shell\CommandFactory->create()

#2 /var/www/html/wiki/includes/GitInfo.php(240): MediaWiki\Shell\Shell::command(array)

#3 /var/www/html/wiki/includes/specials/SpecialVersion.php(349): GitInfo->getHeadCommitDate()

#4 /var/www/html/wiki/includes/specials/SpecialVersion.php(303): SpecialVersion::getVersionLinkedGit()

#5 /var/www/html/wiki/includes/specials/SpecialVersion.php(228): SpecialVersion::getVersionLinked()

#6 /var/www/html/wiki/includes/specials/SpecialVersion.php(139): SpecialVersion::softwareInformation()

#7 /var/www/html/wiki/includes/specialpage/SpecialPage.php(522): SpecialVersion->execute(NULL)

#8 /var/www/html/wiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#9 /var/www/html/wiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#10 /var/www/html/wiki/includes/MediaWiki.php(861): MediaWiki->performRequest()

#11 /var/www/html/wiki/includes/MediaWiki.php(524): MediaWiki->main()

#12 /var/www/html/wiki/index.php(42): MediaWiki->run()

#13 {main}

proc_open has always been disabled for security reasons and it has never been an issue before.

Downgrading back to REL1_30 fixed Special:Version

Event Timeline

Lyrixn created this task.Jun 24 2018, 11:55 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2018, 11:55 AM
Mainframe98 added subscribers: Legoktm, Mainframe98.

Related tasks: T191947: Web installer stops if you have proc_open disabled.

I have the sneaking suspicion that something on Special:Version is attempting to call the git executable to determine the git commit of MediaWiki or a skin/extension. MediaWiki 1.31 did introduce the new Shell framework, which suggests that the new Shell framework does not correctly check if it actually can call the git executable, as per T191947.
CC'ing @Legoktm because he worked on that task.

Ah, mea culpa on this one. The main difference is that when using the new shell framework you need to check for Shell::isDisabled() manually. I'll check the other core calls as well.

Change 441741 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/core@master] GitInfo: Don't try shelling out if it's disabled

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

Legoktm claimed this task.Jun 24 2018, 8:56 PM
Legoktm added a project: MW-1.31-release.

Change 441746 had a related patch set uploaded (by Krinkle; owner: Legoktm):
[mediawiki/core@REL1_31] GitInfo: Don't try shelling out if it's disabled

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

Change 441741 merged by jenkins-bot:
[mediawiki/core@master] GitInfo: Don't try shelling out if it's disabled

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

Vvjjkkii renamed this task from Special:Version Broken on 1.31 with proc_open Disabled to aeaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii removed Legoktm as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
RazeSoldier renamed this task from aeaaaaaaaa to Special:Version Broken on 1.31 with proc_open Disabled.Jul 1 2018, 3:04 AM
RazeSoldier lowered the priority of this task from High to Normal.
RazeSoldier assigned this task to Legoktm.
RazeSoldier updated the task description. (Show Details)
RazeSoldier added subscribers: GerritBot, Aklapper.
Krinkle closed this task as Resolved.Jul 8 2018, 12:20 AM
Krinkle moved this task from Backlog to Core on the MW-1.31-release board.
Krinkle moved this task from To triage to Special:Version on the MediaWiki-Special-pages board.

Change 441746 merged by jenkins-bot:
[mediawiki/core@REL1_31] GitInfo: Don't try shelling out if it's disabled

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