Page MenuHomePhabricator

wfDiff() fails to open resource
Closed, ResolvedPublicPRODUCTION ERROR

Description

Spotted in production:

153 Not a valid stream resource in /srv/mediawiki/php-1.25wmf21/includes/GlobalFunctions.php on line 3196
153 Not a valid stream resource in /srv/mediawiki/php-1.25wmf21/includes/GlobalFunctions.php on line 3188

Happens when popen( $cmd, 'r' ); a few lines up fails to return a handle.

Event Timeline

demon raised the priority of this task from to Medium.
demon updated the task description. (Show Details)
demon subscribed.
hashar added subscribers: MaxSem, hashar.

https://gerrit.wikimedia.org/r/#/c/198785/ by @MaxSem deprecated wfDiff() in favor of DiffEngine/UnifiedDiffFormatter and also did:

        $h = popen( $cmd, 'r' );
+       if ( !$h ) {
+               unlink( $oldtextName );
+               unlink( $newtextName );
+               throw new Exception( __METHOD__ . '(): popen() failed' );
+       }

Seems to handle the case.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM