Page MenuHomePhabricator

Under HHVM: Call to a member function getGuid() on a non-object
Closed, ResolvedPublic

Description

From a HHVM job runner:

Exception from line 432 of /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/vendor/wikibase/data-model/src/Claim/Claims.php: Call to a member function getGuid() on a non-object (NULL)
Backtrace:
#0 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/vendor/wikibase/data-model/src/Entity/Entity.php(810): Wikibase\DataModel\Claim\Claims->getDiff(Wikibase\DataModel\Claim\Claims)
#1 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/lib/includes/changes/EntityChange.php(324): Wikibase\DataModel\Entity\Entity->getDiff(Wikibase\DataModel\Entity\Item)
#2 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/client/includes/ChangeHandler.php(278): Wikibase\EntityChange::newFromUpdate(string, Wikibase\DataModel\Entity\Item, Wikibase\DataModel\Entity\Item)
#3 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/client/includes/ChangeHandler.php(387): Wikibase\ChangeHandler->mergeChanges(array)
#4 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/client/includes/ChangeHandler.php(415): Wikibase\ChangeHandler->coalesceRuns(array)
#5 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/client/includes/ChangeHandler.php(466): Wikibase\ChangeHandler->coalesceChanges(array)
#6 /usr/local/apache/common-local/php-1.24wmf5/extensions/Wikidata/extensions/Wikibase/lib/includes/ChangeNotificationJob.php(128): Wikibase\ChangeHandler->handleChanges(array)
#7 /usr/local/apache/common-local/php-1.24wmf5/maintenance/runJobs.php(110): Wikibase\ChangeNotificationJob->run()
#8 /usr/local/apache/common-local/php-1.24wmf5/maintenance/doMaintenance.php(109): RunJobs->execute()
#9 /usr/local/apache/common-local/php-1.24wmf5/maintenance/runJobs.php(281): include(string)
#10 /usr/local/apache/common-local/multiversion/MWScript.php(97): include(string)
#11 {main}


Version: unspecified
Severity: major
Whiteboard: u=dev c=backend p=0

Details

Reference
bz65698

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:18 AM
bzimport set Reference to bz65698.
bzimport added a subscriber: Unknown Object (MLST).

We really need full job parameters if we're going to debug these job queue failures effectively. Even correlated runJobs.log lines would not be enough in this case, since the strings in the log lines are truncated at 1024 characters, and changeIds is usually larger than that.

I don't think this is too mysterious. Claims.php has the following code (L432-434):

assert( $oldClaim instanceof Claim );
assert( $newClaim instanceof Claim );
assert( $oldClaim->getGuid() === $newClaim->getGuid() );

The expectation was presumably that if either $oldClaim or $newClaim are null, the final assert would never get executed. That isn't the case.

I do note that HHVM and PHP have somewhat different assert settings at the moment:

PHP
~~~
option                  ini_get()               assert_options()
**********************************************************************
assert.active           "1"                     1
assert.warning          "1"                     1
assert.bail             "0"                     0
assert.quiet_eval       "0"                     0


HHVM
~~~~
option                  ini_get()               assert_options()
**********************************************************************
assert.active           ""                      0
assert.warning          ""                      0
assert.bail             ""                      0
assert.quiet_eval       ""                      false

I'll see if I can get them to match.

Was this deployed on production yet? I still see this.

(In reply to Aaron Schulz from comment #5)

Was this deployed on production yet? I still see this.

No, not yet.

Reopening since this problem still occurs on production and spams the logs. The change needs to go through the pipeline.

This needs to be checked in datamodel 0.8.2.

This doesn't appear in the last month's worth of logs.