Page MenuHomePhabricator

Invalid timestamp/Failed asserting that $timestamp1 is identical to $timestamp2
Closed, ResolvedPublic

Description

Seen on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OAuth/+/645477/ on https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php73-noselenium-docker/16755/console

18:44:15 There was 1 error:
18:44:15 
18:44:15 1) MediaWiki\Extensions\OAuth\Tests\Entity\ClientEntityTest::testProperties
18:44:15 Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 922337203714834635
18:44:15 
18:44:15 /workspace/src/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php:240
18:44:15 /workspace/src/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php:165
18:44:15 /workspace/src/includes/libs/rdbms/database/Database.php:4753
18:44:15 /workspace/src/includes/libs/rdbms/database/Database.php:5385
18:44:15 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:68
18:44:15 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:735
18:44:15 /workspace/src/extensions/OAuth/src/Repository/AccessTokenRepository.php:154
18:44:15 /workspace/src/extensions/OAuth/src/Repository/AccessTokenRepository.php:66
18:44:15 /workspace/src/extensions/OAuth/src/Entity/ClientEntity.php:188
18:44:15 /workspace/src/extensions/OAuth/tests/phpunit/Entity/ClientEntityTest.php:81
18:44:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18:44:15 /workspace/src/maintenance/doMaintenance.php:106
18:44:15 === Logs generated by test case
18:44:15 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
18:44:15 [CentralAuthVerbose] [info] Loading state for global user {user} from DB {"user":"TestUser b0c4f2.023","private":false}
18:44:15 [CentralAuthVerbose] [info] Loading attached wiki list for global user TestUser b0c4f2.023 from DB {"private":false}
18:44:15 [CentralAuthVerbose] [info] Loading groups for global user {user} {"user":"TestUser b0c4f2.023","private":false}
18:44:15 [objectcache] [debug] fetchOrRegenerate(global:centralauth-user:51c9d18e56cacf39fda6eba47f796499): miss, new value computed []
18:44:15 [CentralAuthVerbose] [info] Loading CentralAuthUser for user {user} from cache object {"user":"TestUser b0c4f2.023","private":false}
18:44:15 ===
18:44:15 
18:44:15 --
18:44:15 
18:44:15 There were 4 failures:
18:44:15 
18:44:15 1) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetGrantExpirationInterval with data set #1 (false, 9223371259704000000)
18:44:15 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
18:44:15 
18:44:15 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:144
18:44:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18:44:15 /workspace/src/maintenance/doMaintenance.php:106
18:44:15 === Logs generated by test case
18:44:15 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 ===
18:44:15 
18:44:15 2) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetGrantExpirationInterval with data set #2 ('infinity', 9223371259704000000)
18:44:15 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
18:44:15 
18:44:15 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:144
18:44:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18:44:15 /workspace/src/maintenance/doMaintenance.php:106
18:44:15 === Logs generated by test case
18:44:15 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 ===
18:44:15 
18:44:15 3) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetRefreshTokenTTL with data set #1 (false, 9223371259704000000)
18:44:15 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
18:44:15 
18:44:15 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:171
18:44:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18:44:15 /workspace/src/maintenance/doMaintenance.php:106
18:44:15 === Logs generated by test case
18:44:15 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 ===
18:44:15 
18:44:15 4) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetRefreshTokenTTL with data set #2 ('infinity', 9223371259704000000)
18:44:15 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
18:44:15 
18:44:15 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:171
18:44:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
18:44:15 /workspace/src/maintenance/doMaintenance.php:106
18:44:15 === Logs generated by test case
18:44:15 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 [localisation] [debug] LocalisationCache using store LCStoreNull []
18:44:15 ===

Event Timeline

Only fails on PHP 7.3 and 7.4?

Reedy triaged this task as High priority.Dec 5 2020, 11:58 PM
Reedy added a project: Platform Engineering.

And passes locally on PHP 7.4...

With a no-op patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OAuth/+/645360 / https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php73-noselenium-docker/16815/console it also fails

Marking high, tagging Platform... But it might be a Release-Engineering-Team and related to recent image bumps...

23:56:46 There was 1 error:
23:56:46 
23:56:46 1) MediaWiki\Extensions\OAuth\Tests\Entity\ClientEntityTest::testProperties
23:56:46 Wikimedia\Timestamp\TimestampException: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 922337203714853385
23:56:46 
23:56:46 /workspace/src/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php:240
23:56:46 /workspace/src/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php:165
23:56:46 /workspace/src/includes/libs/rdbms/database/Database.php:4753
23:56:46 /workspace/src/includes/libs/rdbms/database/Database.php:5385
23:56:46 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:68
23:56:46 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:735
23:56:46 /workspace/src/extensions/OAuth/src/Repository/AccessTokenRepository.php:154
23:56:46 /workspace/src/extensions/OAuth/src/Repository/AccessTokenRepository.php:66
23:56:46 /workspace/src/extensions/OAuth/src/Entity/ClientEntity.php:188
23:56:46 /workspace/src/extensions/OAuth/tests/phpunit/Entity/ClientEntityTest.php:81
23:56:46 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
23:56:46 /workspace/src/maintenance/doMaintenance.php:106
23:56:46 === Logs generated by test case
23:56:46 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23:56:46 [CentralAuthVerbose] [info] Loading state for global user {user} from DB {"user":"TestUser c3c792.023","private":false}
23:56:46 [CentralAuthVerbose] [info] Loading attached wiki list for global user TestUser c3c792.023 from DB {"private":false}
23:56:46 [CentralAuthVerbose] [info] Loading groups for global user {user} {"user":"TestUser c3c792.023","private":false}
23:56:46 [objectcache] [debug] fetchOrRegenerate(global:centralauth-user:b618c854adbdc52abccb85da1634757f): miss, new value computed []
23:56:46 [CentralAuthVerbose] [info] Loading CentralAuthUser for user {user} from cache object {"user":"TestUser c3c792.023","private":false}
23:56:46 ===
23:56:46 
23:56:46 --
23:56:46 
23:56:46 There were 4 failures:
23:56:46 
23:56:46 1) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetGrantExpirationInterval with data set #1 (false, 9223371259704000000)
23:56:46 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
23:56:46 
23:56:46 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:144
23:56:46 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
23:56:46 /workspace/src/maintenance/doMaintenance.php:106
23:56:46 === Logs generated by test case
23:56:46 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 ===
23:56:46 
23:56:46 2) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetGrantExpirationInterval with data set #2 ('infinity', 9223371259704000000)
23:56:46 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
23:56:46 
23:56:46 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:144
23:56:46 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
23:56:46 /workspace/src/maintenance/doMaintenance.php:106
23:56:46 === Logs generated by test case
23:56:46 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 ===
23:56:46 
23:56:46 3) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetRefreshTokenTTL with data set #1 (false, 9223371259704000000)
23:56:46 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
23:56:46 
23:56:46 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:171
23:56:46 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
23:56:46 /workspace/src/maintenance/doMaintenance.php:106
23:56:46 === Logs generated by test case
23:56:46 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 ===
23:56:46 
23:56:46 4) MediaWiki\Extensions\OAuth\Tests\AuthorizationProviderTest::testGetRefreshTokenTTL with data set #2 ('infinity', 9223371259704000000)
23:56:46 Failed asserting that 922337203685477580 is identical to 9223371259704000000.
23:56:46 
23:56:46 /workspace/src/extensions/OAuth/tests/phpunit/AuthorizationProviderTest.php:171
23:56:46 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
23:56:46 /workspace/src/maintenance/doMaintenance.php:106
23:56:46 === Logs generated by test case
23:56:46 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 [localisation] [debug] LocalisationCache using store LCStoreNull []
23:56:46 ===

Setting the expiry to be 292 billion years in the future so that no 64-bit timestamp can ever be larger than it is an idea that is maybe so smart that it overflows and becomes stupid again.

https://3v4l.org/SseNm

Output for 7.3.23 - 7.3.25, 7.4.11 - 7.4.13, 8.0.0

922337203685477580

Output for 7.3.0 - 7.3.22, 7.4.0 - 7.4.10

9223371259704000000

Change 647447 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/extensions/OAuth@master] AuthorizationProvider: don't use expiration dates that are so large that they break PHP 7.3.23+

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

Change 647447 merged by jenkins-bot:
[mediawiki/extensions/OAuth@master] AuthorizationProvider: don't use expiration dates that are so large that they break PHP 7.3.23+

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

Reedy assigned this task to tstarling.

Change 647926 had a related patch set uploaded (by Reedy; owner: Tim Starling):
[mediawiki/extensions/OAuth@REL1_35] AuthorizationProvider: don't use expiration dates that are so large that they break PHP 7.3.23+

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

Change 647926 merged by jenkins-bot:
[mediawiki/extensions/OAuth@REL1_35] AuthorizationProvider: don't use expiration dates that are so large that they break PHP 7.3.23+

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