Page MenuHomePhabricator

InvalidArgumentException from line 234 of /srv/mediawiki/php-1.40.0-wmf.25/includes/libs/rdbms/platform/SQLPlatform.php: Wikimedia\Rdbms\Platform\SQLPlatform::makeList: empty input for field page_namespace
Closed, ResolvedPublic

Description

Seen in /var/log/mediawiki/mediawiki_job_pagetriage_cleanup_en/syslog.log beginning on March 2 (I checked eqiad and no error was logged there):

Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: Started processing...
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: cleanReviewedPagesAndUnusedNamespaces()...
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: InvalidArgumentException from line 234 of /srv/mediawiki/php-1.40.0-wmf.25/includes/libs/rdbms/platform/SQLPlatform.php: Wikimedia\Rdbms\Platform\SQLPlatform::makeList: empty input for field page_namespace
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #0 /srv/mediawiki/php-1.40.0-wmf.25/includes/libs/rdbms/database/Database.php(3635): Wikimedia\Rdbms\Platform\SQLPlatform->makeList(Array, 4)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #1 /srv/mediawiki/php-1.40.0-wmf.25/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->makeList(Array, 4)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #2 /srv/mediawiki/php-1.40.0-wmf.25/includes/libs/rdbms/database/DBConnRef.php(414): Wikimedia\Rdbms\DBConnRef->__call('makeList', Array)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #3 /srv/mediawiki/php-1.40.0-wmf.25/extensions/PageTriage/includes/Maintenance/RemoveOldRows.php(85): Wikimedia\Rdbms\DBConnRef->makeList(Array, 4)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #4 /srv/mediawiki/php-1.40.0-wmf.25/extensions/PageTriage/includes/Maintenance/RemoveOldRows.php(42): MediaWiki\Extension\PageTriage\Maintenance\RemoveOldRows->cleanReviewedPagesAndUnusedNamespaces()
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #5 /srv/mediawiki/php-1.40.0-wmf.25/maintenance/includes/MaintenanceRunner.php(609): MediaWiki\Extension\PageTriage\Maintenance\RemoveOldRows->execute()
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #6 /srv/mediawiki/php-1.40.0-wmf.25/maintenance/doMaintenance.php(99): MediaWiki\Maintenance\MaintenanceRunner->run()
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #7 /srv/mediawiki/php-1.40.0-wmf.25/extensions/PageTriage/cron/updatePageTriageQueue.php(18): require_once('/srv/mediawiki/...')
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #8 /srv/mediawiki/multiversion/MWScript.php(118): require_once('/srv/mediawiki/...')
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: #9 {main}
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: Traceback (most recent call last):
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]:   File "/usr/local/bin/mw-cli-wrapper", line 57, in <module>
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]:     subprocess.run(cmd, check=True, shell=True)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]:   File "/usr/lib/python3.7/subprocess.py", line 487, in run
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]:     output=stdout, stderr=stderr)
Mar  6 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[5036]: subprocess.CalledProcessError: Command '/usr/local/bin/mwscript extensions/PageTriage/cron/updatePageTriageQueue.php enwiki' returned non-zero exit status 1.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
private function cleanReviewedPagesAndUnusedNamespaces() {
		global $wgPageTriageNamespaces;

		$maxAgeInDays = 30;

		// This list doesn't include Article or Draft
		// because they have special handling.
		$secondaryNamespaces = array_filter(
			$wgPageTriageNamespaces,
			static function ( $ns ) {
				return $ns !== 0;
			}
		);
		$startTime = (int)wfTimestamp( TS_UNIX ) - $maxAgeInDays * 60 * 60 * 24;
		$sqlWhere = $this->dbr->makeList( [
				// 1. the page is in the article namespace and has been reviewed, or
				$this->dbr->makeList( [
					'page_namespace' => 0,
					'ptrp_reviewed > 0'
				], LIST_AND ),
				// 2. the page is not in main or draft namespaces or
				'page_namespace' => $secondaryNamespaces,
			], LIST_OR );

		$this->cleanPageTriagePageTable( $startTime, $sqlWhere );
	}

$secondaryNamespaces is now an empty array.

kostajh triaged this task as High priority.Mar 8 2023, 12:54 PM

The script to remove stale entries from pagetriage queue is broken; moving to our current sprint to do something about.

Change 895786 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/PageTriage@master] maintenance: Adjust query builder to account for no secondary namespaces

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

Change 895778 had a related patch set uploaded (by Gergő Tisza; author: Kosta Harlan):

[mediawiki/extensions/PageTriage@wmf/1.40.0-wmf.26] maintenance: Adjust query builder to account for no secondary namespaces

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

Change 895779 had a related patch set uploaded (by Gergő Tisza; author: Kosta Harlan):

[mediawiki/extensions/PageTriage@wmf/1.40.0-wmf.25] maintenance: Adjust query builder to account for no secondary namespaces

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

Change 895786 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] maintenance: Adjust query builder to account for no secondary namespaces

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

Change 895778 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@wmf/1.40.0-wmf.26] maintenance: Adjust query builder to account for no secondary namespaces

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

Change 895779 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@wmf/1.40.0-wmf.25] maintenance: Adjust query builder to account for no secondary namespaces

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

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:21:26Z] <tgr@deploy2002> Started scap: Backport for [[gerrit:895778|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]], [[gerrit:895779|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]]

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:23:31Z] <tgr@deploy2002> tgr: Backport for [[gerrit:895778|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]], [[gerrit:895779|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:29:09Z] <tgr@deploy2002> Finished scap: Backport for [[gerrit:895778|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]], [[gerrit:895779|maintenance: Adjust query builder to account for no secondary namespaces (T321983 T331412)]] (duration: 07m 43s)

It is working again:

Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:21 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:22 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:23 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:24 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:24 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:24 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:24 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:25 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 83
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: cleanRedirects()...
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 100
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: processed 15
Mar 10 20:55:26 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[27360]: Completed
Mar 12 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: Started processing...
Mar 12 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: cleanReviewedPagesAndUnusedNamespaces()...
Mar 12 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:00 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:01 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:02 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:03 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:04 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:04 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:04 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:04 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:04 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:05 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:05 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 100
Mar 12 20:55:05 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 78
Mar 12 20:55:06 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: cleanRedirects()...
Mar 12 20:55:06 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: processed 15
Mar 12 20:55:06 mwmaint2002 mediawiki_job_pagetriage_cleanup_en[16564]: Completed
  NODES
3d 2
HOME 1
Note 3
os 21
server 1
Users 6