Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1048: Column 'cuc_actor' cannot be nullFunction: MediaWiki\CheckUser\Hooks::updateCheckUserDataQuery: INSERT INTO `cu_changes` (cuc_namespace,cuc_title,cuc_minor,cuc_user,cuc_user_text,cuc_
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1048: Column 'cuc_actor' cannot be null
Function: MediaWiki\CheckUser\Hooks::updateCheckUserData
Query: INSERT INTO `cu_changes` (cuc_namespace,cuc_title,cuc_minor,cuc_user,cuc_user_text,cuc_
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(1749)
#0 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(1733): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(1707): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(1208): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(2495): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/Database.php(2475): Wikimedia\Rdbms\Database->doInsert(string, array, string)
#5 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->insert(string, array, string)
#6 /srv/mediawiki/php-1.39.0-wmf.12/includes/libs/rdbms/database/DBConnRef.php(333): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#7 /srv/mediawiki/php-1.39.0-wmf.12/extensions/CheckUser/src/Hooks.php(198): Wikimedia\Rdbms\DBConnRef->insert(string, array, string)
#8 /srv/mediawiki/php-1.39.0-wmf.12/extensions/AbuseFilter/includes/AbuseLogger.php(234): MediaWiki\CheckUser\Hooks::updateCheckUserData(RecentChange)
#9 /srv/mediawiki/php-1.39.0-wmf.12/extensions/AbuseFilter/includes/AbuseLogger.php(151): MediaWiki\Extension\AbuseFilter\AbuseLogger->insertLocalLogEntries(array, Wikimedia\Rdbms\DBConnRef)
#10 /srv/mediawiki/php-1.39.0-wmf.12/extensions/AbuseFilter/includes/FilterRunner.php(266): MediaWiki\Extension\AbuseFilter\AbuseLogger->addLogEntries(array)
#11 /srv/mediawiki/php-1.39.0-wmf.12/extensions/AbuseFilter/includes/Hooks/Handlers/FilteredActionsHandler.php(142): MediaWiki\Extension\AbuseFilter\FilterRunner->run()
#12 /srv/mediawiki/php-1.39.0-wmf.12/extensions/AbuseFilter/includes/Hooks/Handlers/FilteredActionsHandler.php(88): MediaWiki\Extension\AbuseFilter\Hooks\Handlers\FilteredActionsHandler->filterEdit(DerivativeContext, User, WikitextContent, string, string)
#13 /srv/mediawiki/php-1.39.0-wmf.12/includes/HookContainer/HookContainer.php(160): MediaWiki\Extension\AbuseFilter\Hooks\Handlers\FilteredActionsHandler->onEditFilterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#14 /srv/mediawiki/php-1.39.0-wmf.12/includes/HookContainer/HookRunner.php(1472): MediaWiki\HookContainer\HookContainer->run(string, array)
#15 /srv/mediawiki/php-1.39.0-wmf.12/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php(106): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#16 /srv/mediawiki/php-1.39.0-wmf.12/includes/editpage/Constraint/EditConstraintRunner.php(88): MediaWiki\EditPage\Constraint\EditFilterMergedContentHookConstraint->checkConstraint()
#17 /srv/mediawiki/php-1.39.0-wmf.12/includes/EditPage.php(2328): MediaWiki\EditPage\Constraint\EditConstraintRunner->checkConstraints()
#18 /srv/mediawiki/php-1.39.0-wmf.12/includes/EditPage.php(1877): EditPage->internalAttemptSave(array, boolean, boolean)
#19 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiEditPage.php(516): EditPage->attemptSave(array)
#20 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiMain.php(1902): ApiEditPage->execute()
#21 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiMain.php(843): ApiMain->executeAction()
#22 /srv/mediawiki/php-1.39.0-wmf.12/extensions/VisualEditor/includes/ApiVisualEditorEdit.php(135): ApiMain->execute()
#23 /srv/mediawiki/php-1.39.0-wmf.12/extensions/VisualEditor/includes/ApiVisualEditorEdit.php(451): MediaWiki\Extension\VisualEditor\ApiVisualEditorEdit->saveWikitext(Title, string, array)
#24 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiMain.php(1902): MediaWiki\Extension\VisualEditor\ApiVisualEditorEdit->execute()
#25 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiMain.php(874): ApiMain->executeAction()
#26 /srv/mediawiki/php-1.39.0-wmf.12/includes/api/ApiMain.php(845): ApiMain->executeActionWithErrorHandling()
#27 /srv/mediawiki/php-1.39.0-wmf.12/api.php(90): ApiMain->execute()
#28 /srv/mediawiki/php-1.39.0-wmf.12/api.php(45): wfApiMain()
#29 /srv/mediawiki/w/api.php(3): require(string)
#30 {main}
Impact

Seems like an edge case with AbuseFilter. Basically some spambots are gettings fatals when their action is being blocked.

Notes

Event Timeline

Change 798993 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CheckUser@master] Acquire fresh actor id

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

Change 798813 had a related patch set uploaded (by Zabe; author: Zabe):

[operations/mediawiki-config@master] Revert "Start writing to cuc_actor in s3, kcgwiki and labtestwiki"

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

Change 798813 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "Start writing to cuc_actor in s3, kcgwiki and labtestwiki"

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

Mentioned in SAL (#wikimedia-operations) [2022-05-24T22:02:14Z] <cjming@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:798813|Revert "Start writing to cuc_actor in s3, kcgwiki and labtestwiki" (T233004 T309148)]] (duration: 00m 49s)

Change 798993 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Acquire fresh actor id

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

Change 798817 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.12] Acquire fresh actor id

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

Change 798818 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.13] Acquire fresh actor id

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

Change 798818 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.13] Acquire fresh actor id

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

Mentioned in SAL (#wikimedia-operations) [2022-05-26T20:53:39Z] <brennen@deploy1002> Synchronized php-1.39.0-wmf.13/extensions/CheckUser/src/Hooks.php: Backport: [[gerrit:798818|Acquire fresh actor id (T233004 T309148)]] (duration: 00m 51s)

Zabe claimed this task.

Change 798817 abandoned by Zabe:

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.12] Acquire fresh actor id

Reason:

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