Page MenuHomePhabricator

WikiPage::getLastPurgeTimestamp() returning an array
Closed, ResolvedPublic

Description

	/**
	 * Get the last time a user explicitly purged the page via action=purge
	 *
	 * @return string|bool TS_MW timestamp or false
	 * @since 1.28
	 */
	public function getLastPurgeTimestamp() {
		$cache = ObjectCache::getLocalClusterInstance();

		return $cache->get( $cache->makeKey( 'page', 'last-dc-purge', $this->getId() ) );
	}

getLastPurgeTimestamp is returning an array when called at https://github.com/wikimedia/mediawiki/blob/master/includes/actions/ViewAction.php#L62

array (size=4)
  0 => int 1
  1 => string 'wikitext' (length=8)
  2 => int 2592000
  3 => float 1478539661.6747
( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 85
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1080	3744272	preg_match ( )	.../ConvertibleTimestamp.php:85

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 87
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1102	3750984	preg_match ( )	.../ConvertibleTimestamp.php:87

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 89
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1121	3751240	preg_match ( )	.../ConvertibleTimestamp.php:89

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 91
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1134	3751520	preg_match ( )	.../ConvertibleTimestamp.php:91

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 94
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1147	3751776	preg_match ( )	.../ConvertibleTimestamp.php:94

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 99
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1159	3752032	preg_match ( )	.../ConvertibleTimestamp.php:99

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 105
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1172	3752288	preg_match ( )	.../ConvertibleTimestamp.php:105

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 111
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1183	3752544	preg_match ( )	.../ConvertibleTimestamp.php:111

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 117
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1196	3752800	preg_match ( )	.../ConvertibleTimestamp.php:117

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 128
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1208	3753056	preg_match ( )	.../ConvertibleTimestamp.php:128

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 135
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1221	3753312	preg_match ( )	.../ConvertibleTimestamp.php:135

( ! ) Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 138
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63
12	0.1233	3753568	preg_match ( )	.../ConvertibleTimestamp.php:138

( ! ) Notice: Array to string conversion in /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php on line 142
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755
9	0.1080	3744192	ConvertibleTimestamp::convert( )	.../GlobalFunctions.php:2011
10	0.1080	3744248	ConvertibleTimestamp->__construct( )	.../ConvertibleTimestamp.php:173
11	0.1080	3744248	ConvertibleTimestamp->setTimestamp( )	.../ConvertibleTimestamp.php:63

( ! ) Notice: Array to string conversion in /var/www/wiki/mediawiki/core/includes/GlobalFunctions.php on line 2013
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1080	3744192	wfTimestamp( )	.../OutputPage.php:755

( ! ) Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/wiki/mediawiki/core/includes/OutputPage.php on line 812
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1337	3756568	ini_set ( )	.../OutputPage.php:812

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php:85) in /var/www/wiki/mediawiki/core/includes/libs/HttpStatus.php on line 111
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1354	3756824	WebResponse->statusHeader( )	.../OutputPage.php:813
9	0.1355	3757144	HttpStatus::header( )	.../WebResponse.php:71
10	0.1355	3758000	header ( )	.../HttpStatus.php:111

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php:85) in /var/www/wiki/mediawiki/core/includes/WebResponse.php on line 45
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1367	3758328	OutputPage->sendCacheControl( )	.../OutputPage.php:814
9	0.1372	3760848	WebResponse->header( )	.../OutputPage.php:2181
10	0.1372	3760848	header ( )	.../WebResponse.php:45

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php:85) in /var/www/wiki/mediawiki/core/includes/WebResponse.php on line 45
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1367	3758328	OutputPage->sendCacheControl( )	.../OutputPage.php:814
9	0.1387	3761240	WebResponse->header( )	.../OutputPage.php:2225
10	0.1387	3761240	header ( )	.../WebResponse.php:45

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php:85) in /var/www/wiki/mediawiki/core/includes/WebResponse.php on line 45
Call Stack
#	Time	Memory	Function	Location
1	0.0003	360504	{main}( )	.../index.php:0
2	0.0727	3177896	MediaWiki->run( )	.../index.php:43
3	0.0733	3178152	MediaWiki->main( )	.../MediaWiki.php:522
4	0.1039	3644424	MediaWiki->performRequest( )	.../MediaWiki.php:861
5	0.1055	3723000	MediaWiki->performAction( )	.../MediaWiki.php:289
6	0.1075	3743256	ViewAction->show( )	.../MediaWiki.php:505
7	0.1080	3744192	OutputPage->checkLastModified( )	.../ViewAction.php:65
8	0.1367	3758328	OutputPage->sendCacheControl( )	.../OutputPage.php:814
9	0.1397	3761560	WebResponse->header( )	.../OutputPage.php:2226
10	0.1397	3761560	header ( )	.../WebResponse.php:45

Event Timeline

Does this just need a documentation change or is something broken because of it?

Does this just need a documentation change or is something broken because of it?

Lol. How did I manage to not actually report the problem? I was getting a lot of the below... Let me get a full list of them

[error] [3974003f90313448af3ee11d] /wiki/Main_Page   ErrorException from line 87 of /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php: PHP Warning: preg_match() expects parameter 2 to be string, array given
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /var/www/wiki/mediawiki/core/includes/libs/time/ConvertibleTimestamp.php(87): preg_match(string, array, array)

Added many many stack traces from the many many warnings when this appears... See description

I don't really see how this is possible. It just stores/retrieves a TS_MW timestamp string looking at the code...

I don't really see how this is possible. It just stores/retrieves a TS_MW timestamp string looking at the code...

Indeed... It wasn't just a one off, I can reproduce it on a fairly regular basis just by refreshing

array (size=4)
  0 => int 1
  1 => string 'wikitext' (length=8)
  2 => int 2592000
  3 => float 1478539661.6747

Though, the value being returned would look to be completely wrong as well... I'm not sure how the unix timestamp has become a float

Anything I can do to help debug this as it's still happening...

	public function getLastPurgeTimestamp() {
		$cache = ObjectCache::getLocalClusterInstance();
		$ret = $cache->get( $cache->makeKey( 'page', 'last-dc-purge', $this->getId() ) );
		var_dump( $cache->makeKey( 'page', 'last-dc-purge', $this->getId() ), $ret );
		return $ret;
	}
/var/www/wiki/mediawiki/core/includes/page/WikiPage.php:1185:string 'wikidb-mw_:page:last-dc-purge:371' (length=33)

/var/www/wiki/mediawiki/core/includes/page/WikiPage.php:1185:
array (size=4)
  0 => int 1
  1 => string 'wikitext' (length=8)
  2 => int 2592000
  3 => float 1479430654.1412
demon triaged this task as Medium priority.Nov 22 2016, 9:08 PM

Is it always returning an array? Or just some old (stale?) entries? If it's the latter, I think we could discard them in getLastPurgeTimestamp() and assume we couldn't get anything from the cache. If it's the former, I'm curious why a wfTimestamp() would ever think to return an array, or why it would be coerced into such a weird one at that...

Is it always returning an array? Or just some old (stale?) entries? If it's the latter, I think we could discard them in getLastPurgeTimestamp() and assume we couldn't get anything from the cache. If it's the former, I'm curious why a wfTimestamp() would ever think to return an array, or why it would be coerced into such a weird one at that...

Nope, it's not always... It's one in 5 or one in 10 requests? Server and memcached have been restarted, so that would've cleared any crap out that was there...

And seems to be when it does come from cache that it's a problem....

aaron removed aaron as the assignee of this task.Nov 23 2016, 12:01 AM
aaron subscribed.

I can't reproduce this. Just refreshing the page should not cause values to be "cached" as the set() only happens via API purge on GET. The values you have look like WAN cache arrays, possible for WikiPage::getContentModel(), which uses a different key.

Some MW, Ubuntu 16.10 with PHP 7 and memcached 1.4.25 type bug?

I personally haven't tried to reproduce it yet, but from reading the code I don't even see how this is possible.

Considering @aaron cannot reproduce and we haven't seen this in production I'm inclined to remove this as a blocker to 1.28.

I personally haven't tried to reproduce it yet, but from reading the code I don't even see how this is possible.

Considering @aaron cannot reproduce and we haven't seen this in production I'm inclined to remove this as a blocker to 1.28.

I'd agree; no sign it's REL1_28 specific... So tag removed.

But I can't see how I'm the only apparently seeing this issue. Gotta be something else going on somewhere, as to where, I've nfi

Krinkle claimed this task.
Krinkle moved this task from General to HTTP Cache on the MediaWiki-libs-BagOStuff board.
Krinkle subscribed.

This method was added for T145649 which is now resolved. It was converted to a no-op and deprecated in rMWf4a306fb18f1: Deprecate "Avoid page_touched update for HTTP GET action=purge requests".