Page MenuHomePhabricator

Fatal error "Invalid operand type" from CirrusSearch LinksUpdate
Closed, ResolvedPublic

Description

Error

Request ID: d28c6a1b7a75038c3deb029d

message
[{exception_id}] {exception_url}   PHP Fatal Error from line 210 of /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/DataSender.php: Invalid operand type was used: cannot perform this operation with arrays
stacktrace
PHP Fatal Error: Invalid operand type was used: cannot perform this operation with arrays

#0 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/DataSender.php(210): NO_FUNCTION_GIVEN()
#1 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Job/ElasticaWrite.php(126): CirrusSearch\DataSender->sendData(string, array)
#2 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Job/Job.php(99): CirrusSearch\Job\ElasticaWrite->doJob()
#3 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(226): CirrusSearch\Job\Job->run()
#4 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(84): CirrusSearch\Updater->updatePages(array, integer)
#5 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Job/LinksUpdate.php(52): CirrusSearch\Updater->updateFromTitle(Title)
#6 /srv/mediawiki/php-1.32.0-wmf.23/extensions/CirrusSearch/includes/Job/Job.php(99): CirrusSearch\Job\LinksUpdate->doJob()
#7 /srv/mediawiki/php-1.32.0-wmf.23/extensions/EventBus/includes/JobExecutor.php(64): CirrusSearch\Job\Job->run()
#8 /srv/mediawiki/rpc/RunSingleJob.php(67): JobExecutor->execute(array)

Notes

Seen several times from the new 1.32.0-wmf.23 branch from simplewikiquote. Not seen in the 30 days prior on any previous MW versions. Tentatively assuming that this is a regression.

Event Timeline

Krinkle created this task.Sep 25 2018, 7:05 PM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptSep 25 2018, 7:05 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev added a subscriber: Smalyshev.EditedSep 26 2018, 7:41 AM

May be introduced by 31aef5dcbd932624ef844b086844f25510f437ec. @Krinkle could you take a look? Looks like it was your change.

OK, looks like operator priorities there are not as intended by the code, so this:

[ 'docId' => implode( ', ', $documentIds ) ] + $exception ? [ 'exception' => $exception ] : []

Is read as this:

([ 'docId' => implode( ', ', $documentIds ) ] + $exception) ? [ 'exception' => $exception ] : []

Which means we're adding array and Exception - probably not a good idea. The fix would be to put parentheses around the conditional.

zeljkofilipin triaged this task as Unbreak Now! priority.Sep 26 2018, 8:10 AM
zeljkofilipin added a subscriber: zeljkofilipin.

Changing priority to 😱Unbreak Now!🤯 since it's blocking the train!

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptSep 26 2018, 8:10 AM
dcausse claimed this task.Sep 26 2018, 8:14 AM
dcausse moved this task from needs triage to Current work on the Discovery-Search board.

Change 462875 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Fix Fatal error "Invalid operand type" from CirrusSearch LinksUpdate

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

Change 462875 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Fix Fatal error "Invalid operand type" from CirrusSearch LinksUpdate

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

Change 463068 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@wmf/1.32.0-wmf.23] Fix Fatal error "Invalid operand type" from CirrusSearch LinksUpdate

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

Change 463068 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@wmf/1.32.0-wmf.23] Fix Fatal error "Invalid operand type" from CirrusSearch LinksUpdate

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

Mentioned in SAL (#wikimedia-operations) [2018-09-26T14:46:16Z] <reedy@deploy1001> Synchronized php-1.32.0-wmf.23/extensions/CirrusSearch/: T205473 (duration: 01m 06s)

Reedy closed this task as Resolved.Sep 26 2018, 2:46 PM
Reedy removed a project: Patch-For-Review.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM